]> granicus.if.org Git - php/commitdiff
Move constants into read-only data segment
authorDmitry Stogov <dmitry@zend.com>
Thu, 14 Dec 2017 15:43:44 +0000 (18:43 +0300)
committerDmitry Stogov <dmitry@zend.com>
Thu, 14 Dec 2017 15:43:44 +0000 (18:43 +0300)
104 files changed:
Zend/zend_exceptions.c
Zend/zend_interfaces.c
Zend/zend_vm_execute.h
Zend/zend_vm_gen.php
ext/bcmath/bcmath.c
ext/calendar/calendar.c
ext/com_dotnet/com_extension.c
ext/curl/interface.c
ext/date/php_date.c
ext/dba/dba.c
ext/enchant/enchant.c
ext/exif/exif.c
ext/fileinfo/fileinfo.c
ext/ftp/php_ftp.c
ext/gd/gd.c
ext/gettext/gettext.c
ext/gmp/gmp.c
ext/hash/hash.c
ext/iconv/iconv.c
ext/imap/php_imap.c
ext/interbase/interbase.c
ext/intl/collator/collator_class.c
ext/intl/common/common_enum.cpp
ext/intl/converter/converter.c
ext/intl/dateformat/dateformat_class.c
ext/intl/formatter/formatter_class.c
ext/intl/locale/locale_class.c
ext/intl/msgformat/msgformat_class.c
ext/intl/normalizer/normalizer_class.c
ext/intl/php_intl.c
ext/intl/resourcebundle/resourcebundle_class.c
ext/intl/spoofchecker/spoofchecker_class.c
ext/intl/timezone/timezone_class.cpp
ext/intl/transliterator/transliterator_class.c
ext/intl/uchar/uchar.c
ext/ldap/ldap.c
ext/mbstring/mbstring.c
ext/mbstring/php_mbregex.c
ext/odbc/php_odbc.c
ext/opcache/zend_accelerator_module.c
ext/openssl/openssl.c
ext/pcntl/pcntl.c
ext/pdo/pdo.c
ext/pdo/php_pdo_driver.h
ext/pdo_dblib/dblib_driver.c
ext/pdo_dblib/pdo_dblib.c
ext/pdo_dblib/php_pdo_dblib_int.h
ext/pdo_firebird/firebird_driver.c
ext/pdo_firebird/pdo_firebird.c
ext/pdo_firebird/php_pdo_firebird_int.h
ext/pdo_mysql/mysql_driver.c
ext/pdo_mysql/pdo_mysql.c
ext/pdo_mysql/php_pdo_mysql_int.h
ext/pdo_oci/oci_driver.c
ext/pdo_oci/pdo_oci.c
ext/pdo_oci/php_pdo_oci_int.h
ext/pdo_odbc/odbc_driver.c
ext/pdo_odbc/pdo_odbc.c
ext/pdo_odbc/php_pdo_odbc_int.h
ext/pdo_pgsql/pdo_pgsql.c
ext/pdo_pgsql/pgsql_driver.c
ext/pdo_pgsql/php_pdo_pgsql_int.h
ext/pdo_sqlite/pdo_sqlite.c
ext/pdo_sqlite/php_pdo_sqlite_int.h
ext/pdo_sqlite/sqlite_driver.c
ext/pgsql/pgsql.c
ext/phar/phar.c
ext/phar/phar_object.c
ext/posix/posix.c
ext/reflection/php_reflection.c
ext/shmop/shmop.c
ext/simplexml/simplexml.c
ext/skeleton/skeleton.c
ext/snmp/snmp.c
ext/soap/php_encoding.c
ext/soap/php_encoding.h
ext/soap/php_sdl.c
ext/soap/soap.c
ext/sockets/sockets.c
ext/sodium/libsodium.c
ext/spl/php_spl.c
ext/spl/spl_fixedarray.c
ext/spl/spl_iterators.c
ext/sqlite3/sqlite3.c
ext/standard/basic_functions.c
ext/standard/crypt_freesec.c
ext/standard/sha1.c
ext/sysvmsg/sysvmsg.c
ext/sysvsem/sysvsem.c
ext/sysvshm/sysvshm.c
ext/tokenizer/tokenizer.c
ext/wddx/wddx.c
ext/xml/compat.c
ext/xml/xml.c
ext/xmlrpc/xmlrpc-epi-php.c
ext/zend_test/test.c
main/http_status_codes.h
main/internal_functions.c.in
main/internal_functions_win32.c
main/main.c
main/php_main.h
sapi/cgi/cgi_main.c
sapi/litespeed/lsapi_main.c
sapi/phpdbg/phpdbg.c

