From 537bd628d792a079c7b1aabfe758e16e9a593f74 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Mon, 5 May 2025 07:35:16 +0100 Subject: [PATCH 1/2] ext/pgsql: globals data struct rework/size reduction --- ext/pgsql/php_pgsql.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ext/pgsql/php_pgsql.h b/ext/pgsql/php_pgsql.h index 75979b5e80fca..623bb3d221fee 100644 --- a/ext/pgsql/php_pgsql.h +++ b/ext/pgsql/php_pgsql.h @@ -178,17 +178,17 @@ static const php_stream_ops php_stream_pgsql_fd_ops = { #define PGSQL_MAX_REGEXES 11 ZEND_BEGIN_MODULE_GLOBALS(pgsql) + HashTable field_oids; + HashTable table_oids; + HashTable connections; zend_long num_links,num_persistent; zend_long max_links,max_persistent; - bool allow_persistent; - int ignore_notices; zend_long auto_reset_persistent; - int log_notices; zend_object *default_link; /* default link when connection is omitted */ zend_string *regexes[PGSQL_MAX_REGEXES]; - HashTable field_oids; - HashTable table_oids; - HashTable connections; + bool allow_persistent; + bool ignore_notices; + bool log_notices; ZEND_END_MODULE_GLOBALS(pgsql) ZEND_EXTERN_MODULE_GLOBALS(pgsql) From 620354ac5bdc1fe5dcd790317c9398b8aa4a1f8f Mon Sep 17 00:00:00 2001 From: David Carlier Date: Mon, 5 May 2025 14:09:46 +0100 Subject: [PATCH 2/2] reshift the fields --- ext/pgsql/php_pgsql.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/pgsql/php_pgsql.h b/ext/pgsql/php_pgsql.h index 623bb3d221fee..7a5770cb59369 100644 --- a/ext/pgsql/php_pgsql.h +++ b/ext/pgsql/php_pgsql.h @@ -178,9 +178,6 @@ static const php_stream_ops php_stream_pgsql_fd_ops = { #define PGSQL_MAX_REGEXES 11 ZEND_BEGIN_MODULE_GLOBALS(pgsql) - HashTable field_oids; - HashTable table_oids; - HashTable connections; zend_long num_links,num_persistent; zend_long max_links,max_persistent; zend_long auto_reset_persistent; @@ -189,6 +186,9 @@ ZEND_BEGIN_MODULE_GLOBALS(pgsql) bool allow_persistent; bool ignore_notices; bool log_notices; + HashTable field_oids; + HashTable table_oids; + HashTable connections; ZEND_END_MODULE_GLOBALS(pgsql) ZEND_EXTERN_MODULE_GLOBALS(pgsql)