summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/zend_exceptions.c2
-rw-r--r--Zend/zend_interfaces.c12
-rw-r--r--Zend/zend_vm_execute.h6
-rw-r--r--Zend/zend_vm_gen.php6
-rw-r--r--ext/bcmath/bcmath.c2
-rw-r--r--ext/calendar/calendar.c2
-rw-r--r--ext/com_dotnet/com_extension.c2
-rw-r--r--ext/curl/interface.c2
-rw-r--r--ext/date/php_date.c12
-rw-r--r--ext/dba/dba.c2
-rw-r--r--ext/enchant/enchant.c2
-rw-r--r--ext/exif/exif.c2
-rw-r--r--ext/fileinfo/fileinfo.c4
-rw-r--r--ext/ftp/php_ftp.c2
-rw-r--r--ext/gd/gd.c2
-rw-r--r--ext/gettext/gettext.c2
-rw-r--r--ext/gmp/gmp.c2
-rw-r--r--ext/hash/hash.c4
-rw-r--r--ext/iconv/iconv.c2
-rw-r--r--ext/imap/php_imap.c2
-rw-r--r--ext/interbase/interbase.c2
-rw-r--r--ext/intl/collator/collator_class.c2
-rw-r--r--ext/intl/common/common_enum.cpp2
-rw-r--r--ext/intl/converter/converter.c2
-rw-r--r--ext/intl/dateformat/dateformat_class.c2
-rw-r--r--ext/intl/formatter/formatter_class.c2
-rw-r--r--ext/intl/locale/locale_class.c2
-rw-r--r--ext/intl/msgformat/msgformat_class.c2
-rw-r--r--ext/intl/normalizer/normalizer_class.c2
-rw-r--r--ext/intl/php_intl.c2
-rw-r--r--ext/intl/resourcebundle/resourcebundle_class.c2
-rw-r--r--ext/intl/spoofchecker/spoofchecker_class.c2
-rw-r--r--ext/intl/timezone/timezone_class.cpp2
-rw-r--r--ext/intl/transliterator/transliterator_class.c2
-rw-r--r--ext/intl/uchar/uchar.c2
-rw-r--r--ext/ldap/ldap.c2
-rw-r--r--ext/mbstring/mbstring.c2
-rw-r--r--ext/mbstring/php_mbregex.c6
-rw-r--r--ext/odbc/php_odbc.c2
-rw-r--r--ext/opcache/zend_accelerator_module.c2
-rw-r--r--ext/openssl/openssl.c2
-rw-r--r--ext/pcntl/pcntl.c2
-rw-r--r--ext/pdo/pdo.c6
-rw-r--r--ext/pdo/php_pdo_driver.h6
-rw-r--r--ext/pdo_dblib/dblib_driver.c4
-rw-r--r--ext/pdo_dblib/pdo_dblib.c2
-rw-r--r--ext/pdo_dblib/php_pdo_dblib_int.h2
-rw-r--r--ext/pdo_firebird/firebird_driver.c4
-rw-r--r--ext/pdo_firebird/pdo_firebird.c2
-rw-r--r--ext/pdo_firebird/php_pdo_firebird_int.h2
-rw-r--r--ext/pdo_mysql/mysql_driver.c4
-rw-r--r--ext/pdo_mysql/pdo_mysql.c2
-rw-r--r--ext/pdo_mysql/php_pdo_mysql_int.h2
-rw-r--r--ext/pdo_oci/oci_driver.c4
-rw-r--r--ext/pdo_oci/pdo_oci.c2
-rw-r--r--ext/pdo_oci/php_pdo_oci_int.h2
-rw-r--r--ext/pdo_odbc/odbc_driver.c4
-rw-r--r--ext/pdo_odbc/pdo_odbc.c2
-rw-r--r--ext/pdo_odbc/php_pdo_odbc_int.h2
-rw-r--r--ext/pdo_pgsql/pdo_pgsql.c2
-rw-r--r--ext/pdo_pgsql/pgsql_driver.c4
-rw-r--r--ext/pdo_pgsql/php_pdo_pgsql_int.h2
-rw-r--r--ext/pdo_sqlite/pdo_sqlite.c2
-rw-r--r--ext/pdo_sqlite/php_pdo_sqlite_int.h2
-rw-r--r--ext/pdo_sqlite/sqlite_driver.c4
-rw-r--r--ext/pgsql/pgsql.c2
-rw-r--r--ext/phar/phar.c2
-rw-r--r--ext/phar/phar_object.c8
-rw-r--r--ext/posix/posix.c10
-rw-r--r--ext/reflection/php_reflection.c2
-rw-r--r--ext/shmop/shmop.c2
-rw-r--r--ext/simplexml/simplexml.c2
-rw-r--r--ext/skeleton/skeleton.c2
-rw-r--r--ext/snmp/snmp.c4
-rw-r--r--ext/soap/php_encoding.c2
-rw-r--r--ext/soap/php_encoding.h2
-rw-r--r--ext/soap/php_sdl.c6
-rw-r--r--ext/soap/soap.c8
-rw-r--r--ext/sockets/sockets.c2
-rw-r--r--ext/sodium/libsodium.c2
-rw-r--r--ext/spl/php_spl.c2
-rw-r--r--ext/spl/spl_fixedarray.c2
-rw-r--r--ext/spl/spl_iterators.c2
-rw-r--r--ext/sqlite3/sqlite3.c6
-rw-r--r--ext/standard/basic_functions.c2
-rw-r--r--ext/standard/crypt_freesec.c26
-rw-r--r--ext/standard/sha1.c2
-rw-r--r--ext/sysvmsg/sysvmsg.c2
-rw-r--r--ext/sysvsem/sysvsem.c2
-rw-r--r--ext/sysvshm/sysvshm.c2
-rw-r--r--ext/tokenizer/tokenizer.c2
-rw-r--r--ext/wddx/wddx.c2
-rw-r--r--ext/xml/compat.c2
-rw-r--r--ext/xml/xml.c2
-rw-r--r--ext/xmlrpc/xmlrpc-epi-php.c2
-rw-r--r--ext/zend_test/test.c4
-rw-r--r--main/http_status_codes.h2
-rw-r--r--main/internal_functions.c.in2
-rw-r--r--main/internal_functions_win32.c2
-rw-r--r--main/main.c4
-rw-r--r--main/php_main.h2
-rw-r--r--sapi/cgi/cgi_main.c2
-rw-r--r--sapi/litespeed/lsapi_main.c2
-rw-r--r--sapi/phpdbg/phpdbg.c2
104 files changed, 162 insertions, 162 deletions
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c
index bd889647e8..5049fe966a 100644
--- a/Zend/zend_exceptions.c
+++ b/Zend/zend_exceptions.c
@@ -743,7 +743,7 @@ ZEND_METHOD(exception, __toString)
/* }}} */
/** {{{ Throwable method definition */
-const zend_function_entry zend_funcs_throwable[] = {
+static const zend_function_entry zend_funcs_throwable[] = {
ZEND_ABSTRACT_ME(throwable, getMessage, NULL)
ZEND_ABSTRACT_ME(throwable, getCode, NULL)
ZEND_ABSTRACT_ME(throwable, getFile, NULL)
diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c
index cde77df4e2..430e3b9715 100644
--- a/Zend/zend_interfaces.c
+++ b/Zend/zend_interfaces.c
@@ -479,12 +479,12 @@ static int zend_implement_countable(zend_class_entry *interface, zend_class_entr
/* }}}*/
/* {{{ function tables */
-const zend_function_entry zend_funcs_aggregate[] = {
+static const zend_function_entry zend_funcs_aggregate[] = {
ZEND_ABSTRACT_ME(iterator, getIterator, NULL)
ZEND_FE_END
};
-const zend_function_entry zend_funcs_iterator[] = {
+static const zend_function_entry zend_funcs_iterator[] = {
ZEND_ABSTRACT_ME(iterator, current, NULL)
ZEND_ABSTRACT_ME(iterator, next, NULL)
ZEND_ABSTRACT_ME(iterator, key, NULL)
@@ -493,7 +493,7 @@ const zend_function_entry zend_funcs_iterator[] = {
ZEND_FE_END
};
-const zend_function_entry *zend_funcs_traversable = NULL;
+static const zend_function_entry *zend_funcs_traversable = NULL;
ZEND_BEGIN_ARG_INFO_EX(arginfo_arrayaccess_offset, 0, 0, 1)
ZEND_ARG_INFO(0, offset)
@@ -508,7 +508,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_arrayaccess_offset_value, 0, 0, 2)
ZEND_ARG_INFO(0, value)
ZEND_END_ARG_INFO()
-const zend_function_entry zend_funcs_arrayaccess[] = {
+static const zend_function_entry zend_funcs_arrayaccess[] = {
ZEND_ABSTRACT_ME(arrayaccess, offsetExists, arginfo_arrayaccess_offset)
ZEND_ABSTRACT_ME(arrayaccess, offsetGet, arginfo_arrayaccess_offset_get)
ZEND_ABSTRACT_ME(arrayaccess, offsetSet, arginfo_arrayaccess_offset_value)
@@ -520,7 +520,7 @@ ZEND_BEGIN_ARG_INFO(arginfo_serializable_serialize, 0)
ZEND_ARG_INFO(0, serialized)
ZEND_END_ARG_INFO()
-const zend_function_entry zend_funcs_serializable[] = {
+static const zend_function_entry zend_funcs_serializable[] = {
ZEND_ABSTRACT_ME(serializable, serialize, NULL)
ZEND_FENTRY(unserialize, NULL, arginfo_serializable_serialize, ZEND_ACC_PUBLIC|ZEND_ACC_ABSTRACT|ZEND_ACC_CTOR)
ZEND_FE_END
@@ -529,7 +529,7 @@ const zend_function_entry zend_funcs_serializable[] = {
ZEND_BEGIN_ARG_INFO(arginfo_countable_count, 0)
ZEND_END_ARG_INFO()
-const zend_function_entry zend_funcs_countable[] = {
+static const zend_function_entry zend_funcs_countable[] = {
ZEND_ABSTRACT_ME(Countable, count, arginfo_countable_count)
ZEND_FE_END
};
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index 5258da7f0d..45cf7ec40d 100644
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@ -319,7 +319,7 @@ static const uint32_t *zend_spec_handlers;
static const void **zend_opcode_handlers;
static int zend_handlers_count;
#if (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID)
-static const void **zend_opcode_handler_funcs;
+static const void * const * zend_opcode_handler_funcs;
static zend_op hybrid_halt_op;
#endif
static const void *zend_vm_get_opcode_handler(zend_uchar opcode, const zend_op* op);
@@ -54485,7 +54485,7 @@ ZEND_API void execute_ex(zend_execute_data *ex)
#if (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID)
if (UNEXPECTED(execute_data == NULL)) {
- static const void* labels[] = {
+ static const void * const labels[] = {
(void*)&&ZEND_NOP_SPEC_LABEL,
(void*)&&ZEND_ADD_SPEC_CONST_CONST_LABEL,
(void*)&&ZEND_ADD_SPEC_CONST_TMPVAR_LABEL,
@@ -63509,7 +63509,7 @@ ZEND_API void zend_execute(zend_op_array *op_array, zval *return_value)
void zend_init_opcodes_handlers(void)
{
- static const void *labels[] = {
+ static const void * const labels[] = {
ZEND_NOP_SPEC_HANDLER,
ZEND_ADD_SPEC_CONST_CONST_HANDLER,
ZEND_ADD_SPEC_CONST_TMPVAR_HANDLER,
diff --git a/Zend/zend_vm_gen.php b/Zend/zend_vm_gen.php
index ec53c0fe01..cee3ffe320 100644
--- a/Zend/zend_vm_gen.php
+++ b/Zend/zend_vm_gen.php
@@ -1630,7 +1630,7 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name)
out($f,"static int zend_handlers_count;\n");
if ($kind == ZEND_VM_KIND_HYBRID) {
out($f,"#if (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID)\n");
- out($f,"static const void **zend_opcode_handler_funcs;\n");
+ out($f,"static const void * const * zend_opcode_handler_funcs;\n");
out($f,"static zend_op hybrid_halt_op;\n");
out($f,"#endif\n");
}
@@ -1857,7 +1857,7 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name)
}
$prolog = $m[1];
out($f,$prolog."if (UNEXPECTED(execute_data == NULL)) {\n");
- out($f,$prolog."\tstatic const void* labels[] = {\n");
+ out($f,$prolog."\tstatic const void * const labels[] = {\n");
gen_labels($f, $spec, ZEND_VM_KIND_GOTO, $prolog."\t\t", $specs);
out($f,$prolog."\t};\n");
out($f,$prolog."\tzend_opcode_handlers = (const void **) labels;\n");
@@ -1972,7 +1972,7 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name)
out($f,$prolog."zend_spec_handlers = specs;\n");
out($f,$prolog.$executor_name."_ex(NULL);\n");
} else {
- out($f,$prolog."static const void *labels[] = {\n");
+ out($f,$prolog."static const void * const labels[] = {\n");
gen_labels($f, $spec, ZEND_VM_KIND_CALL, $prolog."\t", $specs, $switch_labels);
out($f,$prolog."};\n");
out($f,$prolog."static const uint32_t specs[] = {\n");
diff --git a/ext/bcmath/bcmath.c b/ext/bcmath/bcmath.c
index 1b39f4905d..c34eafec2e 100644
--- a/ext/bcmath/bcmath.c
+++ b/ext/bcmath/bcmath.c
@@ -96,7 +96,7 @@ ZEND_END_ARG_INFO()
/* }}} */
-const zend_function_entry bcmath_functions[] = {
+static const zend_function_entry bcmath_functions[] = {
PHP_FE(bcadd, arginfo_bcadd)
PHP_FE(bcsub, arginfo_bcsub)
PHP_FE(bcmul, arginfo_bcmul)
diff --git a/ext/calendar/calendar.c b/ext/calendar/calendar.c
index d6df68cebb..a3097f45d8 100644
--- a/ext/calendar/calendar.c
+++ b/ext/calendar/calendar.c
@@ -131,7 +131,7 @@ ZEND_END_ARG_INFO()
/* }}} */
-const zend_function_entry calendar_functions[] = {
+static const zend_function_entry calendar_functions[] = {
PHP_FE(jdtogregorian, arginfo_jdtogregorian)
PHP_FE(gregoriantojd, arginfo_gregoriantojd)
PHP_FE(jdtojulian, arginfo_jdtojulian)
diff --git a/ext/com_dotnet/com_extension.c b/ext/com_dotnet/com_extension.c
index d2dc4c155e..8d41ab00d1 100644
--- a/ext/com_dotnet/com_extension.c
+++ b/ext/com_dotnet/com_extension.c
@@ -196,7 +196,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_com_load_typelib, 0, 0, 1)
ZEND_END_ARG_INFO()
/* }}} */
-const zend_function_entry com_dotnet_functions[] = {
+static const zend_function_entry com_dotnet_functions[] = {
PHP_FE(variant_set, arginfo_variant_set)
PHP_FE(variant_add, arginfo_variant_add)
PHP_FE(variant_cat, arginfo_variant_cat)
diff --git a/ext/curl/interface.c b/ext/curl/interface.c
index 6cd02e19e7..9be6ba1c30 100644
--- a/ext/curl/interface.c
+++ b/ext/curl/interface.c
@@ -454,7 +454,7 @@ ZEND_END_ARG_INFO()
/* {{{ curl_functions[]
*/
-const zend_function_entry curl_functions[] = {
+static const zend_function_entry curl_functions[] = {
PHP_FE(curl_init, arginfo_curl_init)
PHP_FE(curl_copy_handle, arginfo_curl_copy_handle)
PHP_FE(curl_version, arginfo_curl_version)
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index 124b2d407a..3715e53ddb 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -399,7 +399,7 @@ ZEND_END_ARG_INFO()
/* }}} */
/* {{{ Function table */
-const zend_function_entry date_functions[] = {
+static const zend_function_entry date_functions[] = {
PHP_FE(strtotime, arginfo_strtotime)
PHP_FE(date, arginfo_date)
PHP_FE(idate, arginfo_idate)
@@ -474,7 +474,7 @@ static const zend_function_entry date_funcs_interface[] = {
PHP_FE_END
};
-const zend_function_entry date_funcs_date[] = {
+static const zend_function_entry date_funcs_date[] = {
PHP_ME(DateTime, __construct, arginfo_date_create, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
PHP_ME(DateTime, __wakeup, NULL, ZEND_ACC_PUBLIC)
PHP_ME(DateTime, __set_state, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
@@ -497,7 +497,7 @@ const zend_function_entry date_funcs_date[] = {
PHP_FE_END
};
-const zend_function_entry date_funcs_immutable[] = {
+static const zend_function_entry date_funcs_immutable[] = {
PHP_ME(DateTimeImmutable, __construct, arginfo_date_create, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
PHP_ME(DateTime, __wakeup, NULL, ZEND_ACC_PUBLIC)
PHP_ME(DateTimeImmutable, __set_state, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
@@ -520,7 +520,7 @@ const zend_function_entry date_funcs_immutable[] = {
PHP_FE_END
};
-const zend_function_entry date_funcs_timezone[] = {
+static const zend_function_entry date_funcs_timezone[] = {
PHP_ME(DateTimeZone, __construct, arginfo_timezone_open, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
PHP_ME(DateTimeZone, __wakeup, NULL, ZEND_ACC_PUBLIC)
PHP_ME(DateTimeZone, __set_state, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
@@ -533,7 +533,7 @@ const zend_function_entry date_funcs_timezone[] = {
PHP_FE_END
};
-const zend_function_entry date_funcs_interval[] = {
+static const zend_function_entry date_funcs_interval[] = {
PHP_ME(DateInterval, __construct, arginfo_date_interval_construct, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
PHP_ME(DateInterval, __wakeup, NULL, ZEND_ACC_PUBLIC)
PHP_ME(DateInterval, __set_state, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
@@ -542,7 +542,7 @@ const zend_function_entry date_funcs_interval[] = {
PHP_FE_END
};
-const zend_function_entry date_funcs_period[] = {
+static const zend_function_entry date_funcs_period[] = {
PHP_ME(DatePeriod, __construct, arginfo_date_period_construct, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
PHP_ME(DatePeriod, __wakeup, NULL, ZEND_ACC_PUBLIC)
PHP_ME(DatePeriod, __set_state, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
diff --git a/ext/dba/dba.c b/ext/dba/dba.c
index 9da1ba500e..764ce2d933 100644
--- a/ext/dba/dba.c
+++ b/ext/dba/dba.c
@@ -131,7 +131,7 @@ ZEND_END_ARG_INFO()
/* {{{ dba_functions[]
*/
-const zend_function_entry dba_functions[] = {
+static const zend_function_entry dba_functions[] = {
PHP_FE(dba_open, arginfo_dba_open)
PHP_FE(dba_popen, arginfo_dba_popen)
PHP_FE(dba_close, arginfo_dba_close)
diff --git a/ext/enchant/enchant.c b/ext/enchant/enchant.c
index be79035bba..6fef025a70 100644
--- a/ext/enchant/enchant.c
+++ b/ext/enchant/enchant.c
@@ -122,7 +122,7 @@ ZEND_END_ARG_INFO()
*
* Every user visible function must have an entry in enchant_functions[].
*/
-zend_function_entry enchant_functions[] = {
+static const zend_function_entry enchant_functions[] = {
PHP_FE(enchant_broker_init, arginfo_enchant_broker_init)
PHP_FE(enchant_broker_free, arginfo_enchant_broker_free)
PHP_FE(enchant_broker_get_error, arginfo_enchant_broker_free)
diff --git a/ext/exif/exif.c b/ext/exif/exif.c
index 67e1878e88..82e246c3f0 100644
--- a/ext/exif/exif.c
+++ b/ext/exif/exif.c
@@ -97,7 +97,7 @@ ZEND_END_ARG_INFO()
/* {{{ exif_functions[]
*/
-const zend_function_entry exif_functions[] = {
+static const zend_function_entry exif_functions[] = {
PHP_FE(exif_read_data, arginfo_exif_read_data)
PHP_DEP_FALIAS(read_exif_data, exif_read_data, arginfo_exif_read_data)
PHP_FE(exif_tagname, arginfo_exif_tagname)
diff --git a/ext/fileinfo/fileinfo.c b/ext/fileinfo/fileinfo.c
index 9fbf51087d..85aaa6b6e8 100644
--- a/ext/fileinfo/fileinfo.c
+++ b/ext/fileinfo/fileinfo.c
@@ -162,7 +162,7 @@ ZEND_END_ARG_INFO()
/* {{{ finfo_class_functions
*/
-zend_function_entry finfo_class_functions[] = {
+static const zend_function_entry finfo_class_functions[] = {
ZEND_ME_MAPPING(finfo, finfo_open, arginfo_finfo_open, ZEND_ACC_PUBLIC)
ZEND_ME_MAPPING(set_flags, finfo_set_flags,arginfo_finfo_method_set_flags, ZEND_ACC_PUBLIC)
ZEND_ME_MAPPING(file, finfo_file, arginfo_finfo_method_file, ZEND_ACC_PUBLIC)
@@ -196,7 +196,7 @@ void finfo_resource_destructor(zend_resource *rsrc) /* {{{ */
/* {{{ fileinfo_functions[]
*/
-zend_function_entry fileinfo_functions[] = {
+static const zend_function_entry fileinfo_functions[] = {
PHP_FE(finfo_open, arginfo_finfo_open)
PHP_FE(finfo_close, arginfo_finfo_close)
PHP_FE(finfo_set_flags, arginfo_finfo_set_flags)
diff --git a/ext/ftp/php_ftp.c b/ext/ftp/php_ftp.c
index 403b9602e8..23c2645b8e 100644
--- a/ext/ftp/php_ftp.c
+++ b/ext/ftp/php_ftp.c
@@ -249,7 +249,7 @@ ZEND_END_ARG_INFO()
/* }}} */
-const zend_function_entry php_ftp_functions[] = {
+static const zend_function_entry php_ftp_functions[] = {
PHP_FE(ftp_connect, arginfo_ftp_connect)
#ifdef HAVE_FTP_SSL
PHP_FE(ftp_ssl_connect, arginfo_ftp_ssl_connect)
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index 88f66e3558..f234e3693d 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -863,7 +863,7 @@ ZEND_END_ARG_INFO()
/* {{{ gd_functions[]
*/
-const zend_function_entry gd_functions[] = {
+static const zend_function_entry gd_functions[] = {
PHP_FE(gd_info, arginfo_gd_info)
PHP_FE(imagearc, arginfo_imagearc)
PHP_FE(imageellipse, arginfo_imageellipse)
diff --git a/ext/gettext/gettext.c b/ext/gettext/gettext.c
index f4d6694cee..bbca3fe169 100644
--- a/ext/gettext/gettext.c
+++ b/ext/gettext/gettext.c
@@ -92,7 +92,7 @@ ZEND_END_ARG_INFO()
/* {{{ php_gettext_functions[]
*/
-const zend_function_entry php_gettext_functions[] = {
+static const zend_function_entry php_gettext_functions[] = {
PHP_NAMED_FE(textdomain, zif_textdomain, arginfo_textdomain)
PHP_NAMED_FE(gettext, zif_gettext, arginfo_gettext)
/* Alias for gettext() */
diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c
index ef9f070f49..85a2258e19 100644
--- a/ext/gmp/gmp.c
+++ b/ext/gmp/gmp.c
@@ -139,7 +139,7 @@ static ZEND_GINIT_FUNCTION(gmp);
/* {{{ gmp_functions[]
*/
-const zend_function_entry gmp_functions[] = {
+static const zend_function_entry gmp_functions[] = {
ZEND_FE(gmp_init, arginfo_gmp_init)
ZEND_FE(gmp_import, arginfo_gmp_import)
ZEND_FE(gmp_export, arginfo_gmp_export)
diff --git a/ext/hash/hash.c b/ext/hash/hash.c
index c7c457945e..5a4204a81c 100644
--- a/ext/hash/hash.c
+++ b/ext/hash/hash.c
@@ -887,7 +887,7 @@ static PHP_METHOD(HashContext, __construct) {
}
/* }}} */
-static zend_function_entry php_hashcontext_methods[] = {
+static const zend_function_entry php_hashcontext_methods[] = {
PHP_ME(HashContext, __construct, NULL, ZEND_ACC_PRIVATE | ZEND_ACC_CTOR)
PHP_FE_END
};
@@ -1430,7 +1430,7 @@ ZEND_END_ARG_INFO()
/* {{{ hash_functions[]
*/
-const zend_function_entry hash_functions[] = {
+static const zend_function_entry hash_functions[] = {
PHP_FE(hash, arginfo_hash)
PHP_FE(hash_file, arginfo_hash_file)
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c
index c8aa7fcd12..7a5e846444 100644
--- a/ext/iconv/iconv.c
+++ b/ext/iconv/iconv.c
@@ -125,7 +125,7 @@ ZEND_END_ARG_INFO()
/* {{{ iconv_functions[]
*/
-const zend_function_entry iconv_functions[] = {
+static const zend_function_entry iconv_functions[] = {
PHP_RAW_NAMED_FE(iconv,php_if_iconv, arginfo_iconv)
PHP_FE(iconv_get_encoding, arginfo_iconv_get_encoding)
PHP_FE(iconv_set_encoding, arginfo_iconv_set_encoding)
diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c
index 1dd4878d2f..53f5007994 100644
--- a/ext/imap/php_imap.c
+++ b/ext/imap/php_imap.c
@@ -468,7 +468,7 @@ ZEND_END_ARG_INFO()
/* {{{ imap_functions[]
*/
-const zend_function_entry imap_functions[] = {
+static const zend_function_entry imap_functions[] = {
PHP_FE(imap_open, arginfo_imap_open)
PHP_FE(imap_reopen, arginfo_imap_reopen)
PHP_FE(imap_close, arginfo_imap_close)
diff --git a/ext/interbase/interbase.c b/ext/interbase/interbase.c
index e777962f53..099d1ad7d5 100644
--- a/ext/interbase/interbase.c
+++ b/ext/interbase/interbase.c
@@ -318,7 +318,7 @@ ZEND_END_ARG_INFO()
/* }}} */
/* {{{ extension definition structures */
-const zend_function_entry ibase_functions[] = {
+static const zend_function_entry ibase_functions[] = {
PHP_FE(ibase_connect, arginfo_ibase_connect)
PHP_FE(ibase_pconnect, arginfo_ibase_pconnect)
PHP_FE(ibase_close, arginfo_ibase_close)
diff --git a/ext/intl/collator/collator_class.c b/ext/intl/collator/collator_class.c
index fd2a616feb..42562eae48 100644
--- a/ext/intl/collator/collator_class.c
+++ b/ext/intl/collator/collator_class.c
@@ -96,7 +96,7 @@ ZEND_END_ARG_INFO()
* Every 'Collator' class method has an entry in this table
*/
-zend_function_entry Collator_class_functions[] = {
+static const zend_function_entry Collator_class_functions[] = {
PHP_ME( Collator, __construct, collator_1_arg, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR )
ZEND_FENTRY( create, ZEND_FN( collator_create ), collator_1_arg, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
PHP_NAMED_FE( compare, ZEND_FN( collator_compare ), collator_2_args )
diff --git a/ext/intl/common/common_enum.cpp b/ext/intl/common/common_enum.cpp
index 8c964bdd25..9b95f25528 100644
--- a/ext/intl/common/common_enum.cpp
+++ b/ext/intl/common/common_enum.cpp
@@ -296,7 +296,7 @@ static PHP_METHOD(IntlIterator, valid)
ZEND_BEGIN_ARG_INFO_EX(ainfo_se_void, 0, 0, 0)
ZEND_END_ARG_INFO()
-static zend_function_entry IntlIterator_class_functions[] = {
+static const zend_function_entry IntlIterator_class_functions[] = {
PHP_ME(IntlIterator, current, ainfo_se_void, ZEND_ACC_PUBLIC)
PHP_ME(IntlIterator, key, ainfo_se_void, ZEND_ACC_PUBLIC)
PHP_ME(IntlIterator, next, ainfo_se_void, ZEND_ACC_PUBLIC)
diff --git a/ext/intl/converter/converter.c b/ext/intl/converter/converter.c
index bab4bb9881..b71e2b9fef 100644
--- a/ext/intl/converter/converter.c
+++ b/ext/intl/converter/converter.c
@@ -963,7 +963,7 @@ static PHP_METHOD(UConverter, getStandards) {
}
/* }}} */
-static zend_function_entry php_converter_methods[] = {
+static const zend_function_entry php_converter_methods[] = {
PHP_ME(UConverter, __construct, php_converter_arginfo, ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
/* Encoding selection */
diff --git a/ext/intl/dateformat/dateformat_class.c b/ext/intl/dateformat/dateformat_class.c
index 378c5a8be1..c8a2e22e90 100644
--- a/ext/intl/dateformat/dateformat_class.c
+++ b/ext/intl/dateformat/dateformat_class.c
@@ -157,7 +157,7 @@ ZEND_END_ARG_INFO()
/* {{{ IntlDateFormatter_class_functions
* Every 'IntlDateFormatter' class method has an entry in this table
*/
-static zend_function_entry IntlDateFormatter_class_functions[] = {
+static const zend_function_entry IntlDateFormatter_class_functions[] = {
PHP_ME( IntlDateFormatter, __construct, arginfo_intldateformatter___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR )
ZEND_FENTRY( create, ZEND_FN( datefmt_create ), arginfo_intldateformatter___construct, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
PHP_NAMED_FE( getDateType, ZEND_FN( datefmt_get_datetype ), arginfo_intldateformatter_getdatetype )
diff --git a/ext/intl/formatter/formatter_class.c b/ext/intl/formatter/formatter_class.c
index d15311201e..22a2a4e3e3 100644
--- a/ext/intl/formatter/formatter_class.c
+++ b/ext/intl/formatter/formatter_class.c
@@ -150,7 +150,7 @@ ZEND_END_ARG_INFO()
/* {{{ NumberFormatter_class_functions
* Every 'NumberFormatter' class method has an entry in this table
*/
-static zend_function_entry NumberFormatter_class_functions[] = {
+static const zend_function_entry NumberFormatter_class_functions[] = {
PHP_ME( NumberFormatter, __construct, arginfo_numberformatter___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR )
ZEND_FENTRY( create, ZEND_FN( numfmt_create ), arginfo_numberformatter___construct, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
PHP_NAMED_FE( format, ZEND_FN( numfmt_format ), arginfo_numberformatter_format )
diff --git a/ext/intl/locale/locale_class.c b/ext/intl/locale/locale_class.c
index d132ef8c76..d59536955e 100644
--- a/ext/intl/locale/locale_class.c
+++ b/ext/intl/locale/locale_class.c
@@ -74,7 +74,7 @@ ZEND_END_ARG_INFO()
* Every 'Locale' class method has an entry in this table
*/
-zend_function_entry Locale_class_functions[] = {
+static const zend_function_entry Locale_class_functions[] = {
ZEND_FENTRY( getDefault, zif_locale_get_default , locale_0_args , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
ZEND_FENTRY( setDefault, zif_locale_set_default , locale_arg_locale , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
ZEND_FENTRY( getPrimaryLanguage, ZEND_FN( locale_get_primary_language ), locale_arg_locale , ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
diff --git a/ext/intl/msgformat/msgformat_class.c b/ext/intl/msgformat/msgformat_class.c
index aa7b839904..a61d8f4d3e 100644
--- a/ext/intl/msgformat/msgformat_class.c
+++ b/ext/intl/msgformat/msgformat_class.c
@@ -124,7 +124,7 @@ ZEND_END_ARG_INFO()
/* {{{ MessageFormatter_class_functions
* Every 'MessageFormatter' class method has an entry in this table
*/
-static zend_function_entry MessageFormatter_class_functions[] = {
+static const zend_function_entry MessageFormatter_class_functions[] = {
PHP_ME( MessageFormatter, __construct, arginfo_messageformatter___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR )
ZEND_FENTRY( create, ZEND_FN( msgfmt_create ), arginfo_messageformatter___construct, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
PHP_NAMED_FE( format, ZEND_FN( msgfmt_format ), arginfo_messageformatter_format )
diff --git a/ext/intl/normalizer/normalizer_class.c b/ext/intl/normalizer/normalizer_class.c
index 894a3893f7..87b274ebfc 100644
--- a/ext/intl/normalizer/normalizer_class.c
+++ b/ext/intl/normalizer/normalizer_class.c
@@ -40,7 +40,7 @@ ZEND_END_ARG_INFO()
* Every 'Normalizer' class method has an entry in this table
*/
-zend_function_entry Normalizer_class_functions[] = {
+static const zend_function_entry Normalizer_class_functions[] = {
ZEND_FENTRY( normalize, ZEND_FN( normalizer_normalize ), normalizer_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
ZEND_FENTRY( isNormalized, ZEND_FN( normalizer_is_normalized ), normalizer_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
PHP_FE_END
diff --git a/ext/intl/php_intl.c b/ext/intl/php_intl.c
index b97004d03f..7b2f206e52 100644
--- a/ext/intl/php_intl.c
+++ b/ext/intl/php_intl.c
@@ -624,7 +624,7 @@ ZEND_END_ARG_INFO()
*
* Every user visible function must have an entry in intl_functions[].
*/
-zend_function_entry intl_functions[] = {
+static const zend_function_entry intl_functions[] = {
/* collator functions */
PHP_FE( collator_create, collator_static_1_arg )
diff --git a/ext/intl/resourcebundle/resourcebundle_class.c b/ext/intl/resourcebundle/resourcebundle_class.c
index 3850a3b22e..7cd6d2be09 100644
--- a/ext/intl/resourcebundle/resourcebundle_class.c
+++ b/ext/intl/resourcebundle/resourcebundle_class.c
@@ -420,7 +420,7 @@ PHP_FUNCTION( resourcebundle_get_error_message )
/* {{{ ResourceBundle_class_functions
* Every 'ResourceBundle' class method has an entry in this table
*/
-static zend_function_entry ResourceBundle_class_functions[] = {
+static const zend_function_entry ResourceBundle_class_functions[] = {
PHP_ME( ResourceBundle, __construct, arginfo_resourcebundle___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR )
ZEND_NAMED_ME( create, ZEND_FN( resourcebundle_create ), arginfo_resourcebundle___construct, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
ZEND_NAMED_ME( get, ZEND_FN(resourcebundle_get), arginfo_resourcebundle_get, ZEND_ACC_PUBLIC )
diff --git a/ext/intl/spoofchecker/spoofchecker_class.c b/ext/intl/spoofchecker/spoofchecker_class.c
index 8b4274d374..f94220526d 100644
--- a/ext/intl/spoofchecker/spoofchecker_class.c
+++ b/ext/intl/spoofchecker/spoofchecker_class.c
@@ -95,7 +95,7 @@ ZEND_END_ARG_INFO()
* Every 'Spoofchecker' class method has an entry in this table
*/
-zend_function_entry Spoofchecker_class_functions[] = {
+static const zend_function_entry Spoofchecker_class_functions[] = {
PHP_ME(Spoofchecker, __construct, spoofchecker_0_args, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR)
PHP_ME(Spoofchecker, isSuspicious, spoofchecker_is_suspicous, ZEND_ACC_PUBLIC)
PHP_ME(Spoofchecker, areConfusable, spoofchecker_are_confusable, ZEND_ACC_PUBLIC)
diff --git a/ext/intl/timezone/timezone_class.cpp b/ext/intl/timezone/timezone_class.cpp
index c6f4dd5447..223fad06b7 100644
--- a/ext/intl/timezone/timezone_class.cpp
+++ b/ext/intl/timezone/timezone_class.cpp
@@ -454,7 +454,7 @@ ZEND_END_ARG_INFO()
/* {{{ TimeZone_class_functions
* Every 'IntlTimeZone' class method has an entry in this table
*/
-static zend_function_entry TimeZone_class_functions[] = {
+static const zend_function_entry TimeZone_class_functions[] = {
PHP_ME(IntlTimeZone, __construct, ainfo_tz_void, ZEND_ACC_PRIVATE)
PHP_ME_MAPPING(createTimeZone, intltz_create_time_zone, ainfo_tz_idarg, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
PHP_ME_MAPPING(fromDateTimeZone, intltz_from_date_time_zone, ainfo_tz_idarg, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
diff --git a/ext/intl/transliterator/transliterator_class.c b/ext/intl/transliterator/transliterator_class.c
index 1b0b99be97..77a0fcf3d9 100644
--- a/ext/intl/transliterator/transliterator_class.c
+++ b/ext/intl/transliterator/transliterator_class.c
@@ -311,7 +311,7 @@ ZEND_END_ARG_INFO()
/* {{{ Transliterator_class_functions
* Every 'Transliterator' class method has an entry in this table
*/
-zend_function_entry Transliterator_class_functions[] = {
+static const zend_function_entry Transliterator_class_functions[] = {
PHP_ME( Transliterator, __construct, ainfo_trans_void, ZEND_ACC_PRIVATE | ZEND_ACC_CTOR | ZEND_ACC_FINAL )
PHP_ME_MAPPING( create, transliterator_create, ainfo_trans_create, ZEND_ACC_STATIC |ZEND_ACC_PUBLIC )
PHP_ME_MAPPING( createFromRules,transliterator_create_from_rules, ainfo_trans_create_from_rules, ZEND_ACC_STATIC | ZEND_ACC_PUBLIC )
diff --git a/ext/intl/uchar/uchar.c b/ext/intl/uchar/uchar.c
index 1add74b2b5..770622eca7 100644
--- a/ext/intl/uchar/uchar.c
+++ b/ext/intl/uchar/uchar.c
@@ -665,7 +665,7 @@ IC_CHAR_METHOD_CHAR(getBidiPairedBracket)
#undef IC_CHAR_METHOD_CHAR
/* }}} */
-static zend_function_entry intlchar_methods[] = {
+static const zend_function_entry intlchar_methods[] = {
#define IC_ME(mname) PHP_ME(IntlChar, mname, mname##_arginfo, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
IC_ME(chr)
IC_ME(ord)
diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c
index bd7e8ac64c..38ca79fe27 100644
--- a/ext/ldap/ldap.c
+++ b/ext/ldap/ldap.c
@@ -4777,7 +4777,7 @@ ZEND_END_ARG_INFO()
*/
/* {{{ ldap_functions[]
*/
-const zend_function_entry ldap_functions[] = {
+static const zend_function_entry ldap_functions[] = {
PHP_FE(ldap_connect, arginfo_ldap_connect)
PHP_FALIAS(ldap_close, ldap_unbind, arginfo_ldap_resource)
PHP_FE(ldap_bind, arginfo_ldap_bind)
diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c
index 7b3297ba6b..dbb6bf9373 100644
--- a/ext/mbstring/mbstring.c
+++ b/ext/mbstring/mbstring.c
@@ -518,7 +518,7 @@ ZEND_END_ARG_INFO()
/* }}} */
/* {{{ zend_function_entry mbstring_functions[] */
-const zend_function_entry mbstring_functions[] = {
+static const zend_function_entry mbstring_functions[] = {
PHP_FE(mb_convert_case, arginfo_mb_convert_case)
PHP_FE(mb_strtoupper, arginfo_mb_strtoupper)
PHP_FE(mb_strtolower, arginfo_mb_strtolower)
diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c
index 6b742560c5..b6f829f9f7 100644
--- a/ext/mbstring/php_mbregex.c
+++ b/ext/mbstring/php_mbregex.c
@@ -183,7 +183,7 @@ typedef struct _php_mb_regex_enc_name_map_t {
OnigEncoding code;
} php_mb_regex_enc_name_map_t;
-php_mb_regex_enc_name_map_t enc_name_map[] = {
+static const php_mb_regex_enc_name_map_t enc_name_map[] = {
#ifdef ONIG_ENCODING_EUC_JP
{
"EUC-JP\0EUCJP\0X-EUC-JP\0UJIS\0EUCJP\0EUCJP-WIN\0",
@@ -366,7 +366,7 @@ php_mb_regex_enc_name_map_t enc_name_map[] = {
static OnigEncoding _php_mb_regex_name2mbctype(const char *pname)
{
const char *p;
- php_mb_regex_enc_name_map_t *mapping;
+ const php_mb_regex_enc_name_map_t *mapping;
if (pname == NULL || !*pname) {
return ONIG_ENCODING_UNDEF;
@@ -387,7 +387,7 @@ static OnigEncoding _php_mb_regex_name2mbctype(const char *pname)
/* {{{ php_mb_regex_mbctype2name */
static const char *_php_mb_regex_mbctype2name(OnigEncoding mbctype)
{
- php_mb_regex_enc_name_map_t *mapping;
+ const php_mb_regex_enc_name_map_t *mapping;
for (mapping = enc_name_map; mapping->names != NULL; mapping++) {
if (mapping->code == mbctype) {
diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c
index 8bfa5b3dad..a2eb8ee41b 100644
--- a/ext/odbc/php_odbc.c
+++ b/ext/odbc/php_odbc.c
@@ -323,7 +323,7 @@ ZEND_END_ARG_INFO()
/* {{{ odbc_functions[]
*/
-const zend_function_entry odbc_functions[] = {
+static const zend_function_entry odbc_functions[] = {
PHP_FE(odbc_autocommit, arginfo_odbc_autocommit)
PHP_FE(odbc_binmode, arginfo_odbc_binmode)
PHP_FE(odbc_close, arginfo_odbc_close)
diff --git a/ext/opcache/zend_accelerator_module.c b/ext/opcache/zend_accelerator_module.c
index ffd291d8b6..aa627f028b 100644
--- a/ext/opcache/zend_accelerator_module.c
+++ b/ext/opcache/zend_accelerator_module.c
@@ -71,7 +71,7 @@ static ZEND_FUNCTION(opcache_get_status);
static ZEND_FUNCTION(opcache_compile_file);
static ZEND_FUNCTION(opcache_get_configuration);
-static zend_function_entry accel_functions[] = {
+static const zend_function_entry accel_functions[] = {
/* User functions */
ZEND_FE(opcache_reset, arginfo_opcache_none)
ZEND_FE(opcache_invalidate, arginfo_opcache_invalidate)
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
index 3721a870c5..a9915aebee 100644
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -457,7 +457,7 @@ ZEND_END_ARG_INFO()
/* {{{ openssl_functions[]
*/
-const zend_function_entry openssl_functions[] = {
+static const zend_function_entry openssl_functions[] = {
PHP_FE(openssl_get_cert_locations, arginfo_openssl_get_cert_locations)
/* spki functions */
diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c
index 52d107419d..8d338d342b 100644
--- a/ext/pcntl/pcntl.c
+++ b/ext/pcntl/pcntl.c
@@ -170,7 +170,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_pcntl_async_signals, 0, 0, 1)
ZEND_END_ARG_INFO()
/* }}} */
-const zend_function_entry pcntl_functions[] = {
+static const zend_function_entry pcntl_functions[] = {
PHP_FE(pcntl_fork, arginfo_pcntl_void)
PHP_FE(pcntl_waitpid, arginfo_pcntl_waitpid)
PHP_FE(pcntl_wait, arginfo_pcntl_wait)
diff --git a/ext/pdo/pdo.c b/ext/pdo/pdo.c
index b89c951755..77f731a666 100644
--- a/ext/pdo/pdo.c
+++ b/ext/pdo/pdo.c
@@ -156,7 +156,7 @@ static PHP_GINIT_FUNCTION(pdo)
}
/* }}} */
-PDO_API int php_pdo_register_driver(pdo_driver_t *driver) /* {{{ */
+PDO_API int php_pdo_register_driver(const pdo_driver_t *driver) /* {{{ */
{
if (driver->api_version != PDO_DRIVER_API) {
zend_error(E_ERROR, "PDO: driver %s requires PDO API version " ZEND_ULONG_FMT "; this is PDO version %d",
@@ -168,11 +168,11 @@ PDO_API int php_pdo_register_driver(pdo_driver_t *driver) /* {{{ */
return FAILURE; /* NOTREACHED */
}
- return zend_hash_str_add_ptr(&pdo_driver_hash, (char*)driver->driver_name, driver->driver_name_len, driver) != NULL;
+ return zend_hash_str_add_ptr(&pdo_driver_hash, (char*)driver->driver_name, driver->driver_name_len, (void*)driver) != NULL;
}
/* }}} */
-PDO_API void php_pdo_unregister_driver(pdo_driver_t *driver) /* {{{ */
+PDO_API void php_pdo_unregister_driver(const pdo_driver_t *driver) /* {{{ */
{
if (!zend_hash_str_exists(&module_registry, "pdo", sizeof("pdo") - 1)) {
return;
diff --git a/ext/pdo/php_pdo_driver.h b/ext/pdo/php_pdo_driver.h
index bcbe5b3672..578f3a3ac1 100644
--- a/ext/pdo/php_pdo_driver.h
+++ b/ext/pdo/php_pdo_driver.h
@@ -435,7 +435,7 @@ enum pdo_placeholder_support {
struct _pdo_dbh_t {
/* driver specific methods */
- struct pdo_dbh_methods *methods;
+ const struct pdo_dbh_methods *methods;
/* driver specific data */
void *driver_data;
@@ -661,9 +661,9 @@ struct _pdo_row_t {
};
/* call this in MINIT to register your PDO driver */
-PDO_API int php_pdo_register_driver(pdo_driver_t *driver);
+PDO_API int php_pdo_register_driver(const pdo_driver_t *driver);
/* call this in MSHUTDOWN to unregister your PDO driver */
-PDO_API void php_pdo_unregister_driver(pdo_driver_t *driver);
+PDO_API void php_pdo_unregister_driver(const pdo_driver_t *driver);
/* For the convenience of drivers, this function will parse a data source
* string, of the form "name=value; name2=value2" and populate variables
diff --git a/ext/pdo_dblib/dblib_driver.c b/ext/pdo_dblib/dblib_driver.c
index 502238219f..b12cf4fc70 100644
--- a/ext/pdo_dblib/dblib_driver.c
+++ b/ext/pdo_dblib/dblib_driver.c
@@ -406,7 +406,7 @@ static int dblib_get_attribute(pdo_dbh_t *dbh, zend_long attr, zval *return_valu
return 1;
}
-static struct pdo_dbh_methods dblib_methods = {
+static const struct pdo_dbh_methods dblib_methods = {
dblib_handle_closer,
dblib_handle_preparer,
dblib_handle_doer,
@@ -600,7 +600,7 @@ cleanup:
return ret;
}
-pdo_driver_t pdo_dblib_driver = {
+const pdo_driver_t pdo_dblib_driver = {
#if PDO_DBLIB_IS_MSSQL
PDO_DRIVER_HEADER(mssql),
#elif defined(PHP_WIN32)
diff --git a/ext/pdo_dblib/pdo_dblib.c b/ext/pdo_dblib/pdo_dblib.c
index 223d7bc18d..1dc9799ce0 100644
--- a/ext/pdo_dblib/pdo_dblib.c
+++ b/ext/pdo_dblib/pdo_dblib.c
@@ -35,7 +35,7 @@
ZEND_DECLARE_MODULE_GLOBALS(dblib)
static PHP_GINIT_FUNCTION(dblib);
-const zend_function_entry pdo_dblib_functions[] = {
+static const zend_function_entry pdo_dblib_functions[] = {
PHP_FE_END
};
diff --git a/ext/pdo_dblib/php_pdo_dblib_int.h b/ext/pdo_dblib/php_pdo_dblib_int.h
index cae7b77394..91fe464daf 100644
--- a/ext/pdo_dblib/php_pdo_dblib_int.h
+++ b/ext/pdo_dblib/php_pdo_dblib_int.h
@@ -104,7 +104,7 @@ int pdo_dblib_error_handler(DBPROCESS *dbproc, int severity, int dberr,
int pdo_dblib_msg_handler(DBPROCESS *dbproc, DBINT msgno, int msgstate,
int severity, char *msgtext, char *srvname, char *procname, DBUSMALLINT line);
-extern pdo_driver_t pdo_dblib_driver;
+extern const pdo_driver_t pdo_dblib_driver;
extern struct pdo_stmt_methods dblib_stmt_methods;
typedef struct {
diff --git a/ext/pdo_firebird/firebird_driver.c b/ext/pdo_firebird/firebird_driver.c
index 83203d7804..a00a9270db 100644
--- a/ext/pdo_firebird/firebird_driver.c
+++ b/ext/pdo_firebird/firebird_driver.c
@@ -595,7 +595,7 @@ static int pdo_firebird_fetch_error_func(pdo_dbh_t *dbh, pdo_stmt_t *stmt, zval
}
/* }}} */
-static struct pdo_dbh_methods firebird_methods = { /* {{{ */
+static const struct pdo_dbh_methods firebird_methods = { /* {{{ */
firebird_handle_closer,
firebird_handle_preparer,
firebird_handle_doer,
@@ -680,7 +680,7 @@ static int pdo_firebird_handle_factory(pdo_dbh_t *dbh, zval *driver_options) /*
/* }}} */
-pdo_driver_t pdo_firebird_driver = { /* {{{ */
+const pdo_driver_t pdo_firebird_driver = { /* {{{ */
PDO_DRIVER_HEADER(firebird),
pdo_firebird_handle_factory
};
diff --git a/ext/pdo_firebird/pdo_firebird.c b/ext/pdo_firebird/pdo_firebird.c
index 7ea1b4fbdc..1cc1b970fc 100644
--- a/ext/pdo_firebird/pdo_firebird.c
+++ b/ext/pdo_firebird/pdo_firebird.c
@@ -28,7 +28,7 @@
#include "php_pdo_firebird.h"
#include "php_pdo_firebird_int.h"
-const zend_function_entry pdo_firebird_functions[] = { /* {{{ */
+static const zend_function_entry pdo_firebird_functions[] = { /* {{{ */
PHP_FE_END
};
/* }}} */
diff --git a/ext/pdo_firebird/php_pdo_firebird_int.h b/ext/pdo_firebird/php_pdo_firebird_int.h
index 3d14dacdf8..47bfc18e4b 100644
--- a/ext/pdo_firebird/php_pdo_firebird_int.h
+++ b/ext/pdo_firebird/php_pdo_firebird_int.h
@@ -130,7 +130,7 @@ typedef struct {
} pdo_firebird_stmt;
-extern pdo_driver_t pdo_firebird_driver;
+extern const pdo_driver_t pdo_firebird_driver;
extern struct pdo_stmt_methods firebird_stmt_methods;
diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c
index ec7d5b8ea7..dcad8ef6c7 100644
--- a/ext/pdo_mysql/mysql_driver.c
+++ b/ext/pdo_mysql/mysql_driver.c
@@ -512,7 +512,7 @@ static int pdo_mysql_check_liveness(pdo_dbh_t *dbh)
/* }}} */
/* {{{ mysql_methods */
-static struct pdo_dbh_methods mysql_methods = {
+static const struct pdo_dbh_methods mysql_methods = {
mysql_handle_closer,
mysql_handle_preparer,
mysql_handle_doer,
@@ -819,7 +819,7 @@ cleanup:
}
/* }}} */
-pdo_driver_t pdo_mysql_driver = {
+const pdo_driver_t pdo_mysql_driver = {
PDO_DRIVER_HEADER(mysql),
pdo_mysql_handle_factory
};
diff --git a/ext/pdo_mysql/pdo_mysql.c b/ext/pdo_mysql/pdo_mysql.c
index 92279a56c8..d7e5e809e7 100644
--- a/ext/pdo_mysql/pdo_mysql.c
+++ b/ext/pdo_mysql/pdo_mysql.c
@@ -226,7 +226,7 @@ ZEND_TSRMLS_CACHE_UPDATE();
/* }}} */
/* {{{ pdo_mysql_functions[] */
-const zend_function_entry pdo_mysql_functions[] = {
+static const zend_function_entry pdo_mysql_functions[] = {
PHP_FE_END
};
/* }}} */
diff --git a/ext/pdo_mysql/php_pdo_mysql_int.h b/ext/pdo_mysql/php_pdo_mysql_int.h
index 32e79e111c..6e7d840d7a 100644
--- a/ext/pdo_mysql/php_pdo_mysql_int.h
+++ b/ext/pdo_mysql/php_pdo_mysql_int.h
@@ -149,7 +149,7 @@ typedef struct {
unsigned max_length:1;
} pdo_mysql_stmt;
-extern pdo_driver_t pdo_mysql_driver;
+extern const pdo_driver_t pdo_mysql_driver;
extern int _pdo_mysql_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *file, int line);
#define pdo_mysql_error(s) _pdo_mysql_error(s, NULL, __FILE__, __LINE__)
diff --git a/ext/pdo_oci/oci_driver.c b/ext/pdo_oci/oci_driver.c
index 60205a8e31..04d8d3eb24 100644
--- a/ext/pdo_oci/oci_driver.c
+++ b/ext/pdo_oci/oci_driver.c
@@ -569,7 +569,7 @@ static int pdo_oci_check_liveness(pdo_dbh_t *dbh) /* {{{ */
}
/* }}} */
-static struct pdo_dbh_methods oci_methods = {
+static const struct pdo_dbh_methods oci_methods = {
oci_handle_closer,
oci_handle_preparer,
oci_handle_doer,
@@ -721,7 +721,7 @@ cleanup:
}
/* }}} */
-pdo_driver_t pdo_oci_driver = {
+const pdo_driver_t pdo_oci_driver = {
PDO_DRIVER_HEADER(oci),
pdo_oci_handle_factory
};
diff --git a/ext/pdo_oci/pdo_oci.c b/ext/pdo_oci/pdo_oci.c
index 9ecb7e6c5a..c3f34f57b3 100644
--- a/ext/pdo_oci/pdo_oci.c
+++ b/ext/pdo_oci/pdo_oci.c
@@ -34,7 +34,7 @@
#endif
/* {{{ pdo_oci_functions[] */
-const zend_function_entry pdo_oci_functions[] = {
+static const zend_function_entry pdo_oci_functions[] = {
PHP_FE_END
};
/* }}} */
diff --git a/ext/pdo_oci/php_pdo_oci_int.h b/ext/pdo_oci/php_pdo_oci_int.h
index 5d066e53b8..88f9458e32 100644
--- a/ext/pdo_oci/php_pdo_oci_int.h
+++ b/ext/pdo_oci/php_pdo_oci_int.h
@@ -85,7 +85,7 @@ typedef struct {
} pdo_oci_bound_param;
extern const ub4 PDO_OCI_INIT_MODE;
-extern pdo_driver_t pdo_oci_driver;
+extern const pdo_driver_t pdo_oci_driver;
extern OCIEnv *pdo_oci_Env;
ub4 _oci_error(OCIError *err, pdo_dbh_t *dbh, pdo_stmt_t *stmt, char *what, sword status, int isinit, const char *file, int line);
diff --git a/ext/pdo_odbc/odbc_driver.c b/ext/pdo_odbc/odbc_driver.c
index f347acba31..fef478d628 100644
--- a/ext/pdo_odbc/odbc_driver.c
+++ b/ext/pdo_odbc/odbc_driver.c
@@ -373,7 +373,7 @@ static int odbc_handle_get_attr(pdo_dbh_t *dbh, zend_long attr, zval *val)
return 0;
}
-static struct pdo_dbh_methods odbc_methods = {
+static const struct pdo_dbh_methods odbc_methods = {
odbc_handle_closer,
odbc_handle_preparer,
odbc_handle_doer,
@@ -478,7 +478,7 @@ fail:
}
/* }}} */
-pdo_driver_t pdo_odbc_driver = {
+const pdo_driver_t pdo_odbc_driver = {
PDO_DRIVER_HEADER(odbc),
pdo_odbc_handle_factory
};
diff --git a/ext/pdo_odbc/pdo_odbc.c b/ext/pdo_odbc/pdo_odbc.c
index 8af2e5e7b3..aab99f423a 100644
--- a/ext/pdo_odbc/pdo_odbc.c
+++ b/ext/pdo_odbc/pdo_odbc.c
@@ -31,7 +31,7 @@
#include "php_pdo_odbc_int.h"
/* {{{ pdo_odbc_functions[] */
-const zend_function_entry pdo_odbc_functions[] = {
+static const zend_function_entry pdo_odbc_functions[] = {
PHP_FE_END
};
/* }}} */
diff --git a/ext/pdo_odbc/php_pdo_odbc_int.h b/ext/pdo_odbc/php_pdo_odbc_int.h
index 28ebf10b96..a94181fe4a 100644
--- a/ext/pdo_odbc/php_pdo_odbc_int.h
+++ b/ext/pdo_odbc/php_pdo_odbc_int.h
@@ -164,7 +164,7 @@ typedef struct {
unsigned _spare:31;
} pdo_odbc_param;
-extern pdo_driver_t pdo_odbc_driver;
+extern const pdo_driver_t pdo_odbc_driver;
extern struct pdo_stmt_methods odbc_stmt_methods;
void pdo_odbc_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, PDO_ODBC_HSTMT statement, char *what, const char *file, int line);
diff --git a/ext/pdo_pgsql/pdo_pgsql.c b/ext/pdo_pgsql/pdo_pgsql.c
index 93712a6af6..e4c0d58d53 100644
--- a/ext/pdo_pgsql/pdo_pgsql.c
+++ b/ext/pdo_pgsql/pdo_pgsql.c
@@ -40,7 +40,7 @@
#endif
/* {{{ pdo_pgsql_functions[] */
-const zend_function_entry pdo_pgsql_functions[] = {
+static const zend_function_entry pdo_pgsql_functions[] = {
PHP_FE_END
};
/* }}} */
diff --git a/ext/pdo_pgsql/pgsql_driver.c b/ext/pdo_pgsql/pgsql_driver.c
index 52a9b8f285..93e73e8b38 100644
--- a/ext/pdo_pgsql/pgsql_driver.c
+++ b/ext/pdo_pgsql/pgsql_driver.c
@@ -1166,7 +1166,7 @@ static int pdo_pgsql_set_attr(pdo_dbh_t *dbh, zend_long attr, zval *val)
}
}
-static struct pdo_dbh_methods pgsql_methods = {
+static const struct pdo_dbh_methods pgsql_methods = {
pgsql_handle_closer,
pgsql_handle_preparer,
pgsql_handle_doer,
@@ -1263,7 +1263,7 @@ cleanup:
}
/* }}} */
-pdo_driver_t pdo_pgsql_driver = {
+const pdo_driver_t pdo_pgsql_driver = {
PDO_DRIVER_HEADER(pgsql),
pdo_pgsql_handle_factory
};
diff --git a/ext/pdo_pgsql/php_pdo_pgsql_int.h b/ext/pdo_pgsql/php_pdo_pgsql_int.h
index f988335859..916b35c6b6 100644
--- a/ext/pdo_pgsql/php_pdo_pgsql_int.h
+++ b/ext/pdo_pgsql/php_pdo_pgsql_int.h
@@ -77,7 +77,7 @@ typedef struct {
Oid oid;
} pdo_pgsql_bound_param;
-extern pdo_driver_t pdo_pgsql_driver;
+extern const pdo_driver_t pdo_pgsql_driver;
extern int _pdo_pgsql_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, int errcode, const char *sqlstate, const char *msg, const char *file, int line);
#define pdo_pgsql_error(d,e,z) _pdo_pgsql_error(d, NULL, e, z, NULL, __FILE__, __LINE__)
diff --git a/ext/pdo_sqlite/pdo_sqlite.c b/ext/pdo_sqlite/pdo_sqlite.c
index 60e1a07afb..0730bbaec4 100644
--- a/ext/pdo_sqlite/pdo_sqlite.c
+++ b/ext/pdo_sqlite/pdo_sqlite.c
@@ -32,7 +32,7 @@
#include "zend_exceptions.h"
/* {{{ pdo_sqlite_functions[] */
-const zend_function_entry pdo_sqlite_functions[] = {
+static const zend_function_entry pdo_sqlite_functions[] = {
PHP_FE_END
};
/* }}} */
diff --git a/ext/pdo_sqlite/php_pdo_sqlite_int.h b/ext/pdo_sqlite/php_pdo_sqlite_int.h
index 1c90416b9f..073c868484 100644
--- a/ext/pdo_sqlite/php_pdo_sqlite_int.h
+++ b/ext/pdo_sqlite/php_pdo_sqlite_int.h
@@ -68,7 +68,7 @@ typedef struct {
unsigned done:1;
} pdo_sqlite_stmt;
-extern pdo_driver_t pdo_sqlite_driver;
+extern const pdo_driver_t pdo_sqlite_driver;
extern int _pdo_sqlite_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *file, int line);
#define pdo_sqlite_error(s) _pdo_sqlite_error(s, NULL, __FILE__, __LINE__)
diff --git a/ext/pdo_sqlite/sqlite_driver.c b/ext/pdo_sqlite/sqlite_driver.c
index e0627c1e32..b2790ee57e 100644
--- a/ext/pdo_sqlite/sqlite_driver.c
+++ b/ext/pdo_sqlite/sqlite_driver.c
@@ -722,7 +722,7 @@ static void pdo_sqlite_request_shutdown(pdo_dbh_t *dbh)
}
}
-static struct pdo_dbh_methods sqlite_methods = {
+static const struct pdo_dbh_methods sqlite_methods = {
sqlite_handle_closer,
sqlite_handle_preparer,
sqlite_handle_doer,
@@ -845,7 +845,7 @@ cleanup:
}
/* }}} */
-pdo_driver_t pdo_sqlite_driver = {
+const pdo_driver_t pdo_sqlite_driver = {
PDO_DRIVER_HEADER(sqlite),
pdo_sqlite_handle_factory
};
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index 288b5aa44d..416dba2cd8 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -594,7 +594,7 @@ ZEND_END_ARG_INFO()
/* {{{ pgsql_functions[]
*/
-const zend_function_entry pgsql_functions[] = {
+static const zend_function_entry pgsql_functions[] = {
/* connection functions */
PHP_FE(pg_connect, arginfo_pg_connect)
PHP_FE(pg_pconnect, arginfo_pg_pconnect)
diff --git a/ext/phar/phar.c b/ext/phar/phar.c
index 0720582334..c6dbfb3a9c 100644
--- a/ext/phar/phar.c
+++ b/ext/phar/phar.c
@@ -3249,7 +3249,7 @@ ZEND_GET_MODULE(phar)
*
* Every user visible function must have an entry in phar_functions[].
*/
-zend_function_entry phar_functions[] = {
+static const zend_function_entry phar_functions[] = {
PHP_FE_END
};
/* }}}*/
diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c
index 7103a05e91..9a8504aa73 100644
--- a/ext/phar/phar_object.c
+++ b/ext/phar/phar_object.c
@@ -5296,7 +5296,7 @@ ZEND_BEGIN_ARG_INFO(arginfo_phar__void, 0)
ZEND_END_ARG_INFO()
-zend_function_entry php_archive_methods[] = {
+static const zend_function_entry php_archive_methods[] = {
PHP_ME(Phar, __construct, arginfo_phar___construct, ZEND_ACC_PUBLIC)
PHP_ME(Phar, __destruct, arginfo_phar__void, ZEND_ACC_PUBLIC)
PHP_ME(Phar, addEmptyDir, arginfo_phar_emptydir, ZEND_ACC_PUBLIC)
@@ -5365,7 +5365,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_data___construct, 0, 0, 1)
ZEND_ARG_INFO(0, fileformat)
ZEND_END_ARG_INFO()
-zend_function_entry php_data_methods[] = {
+static const zend_function_entry php_data_methods[] = {
PHP_ME(Phar, __construct, arginfo_data___construct, ZEND_ACC_PUBLIC)
PHP_ME(Phar, __destruct, arginfo_phar__void, ZEND_ACC_PUBLIC)
PHP_ME(Phar, addEmptyDir, arginfo_phar_emptydir, ZEND_ACC_PUBLIC)
@@ -5434,7 +5434,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_entry_chmod, 0, 0, 1)
ZEND_ARG_INFO(0, perms)
ZEND_END_ARG_INFO()
-zend_function_entry php_entry_methods[] = {
+static const zend_function_entry php_entry_methods[] = {
PHP_ME(PharFileInfo, __construct, arginfo_entry___construct, ZEND_ACC_PUBLIC)
PHP_ME(PharFileInfo, __destruct, arginfo_phar__void, ZEND_ACC_PUBLIC)
PHP_ME(PharFileInfo, chmod, arginfo_entry_chmod, ZEND_ACC_PUBLIC)
@@ -5453,7 +5453,7 @@ zend_function_entry php_entry_methods[] = {
PHP_FE_END
};
-zend_function_entry phar_exception_methods[] = {
+static const zend_function_entry phar_exception_methods[] = {
PHP_FE_END
};
/* }}} */
diff --git a/ext/posix/posix.c b/ext/posix/posix.c
index 516b8f2318..cdcedb9658 100644
--- a/ext/posix/posix.c
+++ b/ext/posix/posix.c
@@ -224,7 +224,7 @@ ZEND_END_ARG_INFO()
/* {{{ posix_functions[]
*/
-const zend_function_entry posix_functions[] = {
+static const zend_function_entry posix_functions[] = {
/* POSIX.1, 3.3 */
PHP_FE(posix_kill, arginfo_posix_kill)
@@ -1284,7 +1284,7 @@ PHP_FUNCTION(posix_getpwuid)
/* {{{ posix_addlimit
*/
-static int posix_addlimit(int limit, char *name, zval *return_value) {
+static int posix_addlimit(int limit, const char *name, zval *return_value) {
int result;
struct rlimit rl;
char hard[80];
@@ -1317,9 +1317,9 @@ static int posix_addlimit(int limit, char *name, zval *return_value) {
/* {{{ limits[]
*/
-struct limitlist {
+static const struct limitlist {
int limit;
- char *name;
+ const char *name;
} limits[] = {
#ifdef RLIMIT_CORE
{ RLIMIT_CORE, "core" },
@@ -1378,7 +1378,7 @@ struct limitlist {
Get system resource consumption limits (This is not a POSIX function, but a BSDism and a SVR4ism. We compile conditionally) */
PHP_FUNCTION(posix_getrlimit)
{
- struct limitlist *l = NULL;
+ const struct limitlist *l = NULL;
PHP_POSIX_NO_ARGS;
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index d5194d08ac..9fd69fa85f 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -6705,7 +6705,7 @@ static const zend_function_entry reflection_zend_extension_functions[] = {
};
/* }}} */
-const zend_function_entry reflection_ext_functions[] = { /* {{{ */
+static const zend_function_entry reflection_ext_functions[] = { /* {{{ */
PHP_FE_END
}; /* }}} */
diff --git a/ext/shmop/shmop.c b/ext/shmop/shmop.c
index 0d8984e6cc..bbdc2c3abb 100644
--- a/ext/shmop/shmop.c
+++ b/ext/shmop/shmop.c
@@ -80,7 +80,7 @@ ZEND_END_ARG_INFO()
/* {{{ shmop_functions[]
*/
-const zend_function_entry shmop_functions[] = {
+static const zend_function_entry shmop_functions[] = {
PHP_FE(shmop_open, arginfo_shmop_open)
PHP_FE(shmop_read, arginfo_shmop_read)
PHP_FE(shmop_close, arginfo_shmop_close)
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c
index 278342819f..f30d1fd041 100644
--- a/ext/simplexml/simplexml.c
+++ b/ext/simplexml/simplexml.c
@@ -2653,7 +2653,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_simplexmlelement_addchild, 0, 0, 1)
ZEND_END_ARG_INFO()
/* }}} */
-const zend_function_entry simplexml_functions[] = { /* {{{ */
+static const zend_function_entry simplexml_functions[] = { /* {{{ */
PHP_FE(simplexml_load_file, arginfo_simplexml_load_file)
PHP_FE(simplexml_load_string, arginfo_simplexml_load_string)
PHP_FE(simplexml_import_dom, arginfo_simplexml_import_dom)
diff --git a/ext/skeleton/skeleton.c b/ext/skeleton/skeleton.c
index 5e674c15c1..04b07ecf29 100644
--- a/ext/skeleton/skeleton.c
+++ b/ext/skeleton/skeleton.c
@@ -71,7 +71,7 @@ ZEND_END_ARG_INFO()
/* {{{ %EXTNAME%_functions[]
*/
-const zend_function_entry %EXTNAME%_functions[] = {
+static const zend_function_entry %EXTNAME%_functions[] = {
PHP_FE(%EXTNAME%_test1, arginfo_%EXTNAME%_test1)
PHP_FE(%EXTNAME%_test2, arginfo_%EXTNAME%_test2)
PHP_FE_END
diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c
index 9ba0223422..2d4869d9de 100644
--- a/ext/snmp/snmp.c
+++ b/ext/snmp/snmp.c
@@ -368,7 +368,7 @@ struct objid_query {
/* {{{ snmp_functions[]
*/
-const zend_function_entry snmp_functions[] = {
+static const zend_function_entry snmp_functions[] = {
PHP_FE(snmpget, arginfo_snmpget)
PHP_FE(snmpgetnext, arginfo_snmpgetnext)
PHP_FE(snmpwalk, arginfo_snmpwalk)
@@ -2226,7 +2226,7 @@ static void free_php_snmp_properties(zval *el) /* {{{ */
/* }}} */
/* {{{ php_snmp_class_methods[] */
-static zend_function_entry php_snmp_class_methods[] = {
+static const zend_function_entry php_snmp_class_methods[] = {
PHP_ME(snmp, __construct, arginfo_snmp_create, ZEND_ACC_PUBLIC)
PHP_ME(snmp, close, arginfo_snmp_void, ZEND_ACC_PUBLIC)
PHP_ME(snmp, setSecurity, arginfo_snmp_setSecurity, ZEND_ACC_PUBLIC)
diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c
index 1096636a4f..d1ce872236 100644
--- a/ext/soap/php_encoding.c
+++ b/ext/soap/php_encoding.c
@@ -140,7 +140,7 @@ static void set_ns_and_type(xmlNodePtr node, encodeTypePtr type);
} \
}
-encode defaultEncoding[] = {
+const encode defaultEncoding[] = {
{{UNKNOWN_TYPE, NULL, NULL, NULL, NULL}, guess_zval_convert, guess_xml_convert},
{{IS_NULL, "nil", XSI_NAMESPACE, NULL, NULL}, to_zval_null, to_xml_null},
diff --git a/ext/soap/php_encoding.h b/ext/soap/php_encoding.h
index 757ab0784d..2c44607da6 100644
--- a/ext/soap/php_encoding.h
+++ b/ext/soap/php_encoding.h
@@ -210,7 +210,7 @@ encodePtr get_conversion(int encode);
void delete_encoder(zval *zv);
void delete_encoder_persistent(zval *zv);
-extern encode defaultEncoding[];
+extern const encode defaultEncoding[];
extern int numDefaultEncodings;
#endif
diff --git a/ext/soap/php_sdl.c b/ext/soap/php_sdl.c
index 08f750bea9..1a464167c7 100644
--- a/ext/soap/php_sdl.c
+++ b/ext/soap/php_sdl.c
@@ -1533,7 +1533,7 @@ static sdlPtr get_sdl_from_cache(const char *fn, const char *uri, time_t t, time
sdlBindingPtr *bindings;
sdlTypePtr *types;
encodePtr *encoders;
- encodePtr enc;
+ const encode *enc;
int f;
struct stat st;
@@ -1614,7 +1614,7 @@ static sdlPtr get_sdl_from_cache(const char *fn, const char *uri, time_t t, time
i = num_encoders;
enc = defaultEncoding;
while (enc->details.type != END_KNOWN_TYPES) {
- encoders[++i] = enc++;
+ encoders[++i] = (encodePtr)enc++;
}
i = 1;
@@ -2103,7 +2103,7 @@ static void add_sdl_to_cache(const char *fn, const char *uri, time_t t, sdlPtr s
int type_num = 1;
int encoder_num = 1;
int f;
- encodePtr enc;
+ const encode *enc;
HashTable tmp_types;
HashTable tmp_encoders;
HashTable tmp_bindings;
diff --git a/ext/soap/soap.c b/ext/soap/soap.c
index db244b9b51..e79567136f 100644
--- a/ext/soap/soap.c
+++ b/ext/soap/soap.c
@@ -529,7 +529,7 @@ static HashTable defEnc, defEncIndex, defEncNs;
static void php_soap_prepare_globals()
{
int i;
- encodePtr enc;
+ const encode* enc;
zend_hash_init(&defEnc, 0, NULL, NULL, 1);
zend_hash_init(&defEncIndex, 0, NULL, NULL, 1);
@@ -544,15 +544,15 @@ static void php_soap_prepare_globals()
if (defaultEncoding[i].details.ns != NULL) {
char *ns_type;
spprintf(&ns_type, 0, "%s:%s", defaultEncoding[i].details.ns, defaultEncoding[i].details.type_str);
- zend_hash_str_add_ptr(&defEnc, ns_type, strlen(ns_type), enc);
+ zend_hash_str_add_ptr(&defEnc, ns_type, strlen(ns_type), (void*)enc);
efree(ns_type);
} else {
- zend_hash_str_add_ptr(&defEnc, defaultEncoding[i].details.type_str, strlen(defaultEncoding[i].details.type_str), enc);
+ zend_hash_str_add_ptr(&defEnc, defaultEncoding[i].details.type_str, strlen(defaultEncoding[i].details.type_str), (void*)enc);
}
}
/* Index everything by number */
if (!zend_hash_index_exists(&defEncIndex, defaultEncoding[i].details.type)) {
- zend_hash_index_update_ptr(&defEncIndex, defaultEncoding[i].details.type, enc);
+ zend_hash_index_update_ptr(&defEncIndex, defaultEncoding[i].details.type, (void*)enc);
}
i++;
} while (defaultEncoding[i].details.type != END_KNOWN_TYPES);
diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c
index e583ef6a02..0fb108378d 100644
--- a/ext/sockets/sockets.c
+++ b/ext/sockets/sockets.c
@@ -339,7 +339,7 @@ PHP_FUNCTION(socket_addrinfo_explain);
/* {{{ sockets_functions[]
*/
-const zend_function_entry sockets_functions[] = {
+static const zend_function_entry sockets_functions[] = {
PHP_FE(socket_select, arginfo_socket_select)
PHP_FE(socket_create, arginfo_socket_create)
PHP_FE(socket_create_listen, arginfo_socket_create_listen)
diff --git a/ext/sodium/libsodium.c b/ext/sodium/libsodium.c
index a9cb17d772..3adec51980 100644
--- a/ext/sodium/libsodium.c
+++ b/ext/sodium/libsodium.c
@@ -246,7 +246,7 @@ ZEND_END_ARG_INFO()
# define crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_MIN crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE
#endif
-const zend_function_entry sodium_functions[] = {
+static const zend_function_entry sodium_functions[] = {
PHP_FE(sodium_crypto_aead_aes256gcm_is_available, AI_None)
#ifdef HAVE_AESGCM
PHP_FE(sodium_crypto_aead_aes256gcm_decrypt, AI_StringAndADAndNonceAndKey)
diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c
index fb9f80506b..7abe14b129 100644
--- a/ext/spl/php_spl.c
+++ b/ext/spl/php_spl.c
@@ -947,7 +947,7 @@ ZEND_END_ARG_INFO()
/* {{{ spl_functions
*/
-const zend_function_entry spl_functions[] = {
+static const zend_function_entry spl_functions[] = {
PHP_FE(spl_classes, arginfo_spl_classes)
PHP_FE(spl_autoload, arginfo_spl_autoload)
PHP_FE(spl_autoload_extensions, arginfo_spl_autoload_extensions)
diff --git a/ext/spl/spl_fixedarray.c b/ext/spl/spl_fixedarray.c
index 73e4cade91..75a9cbc888 100644
--- a/ext/spl/spl_fixedarray.c
+++ b/ext/spl/spl_fixedarray.c
@@ -1052,7 +1052,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_splfixedarray_void, 0)
ZEND_END_ARG_INFO()
-static zend_function_entry spl_funcs_SplFixedArray[] = { /* {{{ */
+static const zend_function_entry spl_funcs_SplFixedArray[] = { /* {{{ */
SPL_ME(SplFixedArray, __construct, arginfo_splfixedarray_construct,ZEND_ACC_PUBLIC)
SPL_ME(SplFixedArray, __wakeup, arginfo_splfixedarray_void, ZEND_ACC_PUBLIC)
SPL_ME(SplFixedArray, count, arginfo_splfixedarray_void, ZEND_ACC_PUBLIC)
diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c
index be36565c45..2b6abe2605 100644
--- a/ext/spl/spl_iterators.c
+++ b/ext/spl/spl_iterators.c
@@ -65,7 +65,7 @@ PHPAPI zend_class_entry *spl_ce_RecursiveTreeIterator;
ZEND_BEGIN_ARG_INFO(arginfo_recursive_it_void, 0)
ZEND_END_ARG_INFO()
-const zend_function_entry spl_funcs_RecursiveIterator[] = {
+static const zend_function_entry spl_funcs_RecursiveIterator[] = {
SPL_ABSTRACT_ME(RecursiveIterator, hasChildren, arginfo_recursive_it_void)
SPL_ABSTRACT_ME(RecursiveIterator, getChildren, arginfo_recursive_it_void)
PHP_FE_END
diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c
index 54fa24387d..f659445bbd 100644
--- a/ext/sqlite3/sqlite3.c
+++ b/ext/sqlite3/sqlite3.c
@@ -1995,7 +1995,7 @@ ZEND_END_ARG_INFO()
/* }}} */
/* {{{ php_sqlite3_class_methods */
-static zend_function_entry php_sqlite3_class_methods[] = {
+static const zend_function_entry php_sqlite3_class_methods[] = {
PHP_ME(sqlite3, open, arginfo_sqlite3_open, ZEND_ACC_PUBLIC)
PHP_ME(sqlite3, close, arginfo_sqlite3_void, ZEND_ACC_PUBLIC)
PHP_ME(sqlite3, exec, arginfo_sqlite3_query, ZEND_ACC_PUBLIC)
@@ -2024,7 +2024,7 @@ static zend_function_entry php_sqlite3_class_methods[] = {
/* }}} */
/* {{{ php_sqlite3_stmt_class_methods */
-static zend_function_entry php_sqlite3_stmt_class_methods[] = {
+static const zend_function_entry php_sqlite3_stmt_class_methods[] = {
PHP_ME(sqlite3stmt, paramCount, arginfo_sqlite3_void, ZEND_ACC_PUBLIC)
PHP_ME(sqlite3stmt, close, arginfo_sqlite3_void, ZEND_ACC_PUBLIC)
PHP_ME(sqlite3stmt, reset, arginfo_sqlite3_void, ZEND_ACC_PUBLIC)
@@ -2039,7 +2039,7 @@ static zend_function_entry php_sqlite3_stmt_class_methods[] = {
/* }}} */
/* {{{ php_sqlite3_result_class_methods */
-static zend_function_entry php_sqlite3_result_class_methods[] = {
+static const zend_function_entry php_sqlite3_result_class_methods[] = {
PHP_ME(sqlite3result, numColumns, arginfo_sqlite3_void, ZEND_ACC_PUBLIC)
PHP_ME(sqlite3result, columnName, arginfo_sqlite3result_columnname, ZEND_ACC_PUBLIC)
PHP_ME(sqlite3result, columnType, arginfo_sqlite3result_columntype, ZEND_ACC_PUBLIC)
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index f904a2ad31..ed150534a5 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -2713,7 +2713,7 @@ ZEND_END_ARG_INFO()
/* }}} */
/* }}} */
-const zend_function_entry basic_functions[] = { /* {{{ */
+static const zend_function_entry basic_functions[] = { /* {{{ */
PHP_FE(constant, arginfo_constant)
PHP_FE(bin2hex, arginfo_bin2hex)
PHP_FE(hex2bin, arginfo_hex2bin)
diff --git a/ext/standard/crypt_freesec.c b/ext/standard/crypt_freesec.c
index ba11bf98e8..5e99e83bd4 100644
--- a/ext/standard/crypt_freesec.c
+++ b/ext/standard/crypt_freesec.c
@@ -73,25 +73,25 @@
#define _PASSWORD_EFMT1 '_'
-static u_char IP[64] = {
+static const u_char IP[64] = {
58, 50, 42, 34, 26, 18, 10, 2, 60, 52, 44, 36, 28, 20, 12, 4,
62, 54, 46, 38, 30, 22, 14, 6, 64, 56, 48, 40, 32, 24, 16, 8,
57, 49, 41, 33, 25, 17, 9, 1, 59, 51, 43, 35, 27, 19, 11, 3,
61, 53, 45, 37, 29, 21, 13, 5, 63, 55, 47, 39, 31, 23, 15, 7
};
-static u_char key_perm[56] = {
+static const u_char key_perm[56] = {
57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18,
10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36,
63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22,
14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4
};
-static u_char key_shifts[16] = {
+static const u_char key_shifts[16] = {
1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1
};
-static u_char comp_perm[48] = {
+static const u_char comp_perm[48] = {
14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10,
23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2,
41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48,
@@ -102,7 +102,7 @@ static u_char comp_perm[48] = {
* No E box is used, as it's replaced by some ANDs, shifts, and ORs.
*/
-static u_char sbox[8][64] = {
+static const u_char sbox[8][64] = {
{
14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7,
0, 15, 7, 4, 14, 2, 13, 1, 10, 6, 12, 11, 9, 5, 3, 8,
@@ -153,12 +153,12 @@ static u_char sbox[8][64] = {
}
};
-static u_char pbox[32] = {
+static const u_char pbox[32] = {
16, 7, 20, 21, 29, 12, 28, 17, 1, 15, 23, 26, 5, 18, 31, 10,
2, 8, 24, 14, 32, 27, 3, 9, 19, 13, 30, 6, 22, 11, 4, 25
};
-static uint32_t bits32[32] =
+static const uint32_t bits32[32] =
{
0x80000000, 0x40000000, 0x20000000, 0x10000000,
0x08000000, 0x04000000, 0x02000000, 0x01000000,
@@ -170,9 +170,9 @@ static uint32_t bits32[32] =
0x00000008, 0x00000004, 0x00000002, 0x00000001
};
-static u_char bits8[8] = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 };
+static const u_char bits8[8] = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 };
-static unsigned char ascii64[] =
+static const unsigned char ascii64[] =
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
/* 0000000000111111111122222222223333333333444444444455555555556666 */
/* 0123456789012345678901234567890123456789012345678901234567890123 */
@@ -216,7 +216,7 @@ _crypt_extended_init(void)
{
int i, j, b, k, inbit, obit;
uint32_t *p, *il, *ir, *fl, *fr;
- uint32_t *bits28, *bits24;
+ const uint32_t *bits28, *bits24;
u_char inv_key_perm[64];
u_char inv_comp_perm[56];
u_char init_perm[64], final_perm[64];
@@ -741,9 +741,9 @@ _crypt_extended(const char *key, const char *setting)
#define crypt _crypt_extended
-static struct {
- char *hash;
- char *pw;
+static const struct {
+ const char *hash;
+ const char *pw;
} tests[] = {
/* "new"-style */
{"_J9..CCCCXBrJUJV154M", "U*U*U*U*"},
diff --git a/ext/standard/sha1.c b/ext/standard/sha1.c
index 5616999c71..6d99ef90f9 100644
--- a/ext/standard/sha1.c
+++ b/ext/standard/sha1.c
@@ -111,7 +111,7 @@ static void SHA1Transform(uint32_t[5], const unsigned char[64]);
static void SHA1Encode(unsigned char *, uint32_t *, unsigned int);
static void SHA1Decode(uint32_t *, const unsigned char *, unsigned int);
-static unsigned char PADDING[64] =
+static const unsigned char PADDING[64] =
{
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
diff --git a/ext/sysvmsg/sysvmsg.c b/ext/sysvmsg/sysvmsg.c
index 59bcc86c29..e3252bea3a 100644
--- a/ext/sysvmsg/sysvmsg.c
+++ b/ext/sysvmsg/sysvmsg.c
@@ -87,7 +87,7 @@ ZEND_END_ARG_INFO()
*
* Every user visible function must have an entry in sysvmsg_functions[].
*/
-const zend_function_entry sysvmsg_functions[] = {
+static const zend_function_entry sysvmsg_functions[] = {
PHP_FE(msg_get_queue, arginfo_msg_get_queue)
PHP_FE(msg_send, arginfo_msg_send)
PHP_FE(msg_receive, arginfo_msg_receive)
diff --git a/ext/sysvsem/sysvsem.c b/ext/sysvsem/sysvsem.c
index b8b6e42a6f..d5d1f40f8b 100644
--- a/ext/sysvsem/sysvsem.c
+++ b/ext/sysvsem/sysvsem.c
@@ -80,7 +80,7 @@ ZEND_END_ARG_INFO()
/* {{{ sysvsem_functions[]
*/
-const zend_function_entry sysvsem_functions[] = {
+static const zend_function_entry sysvsem_functions[] = {
PHP_FE(sem_get, arginfo_sem_get)
PHP_FE(sem_acquire, arginfo_sem_acquire)
PHP_FE(sem_release, arginfo_sem_release)
diff --git a/ext/sysvshm/sysvshm.c b/ext/sysvshm/sysvshm.c
index 5a5ba7c222..f25347c12d 100644
--- a/ext/sysvshm/sysvshm.c
+++ b/ext/sysvshm/sysvshm.c
@@ -78,7 +78,7 @@ ZEND_END_ARG_INFO()
/* {{{ sysvshm_functions[]
*/
-const zend_function_entry sysvshm_functions[] = {
+static const zend_function_entry sysvshm_functions[] = {
PHP_FE(shm_attach, arginfo_shm_attach)
PHP_FE(shm_remove, arginfo_shm_detach)
PHP_FE(shm_detach, arginfo_shm_remove)
diff --git a/ext/tokenizer/tokenizer.c b/ext/tokenizer/tokenizer.c
index bb5f30320f..cf52720a7c 100644
--- a/ext/tokenizer/tokenizer.c
+++ b/ext/tokenizer/tokenizer.c
@@ -59,7 +59,7 @@ ZEND_END_ARG_INFO()
*
* Every user visible function must have an entry in tokenizer_functions[].
*/
-const zend_function_entry tokenizer_functions[] = {
+static const zend_function_entry tokenizer_functions[] = {
PHP_FE(token_get_all, arginfo_token_get_all)
PHP_FE(token_name, arginfo_token_name)
PHP_FE_END
diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c
index 6dce13346e..88cbceb95a 100644
--- a/ext/wddx/wddx.c
+++ b/ext/wddx/wddx.c
@@ -132,7 +132,7 @@ ZEND_END_ARG_INFO()
/* {{{ wddx_functions[]
*/
-const zend_function_entry wddx_functions[] = {
+static const zend_function_entry wddx_functions[] = {
PHP_FE(wddx_serialize_value, arginfo_wddx_serialize_value)
PHP_FE(wddx_serialize_vars, arginfo_wddx_serialize_vars)
PHP_FE(wddx_packet_start, arginfo_wddx_serialize_start)
diff --git a/ext/xml/compat.c b/ext/xml/compat.c
index 694fde95c3..b6c19cc039 100644
--- a/ext/xml/compat.c
+++ b/ext/xml/compat.c
@@ -401,7 +401,7 @@ _get_entity(void *user, const xmlChar *name)
return ret;
}
-static xmlSAXHandler
+static const xmlSAXHandler
php_xml_compat_handlers = {
NULL, /* internalSubset */
NULL, /* isStandalone */
diff --git a/ext/xml/xml.c b/ext/xml/xml.c
index 3db00ab22f..bbfb7e20c1 100644
--- a/ext/xml/xml.c
+++ b/ext/xml/xml.c
@@ -212,7 +212,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_xml_parser_get_option, 0, 0, 2)
ZEND_ARG_INFO(0, option)
ZEND_END_ARG_INFO()
-const zend_function_entry xml_functions[] = {
+static const zend_function_entry xml_functions[] = {
PHP_FE(xml_parser_create, arginfo_xml_parser_create)
PHP_FE(xml_parser_create_ns, arginfo_xml_parser_create_ns)
PHP_FE(xml_set_object, arginfo_xml_set_object)
diff --git a/ext/xmlrpc/xmlrpc-epi-php.c b/ext/xmlrpc/xmlrpc-epi-php.c
index 2f6bae641d..0670a514c2 100644
--- a/ext/xmlrpc/xmlrpc-epi-php.c
+++ b/ext/xmlrpc/xmlrpc-epi-php.c
@@ -141,7 +141,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_xmlrpc_server_register_introspection_callback, 0,
ZEND_END_ARG_INFO()
/* }}} */
-const zend_function_entry xmlrpc_functions[] = {
+static const zend_function_entry xmlrpc_functions[] = {
PHP_FE(xmlrpc_encode, arginfo_xmlrpc_encode)
PHP_FE(xmlrpc_decode, arginfo_xmlrpc_decode)
PHP_FE(xmlrpc_decode_request, arginfo_xmlrpc_decode_request)
diff --git a/ext/zend_test/test.c b/ext/zend_test/test.c
index 773225a64d..15b6edb785 100644
--- a/ext/zend_test/test.c
+++ b/ext/zend_test/test.c
@@ -174,7 +174,7 @@ static ZEND_METHOD(_ZendTestTrait, testMethod) /* {{{ */ {
}
/* }}} */
-static zend_function_entry zend_test_trait_methods[] = {
+static const zend_function_entry zend_test_trait_methods[] = {
ZEND_ME(_ZendTestTrait, testMethod, NULL, ZEND_ACC_PUBLIC)
ZEND_FE_END
};
@@ -228,7 +228,7 @@ PHP_MINFO_FUNCTION(zend_test)
php_info_print_table_end();
}
-const zend_function_entry zend_test_functions[] = {
+static const zend_function_entry zend_test_functions[] = {
ZEND_FE(zend_test_array_return, arginfo_zend_test_array_return)
ZEND_FE(zend_test_nullable_array_return, arginfo_zend_test_nullable_array_return)
ZEND_FE(zend_create_unterminated_string, NULL)
diff --git a/main/http_status_codes.h b/main/http_status_codes.h
index a8417b6b89..1ee7641e58 100644
--- a/main/http_status_codes.h
+++ b/main/http_status_codes.h
@@ -26,7 +26,7 @@ typedef struct _http_response_status_code_pair {
const char *str;
} http_response_status_code_pair;
-static http_response_status_code_pair http_status_map[] = {
+static const http_response_status_code_pair http_status_map[] = {
{ 100, "Continue" },
{ 101, "Switching Protocols" },
{ 200, "OK" },
diff --git a/main/internal_functions.c.in b/main/internal_functions.c.in
index ef353a1786..7abf25addc 100644
--- a/main/internal_functions.c.in
+++ b/main/internal_functions.c.in
@@ -29,7 +29,7 @@
@EXT_INCLUDE_CODE@
-static zend_module_entry *php_builtin_extensions[] = {
+static zend_module_entry * const php_builtin_extensions[] = {
@EXT_MODULE_PTRS@
};
diff --git a/main/internal_functions_win32.c b/main/internal_functions_win32.c
index 887e3cd0f0..ca3b3b7072 100644
--- a/main/internal_functions_win32.c
+++ b/main/internal_functions_win32.c
@@ -111,7 +111,7 @@
/* {{{ php_builtin_extensions[]
*/
-static zend_module_entry *php_builtin_extensions[] = {
+static zend_module_entry * const php_builtin_extensions[] = {
phpext_standard_ptr
#if HAVE_BCMATH
,phpext_bcmath_ptr
diff --git a/main/main.c b/main/main.c
index 99cb6612d4..8842f8f86f 100644
--- a/main/main.c
+++ b/main/main.c
@@ -1873,9 +1873,9 @@ PHP_MINFO_FUNCTION(php_core) { /* {{{ */
/* {{{ php_register_extensions
*/
-int php_register_extensions(zend_module_entry **ptr, int count)
+int php_register_extensions(zend_module_entry * const * ptr, int count)
{
- zend_module_entry **end = ptr + count;
+ zend_module_entry * const * end = ptr + count;
while (ptr < end) {
if (*ptr) {
diff --git a/main/php_main.h b/main/php_main.h
index 539f9e7456..be4aaab542 100644
--- a/main/php_main.h
+++ b/main/php_main.h
@@ -35,7 +35,7 @@ PHPAPI void php_module_shutdown(void);
PHPAPI void php_module_shutdown_for_exec(void);
PHPAPI int php_module_shutdown_wrapper(sapi_module_struct *sapi_globals);
-PHPAPI int php_register_extensions(zend_module_entry **ptr, int count);
+PHPAPI int php_register_extensions(zend_module_entry * const * ptr, int count);
PHPAPI int php_execute_script(zend_file_handle *primary_file);
PHPAPI int php_execute_simple_script(zend_file_handle *primary_file, zval *ret);
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index 2884c28ee7..25f6dc010e 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -1753,7 +1753,7 @@ PHP_FUNCTION(apache_response_headers) /* {{{ */
ZEND_BEGIN_ARG_INFO(arginfo_no_args, 0)
ZEND_END_ARG_INFO()
-const zend_function_entry cgi_functions[] = {
+static const zend_function_entry cgi_functions[] = {
PHP_FE(apache_child_terminate, arginfo_no_args)
PHP_FE(apache_request_headers, arginfo_no_args)
PHP_FE(apache_response_headers, arginfo_no_args)
diff --git a/sapi/litespeed/lsapi_main.c b/sapi/litespeed/lsapi_main.c
index 17704652d6..202c2e837c 100644
--- a/sapi/litespeed/lsapi_main.c
+++ b/sapi/litespeed/lsapi_main.c
@@ -1358,7 +1358,7 @@ PHP_FUNCTION(apache_get_modules);
PHP_MINFO_FUNCTION(litespeed);
-zend_function_entry litespeed_functions[] = {
+static const zend_function_entry litespeed_functions[] = {
PHP_FE(litespeed_request_headers, arginfo_litespeed__void)
PHP_FE(litespeed_response_headers, arginfo_litespeed__void)
PHP_FE(apache_get_modules, arginfo_litespeed__void)
diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c
index 2eefb18d94..f47951bb16 100644
--- a/sapi/phpdbg/phpdbg.c
+++ b/sapi/phpdbg/phpdbg.c
@@ -783,7 +783,7 @@ ZEND_BEGIN_ARG_INFO_EX(phpdbg_get_executable_arginfo, 0, 0, 0)
ZEND_ARG_INFO(0, options)
ZEND_END_ARG_INFO()
-zend_function_entry phpdbg_user_functions[] = {
+static const zend_function_entry phpdbg_user_functions[] = {
PHP_FE(phpdbg_clear, phpdbg_clear_arginfo)
PHP_FE(phpdbg_break_next, phpdbg_break_next_arginfo)
PHP_FE(phpdbg_break_file, phpdbg_break_file_arginfo)