index bd889647e89a15ac24417ba218940321905356b9..5049fe966a32c1caf7410c0cd29e4b6b3e6731a1 100644 (file)
@@ -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)
index cde77df4e21a0e3ffa64bb1da80c1f0ac14dd653..430e3b971520ec046c6abf2f84b022f19a81ecf5 100644 (file)
@@ -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
 };
index 5258da7f0d39c3271386142df4ef47040d380aca..45cf7ec40d4ffb12f34897880c278219736065ff 100644 (file)
@@ -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,
index ec53c0fe01492c6199c57c4ade9d765bb5c36cb3..cee3ffe3202f09b2d734906b0f58dc2e6f5f1a0b 100644 (file)
@@ -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");
index 1b39f4905d6f92b160ba5335a34e3c5f34792beb..c34eafec2e94049797ca367a296345f26fef6141 100644 (file)
@@ -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)
index d6df68cebbf061b355b64dfdbe1cbd7f9920d41b..a3097f45d8b8d28dfde719b2f847d29e1cab373e 100644 (file)
@@ -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)
index d2dc4c155e8f57e7db8382873f00b801a07bb177..8d41ab00d1c129a7208518d9beead98fb1dce23f 100644 (file)
@@ -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)
index 6cd02e19e7e750f522ddbbed260b51ec8ca65ff5..9be6ba1c30426f290ff00a6212f4b7f21b6722ce 100644 (file)
@@ -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)
index 124b2d407afa7ffeecf7be085f29fbd1af57fd79..3715e53ddbca31780aafc6046eb9ed8b7a43ba8a 100644 (file)
@@ -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)
index 9da1ba500e2802d84eb39afd4d81a65b4a795462..764ce2d933c9c695c94b84a6f7b091c1c612397e 100644 (file)
@@ -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)
index be79035bbabea8870345e4d79c4f90c41fa58a5b..6fef025a701ab351c8767cee9760ce6f28f87897 100644 (file)
@@ -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)
index 67e1878e887031e2e7fa2bd1fea843212bf662dd..82e246c3f043ff8d64ec03bd6ee399f16cebd09f 100644 (file)
@@ -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)
index 9fbf51087d1df7a419bc14b809d2946a09702d41..85aaa6b6e87c55812174bac9df7fccbe3a6f4916 100644 (file)
@@ -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)
index 403b9602e86e50e25732543c4239870a39b2acce..23c2645b8e7fc048278a88aaccd03c29036e977a 100644 (file)
@@ -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)
index 88f66e3558db84d887c2c532bfd65776882ec7c7..f234e3693d0652f612e0e128e8d2d399b8f8c195 100644 (file)
@@ -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)
index f4d6694cee7a313dd270fc53c0404bc8deb17da1..bbca3fe169a979a6da2901e56ac7f29aef85d326 100644 (file)
@@ -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() */
index ef9f070f49e6e1adc2b569f7ae8dcde88fb29f1d..85a2258e1952f8b626037b7b47992c3d330e6bf5 100644 (file)
@@ -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)
index c7c457945e5f35e3febe0b71e5c8f10939a3a898..5a4204a81caf02ddcca26a47447e0cf9900d60a6 100644 (file)
@@ -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)
 
