diff options
author | Dmitry Stogov <dmitry@zend.com> | 2017-12-14 18:43:44 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2017-12-14 18:43:44 +0300 |
commit | 9e709e2fa02b85d0d10c864d6c996e3368e977ce (patch) | |
tree | 148bedd2674933ba40e59f15fcfa2981f7aead85 /main | |
parent | 71eaf0d97f173093253163db8c4720bd62387e34 (diff) | |
download | php-git-9e709e2fa02b85d0d10c864d6c996e3368e977ce.tar.gz |
Move constants into read-only data segment
Diffstat (limited to 'main')
-rw-r--r-- | main/http_status_codes.h | 2 | ||||
-rw-r--r-- | main/internal_functions.c.in | 2 | ||||
-rw-r--r-- | main/internal_functions_win32.c | 2 | ||||
-rw-r--r-- | main/main.c | 4 | ||||
-rw-r--r-- | main/php_main.h | 2 |
5 files changed, 6 insertions, 6 deletions
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); |