index c8aa7fcd128595009e681857f025af92a4bbb0cd..7a5e846444d4029057ddf638572ffa0448a7a318 100644 (file)
@@ -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)
index 1dd4878d2f4a043310e7a634c1b0eab3aead8523..53f500799424c7a1b9df84b7603b7c80823619be 100644 (file)
@@ -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)
index e777962f535659fea7136b5f7f011083525c9527..099d1ad7d586c38a1e70562c3a9860f8b2a39f73 100644 (file)
@@ -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)
index fd2a616febdade11dbc9b1b1e3c10c1777c26cd3..42562eae48eec2a025d7752e98c03ad62457cb81 100644 (file)
@@ -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 )
index 8c964bdd2500f92f1d84171b4439b9eff7613437..9b95f255282338221ba9a43c3452ae72e0427361 100644 (file)
@@ -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)
index bab4bb98815a9d33e4c2f342fbd4f8432165f362..b71e2b9fef2f705ca5a54c0945e728151ba688df 100644 (file)
@@ -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 */
index 378c5a8be12563ebc1a2daa03b53f8a86144f9de..c8a2e22e900572e14e2182f2b2e688996481a54c 100644 (file)
@@ -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 )
index d15311201e2153a120495d1c02d125cd38023bd3..22a2a4e3e36596a3e45ca9c67abc3d661d61fa73 100644 (file)
@@ -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 )
index d132ef8c764b8d3fb68bfa2aeda26766fbef1b08..d59536955eb77b676c48e7281af2332391ef7034 100644 (file)
@@ -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 )
index aa7b839904b2ad3c3ca3bcce0b62d654269d2072..a61d8f4d3eb6312af2d106f5c098ffcb2a1df5aa 100644 (file)
@@ -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 )
index 894a3893f7a82b180b3830c8b7dca54d8d6e48ba..87b274ebfc128cf4063b1f6ec12fb547faa04d29 100644 (file)
@@ -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
index b97004d03f026ad2a2557fa3c710ebc0e4af6fcd..7b2f206e5218e4653006eb73fb8143931cc590db 100644 (file)
@@ -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 )
index 3850a3b22e9a6a7893451458264f37f883f11ee5..7cd6d2be09705affa6b57268eb5c8a503d9b89f3 100644 (file)
@@ -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 )
index 8b4274d374bc6ec1fe304c589879d4af768e4ce3..f94220526d2e1879707bdfc050d4807aca2feb73 100644 (file)
@@ -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)
index c6f4dd5447d7a79d14786fe839b3cb24f9d0ff30..223fad06b7a087a2e66f6cdc5c3606dae261153c 100644 (file)
@@ -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)
index 1b0b99be9725a6a9c1d98505ef0684d018fbd116..77a0fcf3d9ab7893b35f0322d02a192f20571536 100644 (file)
@@ -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 )
index 1add74b2b5c46be9aec35ab545f412a96f8110e3..770622eca7ee76103de756569d15befebf0f4189 100644 (file)
@@ -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)
index bd7e8ac64ce4e76dedaa43d632a6411a015dbff1..38ca79fe27e4dfbc129b13b226d903626b3a012e 100644 (file)
@@ -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)
index 7b3297ba6b283a2ebb8a19a50f23e5b4ede13988..dbb6bf9373143aac349528bc5296f4b8f4694b09 100644 (file)
@@ -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)
index 6b742560c5cf07dfe0471de459199c6b53b6fd27..b6f829f9f7454859b9558c3ff017ca07b0abbb61 100644 (file)
@@ -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) {
index 8bfa5b3dad686a18ce9ec8ec50e7a55ea50174f3..a2eb8ee41b3ba88e3a1be64fa19218b04824aee4 100644 (file)
@@ -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)
index ffd291d8b67509bcb8310b29ae37834c5a41cff8..aa627f028b360f2e3db5444e0ee411337c4c99b5 100644 (file)
@@ -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)
index 3721a870c53c96cbbcfcdf0d2ec14875cc8dbb3c..a9915aebee105962da461d933996117347091583 100644 (file)
@@ -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 */
index 52d107419d71fd0bee8530ed7977bb3ee957325b..8d338d342b3a01750f55a8547d4e107ca52cc93f 100644 (file)
@@ -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)
index b89c9517559c8b6f7aff29426365a0d07c7b250e..77f731a66685eb69133c826c1061c70b03139ced 100644 (file)
@@ -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;
index bcbe5b367256b8953688526666bc9768095d5875..578f3a3ac1bf5bca2bdf2220709a6f753e0b928a 100644 (file)
@@ -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
index 502238219f0d644409ff930ccc3c7ff9ddb2937f..b12cf4fc7075425345d154c7c3e281c28521e4d6 100644 (file)
@@ -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)
index 223d7bc18d5bf8d0bf9ceef8019a8c9f6989ad04..1dc9799ce0998a7a8db0437cf0459d0dc8340284 100644 (file)
@@ -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
 };
 
index cae7b77394ecb237e7b903fc91213c5f5aaeacba..91fe464dafbca1d599cb3579132df0844ebf5d5c 100644 (file)
@@ -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 {
index 83203d7804f23f1458b591d66c93cf4ed7eec196..a00a9270db5dc835e69ea723ead33c698bf81f82 100644 (file)
@@ -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
 };
index 7ea1b4fbdc0b9c24413f46647f1f36401ba3d99d..1cc1b970fc55669e9e2984c452b16b8b9ce486cd 100644 (file)
@@ -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
 };
 /* }}} */
index 3d14dacdf8ad467b8732058bd7cf3a8dc1cce04f..47bfc18e4bf404e15ab36dfea0b001da8d31328c 100644 (file)
@@ -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;
 
index ec7d5b8ea72a6b1cb1dd8a634305984b6cf2ace5..dcad8ef6c78223277af5f08283816ea06c4261b8 100644 (file)
@@ -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
 };
index 92279a56c8cd839e8401cb0bbb30e8597df29561..d7e5e809e7e4551524145af100b199d5085fe46a 100644 (file)
@@ -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
 };
 /* }}} */
index 32e79e111c3aef448346ac81ce1e915d27ca5748..6e7d840d7a8af4c128e1aafe7a9d2dfe40b191dc 100644 (file)
@@ -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__)
index 60205a8e31a13f8cdc8306ba45ffe74ed1117912..04d8d3eb24941f161eb78a6bfef80c670b685e3e 100644 (file)
@@ -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
 };
index 9ecb7e6c5a1b5cd22af295d700eccf4eca261b7d..c3f34f57b3e15c2210e0745a67595be019afbdf6 100644 (file)
@@ -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
 };
 /* }}} */
index 5d066e53b8c1756244e21b3e940386ed30e89ff2..88f9458e3241d7982a3e13a4759644c7edad1c07 100644 (file)
@@ -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);
index f347acba311f526ecdc1975f8af7167374f330ab..fef478d628be2916a1480fdc1598812229bf1436 100644 (file)
@@ -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
 };
index 8af2e5e7b34cf58b9990e5c45c38b4defb47ace1..aab99f423aa0e3dd8e26ce0ad87a4c4597420658 100644 (file)
@@ -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
 };
 /* }}} */
index 28ebf10b96bfbf5fd06d1b7a12ec38b85183191c..a94181fe4a78536b0377d479d4adc2d7d1a00723 100644 (file)
@@ -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);
index 93712a6af603ebb2ee5792c5be271d4d03edfbde..e4c0d58d534d8fdb86f65db3fa2bb26c5bc1c71c 100644 (file)
@@ -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
 };
 /* }}} */
index 52a9b8f285e4a905e0a4fcc5b8fd0f5c9be267b2..93e73e8b383f0b76957eab5bcd87b6c6e908418e 100644 (file)
@@ -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
 };
index f988335859adeb91b96ef879f925dbc60b83b25a..916b35c6b660291c30677a1c4a12fa5e8c755bc7 100644 (file)
@@ -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__)
index 60e1a07afb3d2045efa60cdca3b7ead99ed5b13e..0730bbaec43c1aa43d91039b3dccc501d5a62c4b 100644 (file)
@@ -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
 };
 /* }}} */
index 1c90416b9f9d401effd5bf5d2effce712215a8fb..073c86848448d6e47d50f345e2f89fcaa82ec9a6 100644 (file)
@@ -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__)
index e0627c1e32f94e941c84db54e5aa16c6301c4406..b2790ee57eb98291e7335ff790849ea07584b488 100644 (file)
@@ -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
 };
index 288b5aa44d34a2639e6f9b8e0947348914b8ae32..416dba2cd834268d25bb097ba87a46ceb093b539 100644 (file)
@@ -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)
index 07205823340ce100d1ab7b2307dffc6dc86bf199..c6dbfb3a9cf95654787b846cb167205f1d4e9fcb 100644 (file)
@@ -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
 };
 /* }}}*/
index 7103a05e9114e6d1ae917543d2f86ce15fa83b69..9a8504aa731bdacbe4b4ae93fd75a15c901f2521 100644 (file)
@@ -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
 };
 /* }}} */
index 516b8f2318179b40499323126a4c68a9ad780034..cdcedb96585257114802d40f6412f1145abce4e6 100644 (file)
@@ -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;
 
index d5194d08ac836f21b82f0947a2a76f4a169ea8cf..9fd69fa85fad195ef0a7ae08076c29ad59eddcc5 100644 (file)
@@ -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
 }; /* }}} */
 
index 0d8984e6ccffd42146f3909718b982366a34e93d..bbdc2c3abb1831caa2ff59e7658da07d24863943 100644 (file)
@@ -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)
index 278342819f8e853c2f8eb5fd55467047c8f809f3..f30d1fd041567ac96abb8a15b9f0074bb229ffe9 100644 (file)
@@ -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)
index 5e674c15c143ecf31a364f8700205cb0b368b840..04b07ecf29de0ce20170e29befc91203a9a443f6 100644 (file)
@@ -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
index 9ba0223422e1d6a787562823875d751511a9fe05..2d4869d9ded48f73ded005365ba11d80d50b23ed 100644 (file)
@@ -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)
index 1096636a4f689cf429cccec0be7ef9473d0a67ce..d1ce872236cfc782ab7e1419840645406ba2a842 100644 (file)
@@ -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},
index 757ab0784d733f2b924c2ff21c900c8b48d83a40..2c44607da635bf9f1496145e84a935dd1a178f56 100644 (file)
@@ -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
index 08f750bea94051aa8439e847c1cfa0b59b3bf09e..1a464167c7c05f898ac84f362befc52823492571 100644 (file)
@@ -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;
index db244b9b51ba8cfdefef6eee6d9b3a1050734a2d..e79567136fe20c33cf9c818fcb7c6f864da8f8da 100644 (file)
@@ -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);
index e583ef6a02df28a681e59e57aa73336df9ea7d46..0fb108378d45f51a49c2530a5d907dc2697a0e54 100644 (file)
@@ -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)
index a9cb17d772989d53bb214c9449b68ce1a70895e1..3adec519807e4945240ff07ed0ad1f1e3d98a68e 100644 (file)
@@ -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)
index fb9f80506bf4de6345bd13cab15b350a0ea0ccb2..7abe14b12946309ed89f56dd224f15d689e3722a 100644 (file)
@@ -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)
index 73e4cade91f2e678bfd08406f0d6b46ce3c16462..75a9cbc88895e4a2201519c45b8b2a0d460b5257 100644 (file)
@@ -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)
index be36565c45592c61439a14949cce85be5c665189..2b6abe2605a66500dbab4616256215be61486a48 100644 (file)
@@ -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
index 54fa24387d14c2702078eb87d9f0740cf83ed682..f659445bbd1510a4417fbb70ce7808ab3dbb610c 100644 (file)
@@ -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)
index f904a2ad311e38f6f328073be9e08f1f0f14fd34..ed150534a55c3f9f49d443ba8aee810b9d8d9b8a 100644 (file)
@@ -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)
index ba11bf98e8c3c23db4226008a1bb0e689d3bc864..5e99e83bd4aaca14665914f35e8604ee336e0815 100644 (file)
 
 #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*"},
index 5616999c710b98cf298f6e672a1184fc59367535..6d99ef90f942dac8d6c9425734cf0f3f468e55a7 100644 (file)
@@ -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,
index 59bcc86c295d9c4e59e289357628939d0c0cb847..e3252bea3ad2a293c74aa2589776e711752e3ed1 100644 (file)
@@ -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)
index b8b6e42a6fefbfd2c8997f2e100bd2fa75f482fe..d5d1f40f8b635cef92c221245f98ca4bb7a73c69 100644 (file)
@@ -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)
index 5a5ba7c222b7e6989d7781c0882bc353cb865b1c..f25347c12d77d2c21a0dd4a1bd22b900fb5f24c5 100644 (file)
@@ -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)
index bb5f30320fac736c0cfebadd7049ca57d16ee8c5..cf52720a7c0f974f1591191f06e38032e7f2c56b 100644 (file)
@@ -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
index 6dce13346e45c1ed020fb2d0e2074a7a85d2b2f0..88cbceb95a399e714b872febe55e4d79a77ca730 100644 (file)
@@ -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)
index 694fde95c3d17b8b31e2ce2d2c677bfad6b81b60..b6c19cc039a6cdd093de8b61e010a8b9e5749f34 100644 (file)
@@ -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 */
index 3db00ab22f1cca8af029a5fc75266186b4db0498..bbfb7e20c1fba26af070cd61d2ef53d964f17582 100644 (file)
@@ -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)
index 2f6bae641d5f89a12e2f82f4e26101bcd4febd8c..0670a514c21497d6f09b779d56fd10773920f850 100644 (file)
@@ -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)
index 773225a64dbfb6f8c5c7b8808096f081a33cb71a..15b6edb785b2392f6bbeb8c94c457e5836f5c37d 100644 (file)
@@ -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)
index a8417b6b89e7de92ea638af5d186966257c70d9f..1ee7641e58cb70fa927a2e01812a2fabf9a1ff48 100644 (file)
@@ -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" },
index ef353a17866265035a147a86bc76977a285d3499..7abf25addc1ae49763c79ebc89287bbb2ff6bd38 100644 (file)
@@ -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@
 };
 
index 887e3cd0f09ae433e6356bd46d1161d9af8f2503..ca3b3b707222cef6f58175ddaf0304a4ccc85ed0 100644 (file)
 
 /* {{{ 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
index 99cb6612d46f822f1652a992c18af25b599ff24b..8842f8f86f240e508f4a45c7f60098a237b152c3 100644 (file)
@@ -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) {
index 539f9e745620d8afed6ac0405f4a53df4dab7702..be4aaab5420bfaf523ef92ef94f95aeaaeac7742 100644 (file)
@@ -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);
index 2884c28ee79041dad3e028172930a29eb27f4b8b..25f6dc010e43e3e6702b31678768745160f1624b 100644 (file)
@@ -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)
index 17704652d6d8be945f739666e3644c8257f37764..202c2e837cdced320a3ff1fe08ed70cb22af2a13 100644 (file)
@@ -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)
index 2eefb18d9425603d8b7ca3d4fea8e007175db5b9..f47951bb16532a978f2c4ad6613f99391bfac0eb 100644 (file)
@@ -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)