Improved memory usage by movig constants to read only memory. (Dmitry, Pierre)

This commit is contained in:
Dmitry Stogov 2007-09-27 18:28:44 +00:00
parent 98a2c03808
commit 8146078f7b
164 changed files with 464 additions and 464 deletions

View file

@ -247,7 +247,7 @@ typedef union _zstr {
#endif #endif
#ifdef __GNUC__ #ifdef __GNUC__
# define ZSTR(x) ((zstr)(x)) # define ZSTR(x) ((zstr)((void*)(x)))
# define NULL_ZSTR ZSTR((void*)NULL) # define NULL_ZSTR ZSTR((void*)NULL)
# define EMPTY_ZSTR ZSTR("\0\0") # define EMPTY_ZSTR ZSTR("\0\0")
#else #else
@ -368,7 +368,7 @@ struct _zend_class_entry {
HashTable default_static_members; HashTable default_static_members;
HashTable *static_members; HashTable *static_members;
HashTable constants_table; HashTable constants_table;
struct _zend_function_entry *builtin_functions; const struct _zend_function_entry *builtin_functions;
union _zend_function *constructor; union _zend_function *constructor;
union _zend_function *destructor; union _zend_function *destructor;

View file

@ -1342,32 +1342,32 @@ ZEND_API int _object_init(zval *arg ZEND_FILE_LINE_DC TSRMLS_DC) /* {{{ */
} }
/* }}} */ /* }}} */
ZEND_API int add_assoc_function(zval *arg, char *key, void (*function_ptr)(INTERNAL_FUNCTION_PARAMETERS)) /* {{{ */ ZEND_API int add_assoc_function(zval *arg, const char *key, void (*function_ptr)(INTERNAL_FUNCTION_PARAMETERS)) /* {{{ */
{ {
zend_error(E_WARNING, "add_assoc_function() is no longer supported"); zend_error(E_WARNING, "add_assoc_function() is no longer supported");
return FAILURE; return FAILURE;
} }
/* }}} */ /* }}} */
ZEND_API int add_assoc_zval_ex(zval *arg, char *key, uint key_len, zval *value) /* {{{ */ ZEND_API int add_assoc_zval_ex(zval *arg, const char *key, uint key_len, zval *value) /* {{{ */
{ {
return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &value, sizeof(zval *), NULL); return zend_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void *) &value, sizeof(zval *), NULL);
} }
/* }}} */ /* }}} */
ZEND_API int add_ascii_assoc_zval_ex(zval *arg, char *key, uint key_len, zval *value) /* {{{ */ ZEND_API int add_ascii_assoc_zval_ex(zval *arg, const char *key, uint key_len, zval *value) /* {{{ */
{ {
return zend_ascii_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void*)&value, sizeof(zval*), NULL); return zend_ascii_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void*)&value, sizeof(zval*), NULL);
} }
/* }}} */ /* }}} */
ZEND_API int add_rt_assoc_zval_ex(zval *arg, char *key, uint key_len, zval *value) /* {{{ */ ZEND_API int add_rt_assoc_zval_ex(zval *arg, const char *key, uint key_len, zval *value) /* {{{ */
{ {
return zend_rt_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void*)&value, sizeof(zval*), NULL); return zend_rt_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void*)&value, sizeof(zval*), NULL);
} }
/* }}} */ /* }}} */
ZEND_API int add_utf8_assoc_zval_ex(zval *arg, char *key, uint key_len, zval *value) /* {{{ */ ZEND_API int add_utf8_assoc_zval_ex(zval *arg, const char *key, uint key_len, zval *value) /* {{{ */
{ {
return zend_utf8_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void*)&value, sizeof(zval*), NULL); return zend_utf8_symtable_update(Z_ARRVAL_P(arg), key, key_len, (void*)&value, sizeof(zval*), NULL);
} }
@ -1391,7 +1391,7 @@ ZEND_API int add_next_index_zval(zval *arg, zval *value) /* {{{ */
} }
/* }}} */ /* }}} */
ZEND_API int add_get_assoc_string_ex(zval *arg, char *key, uint key_len, char *str, void **dest, int duplicate) /* {{{ */ ZEND_API int add_get_assoc_string_ex(zval *arg, const char *key, uint key_len, const char *str, void **dest, int duplicate) /* {{{ */
{ {
zval *tmp; zval *tmp;
@ -1402,7 +1402,7 @@ ZEND_API int add_get_assoc_string_ex(zval *arg, char *key, uint key_len, char *s
} }
/* }}} */ /* }}} */
ZEND_API int add_get_assoc_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, void **dest, int duplicate) /* {{{ */ ZEND_API int add_get_assoc_stringl_ex(zval *arg, const char *key, uint key_len, const char *str, uint length, void **dest, int duplicate) /* {{{ */
{ {
zval *tmp; zval *tmp;
@ -1435,7 +1435,7 @@ ZEND_API int add_get_index_double(zval *arg, ulong index, double d, void **dest)
} }
/* }}} */ /* }}} */
ZEND_API int add_get_index_string(zval *arg, ulong index, char *str, void **dest, int duplicate) /* {{{ */ ZEND_API int add_get_index_string(zval *arg, ulong index, const char *str, void **dest, int duplicate) /* {{{ */
{ {
zval *tmp; zval *tmp;
@ -1446,7 +1446,7 @@ ZEND_API int add_get_index_string(zval *arg, ulong index, char *str, void **dest
} }
/* }}} */ /* }}} */
ZEND_API int add_get_index_stringl(zval *arg, ulong index, char *str, uint length, void **dest, int duplicate) /* {{{ */ ZEND_API int add_get_index_stringl(zval *arg, ulong index, const char *str, uint length, void **dest, int duplicate) /* {{{ */
{ {
zval *tmp; zval *tmp;
@ -1833,7 +1833,7 @@ ZEND_API int zend_startup_module_ex(zend_module_entry *module TSRMLS_DC) /* {{{
/* Check module dependencies */ /* Check module dependencies */
if (module->deps) { if (module->deps) {
zend_module_dep *dep = module->deps; const zend_module_dep *dep = module->deps;
while (dep->name) { while (dep->name) {
if (dep->type == MODULE_DEP_REQUIRED) { if (dep->type == MODULE_DEP_REQUIRED) {
@ -1892,7 +1892,7 @@ static void zend_sort_modules(void *base, size_t count, size_t siz, compare_func
try_again: try_again:
m = (zend_module_entry*)(*b1)->pData; m = (zend_module_entry*)(*b1)->pData;
if (!m->module_started && m->deps) { if (!m->module_started && m->deps) {
zend_module_dep *dep = m->deps; const zend_module_dep *dep = m->deps;
while (dep->name) { while (dep->name) {
if (dep->type == MODULE_DEP_REQUIRED || dep->type == MODULE_DEP_OPTIONAL) { if (dep->type == MODULE_DEP_REQUIRED || dep->type == MODULE_DEP_OPTIONAL) {
b2 = b1 + 1; b2 = b1 + 1;
@ -1939,7 +1939,7 @@ ZEND_API zend_module_entry* zend_register_module_ex(zend_module_entry *module TS
/* Check module dependencies */ /* Check module dependencies */
if (module->deps) { if (module->deps) {
zend_module_dep *dep = module->deps; const zend_module_dep *dep = module->deps;
while (dep->name) { while (dep->name) {
if (dep->type == MODULE_DEP_CONFLICTS) { if (dep->type == MODULE_DEP_CONFLICTS) {
@ -2062,9 +2062,9 @@ ZEND_API void zend_check_magic_method_implementation(zend_class_entry *ce, zend_
/* }}} */ /* }}} */
/* registers all functions in *library_functions in the function hash */ /* registers all functions in *library_functions in the function hash */
ZEND_API int zend_register_functions(zend_class_entry *scope, zend_function_entry *functions, HashTable *function_table, int type TSRMLS_DC) /* {{{ */ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_function_entry *functions, HashTable *function_table, int type TSRMLS_DC) /* {{{ */
{ {
zend_function_entry *ptr = functions; const zend_function_entry *ptr = functions;
zend_function function, *reg_function; zend_function function, *reg_function;
zend_internal_function *internal_function = (zend_internal_function *)&function; zend_internal_function *internal_function = (zend_internal_function *)&function;
int count=0, unload=0; int count=0, unload=0;
@ -2100,7 +2100,7 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, zend_function_entr
internal_function->function_name.u = malloc(UBYTES(len)); internal_function->function_name.u = malloc(UBYTES(len));
u_charsToUChars(ptr->fname, internal_function->function_name.u, len); u_charsToUChars(ptr->fname, internal_function->function_name.u, len);
} else { } else {
internal_function->function_name.s = ptr->fname; internal_function->function_name.s = (char*)ptr->fname;
} }
internal_function->scope = scope; internal_function->scope = scope;
internal_function->prototype = NULL; internal_function->prototype = NULL;
@ -2125,7 +2125,7 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, zend_function_entr
} }
} }
} else { } else {
internal_function->arg_info = ptr->arg_info+1; internal_function->arg_info = (zend_arg_info*)ptr->arg_info+1;
} }
internal_function->num_args = ptr->num_args; internal_function->num_args = ptr->num_args;
/* Currently you cannot denote that the function can accept less arguments than num_args */ /* Currently you cannot denote that the function can accept less arguments than num_args */
@ -2333,9 +2333,9 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, zend_function_entr
/* count=-1 means erase all functions, otherwise, /* count=-1 means erase all functions, otherwise,
* erase the first count functions * erase the first count functions
*/ */
ZEND_API void zend_unregister_functions(zend_function_entry *functions, int count, HashTable *function_table TSRMLS_DC) /* {{{ */ ZEND_API void zend_unregister_functions(const zend_function_entry *functions, int count, HashTable *function_table TSRMLS_DC) /* {{{ */
{ {
zend_function_entry *ptr = functions; const zend_function_entry *ptr = functions;
int i=0; int i=0;
HashTable *target_function_table = function_table; HashTable *target_function_table = function_table;
@ -2599,7 +2599,7 @@ static zend_object_value display_disabled_class(zend_class_entry *class_type TSR
} }
/* }}} */ /* }}} */
static zend_function_entry disabled_class_new[] = { static const zend_function_entry disabled_class_new[] = {
{ NULL, NULL, NULL } { NULL, NULL, NULL }
}; };
@ -3163,7 +3163,7 @@ ZEND_API int zend_fcall_info_call(zend_fcall_info *fci, zend_fcall_info_cache *f
} }
/* }}} */ /* }}} */
ZEND_API char *zend_get_module_version(char *module_name) /* {{{ */ ZEND_API const char *zend_get_module_version(const char *module_name) /* {{{ */
{ {
char *lname; char *lname;
int name_len = strlen(module_name); int name_len = strlen(module_name);

View file

@ -33,9 +33,9 @@
BEGIN_EXTERN_C() BEGIN_EXTERN_C()
typedef struct _zend_function_entry { typedef struct _zend_function_entry {
char *fname; const char *fname;
void (*handler)(INTERNAL_FUNCTION_PARAMETERS); void (*handler)(INTERNAL_FUNCTION_PARAMETERS);
struct _zend_arg_info *arg_info; const struct _zend_arg_info *arg_info;
zend_uint num_args; zend_uint num_args;
zend_uint flags; zend_uint flags;
} zend_function_entry; } zend_function_entry;
@ -68,7 +68,7 @@ typedef struct _zend_function_entry {
#define ZEND_ARG_OBJ_INFO(pass_by_ref, name, classname, allow_null) { {#name}, sizeof(#name)-1, {#classname}, sizeof(#classname)-1, 0, allow_null, pass_by_ref, 0, 0 }, #define ZEND_ARG_OBJ_INFO(pass_by_ref, name, classname, allow_null) { {#name}, sizeof(#name)-1, {#classname}, sizeof(#classname)-1, 0, allow_null, pass_by_ref, 0, 0 },
#define ZEND_ARG_ARRAY_INFO(pass_by_ref, name, allow_null) { {#name}, sizeof(#name)-1, {NULL}, 0, 1, allow_null, pass_by_ref, 0, 0 }, #define ZEND_ARG_ARRAY_INFO(pass_by_ref, name, allow_null) { {#name}, sizeof(#name)-1, {NULL}, 0, 1, allow_null, pass_by_ref, 0, 0 },
#define ZEND_BEGIN_ARG_INFO_EX(name, pass_rest_by_reference, return_reference, required_num_args) \ #define ZEND_BEGIN_ARG_INFO_EX(name, pass_rest_by_reference, return_reference, required_num_args) \
zend_arg_info name[] = { \ const zend_arg_info name[] = { \
{ {NULL}, 0, {NULL}, 0, 0, 0, pass_rest_by_reference, return_reference, required_num_args }, { {NULL}, 0, {NULL}, 0, 0, 0, pass_rest_by_reference, return_reference, required_num_args },
#define ZEND_BEGIN_ARG_INFO(name, pass_rest_by_reference) \ #define ZEND_BEGIN_ARG_INFO(name, pass_rest_by_reference) \
ZEND_BEGIN_ARG_INFO_EX(name, pass_rest_by_reference, ZEND_RETURN_VALUE, -1) ZEND_BEGIN_ARG_INFO_EX(name, pass_rest_by_reference, ZEND_RETURN_VALUE, -1)
@ -208,8 +208,8 @@ ZEND_API int zend_parse_method_parameters_ex(int flags, int num_args TSRMLS_DC,
/* End of parameter parsing API -- andrei */ /* End of parameter parsing API -- andrei */
ZEND_API int zend_register_functions(zend_class_entry *scope, zend_function_entry *functions, HashTable *function_table, int type TSRMLS_DC); ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_function_entry *functions, HashTable *function_table, int type TSRMLS_DC);
ZEND_API void zend_unregister_functions(zend_function_entry *functions, int count, HashTable *function_table TSRMLS_DC); ZEND_API void zend_unregister_functions(const zend_function_entry *functions, int count, HashTable *function_table TSRMLS_DC);
ZEND_API int zend_startup_module(zend_module_entry *module_entry); ZEND_API int zend_startup_module(zend_module_entry *module_entry);
ZEND_API zend_module_entry* zend_register_internal_module(zend_module_entry *module_entry TSRMLS_DC); ZEND_API zend_module_entry* zend_register_internal_module(zend_module_entry *module_entry TSRMLS_DC);
ZEND_API zend_module_entry* zend_register_module_ex(zend_module_entry *module TSRMLS_DC); ZEND_API zend_module_entry* zend_register_module_ex(zend_module_entry *module TSRMLS_DC);
@ -236,7 +236,7 @@ ZEND_API void zend_wrong_param_count(TSRMLS_D);
ZEND_API zend_bool zend_is_callable_ex(zval *callable, uint check_flags, zval *callable_name, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zval ***zobj_ptr_ptr TSRMLS_DC); ZEND_API zend_bool zend_is_callable_ex(zval *callable, uint check_flags, zval *callable_name, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zval ***zobj_ptr_ptr TSRMLS_DC);
ZEND_API zend_bool zend_is_callable(zval *callable, uint check_flags, zval *callable_name); ZEND_API zend_bool zend_is_callable(zval *callable, uint check_flags, zval *callable_name);
ZEND_API zend_bool zend_make_callable(zval *callable, zval *callable_name TSRMLS_DC); ZEND_API zend_bool zend_make_callable(zval *callable, zval *callable_name TSRMLS_DC);
ZEND_API char *zend_get_module_version(char *module_name); ZEND_API const char *zend_get_module_version(const char *module_name);
ZEND_API int zend_get_module_started(char *module_name); ZEND_API int zend_get_module_started(char *module_name);
ZEND_API int zend_declare_property(zend_class_entry *ce, char *name, int name_length, zval *property, int access_type TSRMLS_DC); ZEND_API int zend_declare_property(zend_class_entry *ce, char *name, int name_length, zval *property, int access_type TSRMLS_DC);
ZEND_API int zend_declare_property_ex(zend_class_entry *ce, char *name, int name_length, zval *property, int access_type, zstr doc_comment, int doc_comment_len TSRMLS_DC); ZEND_API int zend_declare_property_ex(zend_class_entry *ce, char *name, int name_length, zval *property, int access_type, zstr doc_comment, int doc_comment_len TSRMLS_DC);
@ -336,12 +336,12 @@ ZEND_API int _object_and_properties_init(zval *arg, zend_class_entry *ce, HashTa
ZEND_API void zend_merge_properties(zval *obj, HashTable *properties, int destroy_ht TSRMLS_DC); ZEND_API void zend_merge_properties(zval *obj, HashTable *properties, int destroy_ht TSRMLS_DC);
/* no longer supported */ /* no longer supported */
ZEND_API int add_assoc_function(zval *arg, char *key, void (*function_ptr)(INTERNAL_FUNCTION_PARAMETERS)); ZEND_API int add_assoc_function(zval *arg, const char *key, void (*function_ptr)(INTERNAL_FUNCTION_PARAMETERS));
#define ZSTR_DUPLICATE (1<<0) #define ZSTR_DUPLICATE (1<<0)
#define ZSTR_AUTOFREE (1<<1) #define ZSTR_AUTOFREE (1<<1)
ZEND_API int add_assoc_zval_ex(zval *arg, char *key, uint key_len, zval *value); ZEND_API int add_assoc_zval_ex(zval *arg, const char *key, uint key_len, zval *value);
#define add_assoc_null_ex(arg, key, key_len) do { \ #define add_assoc_null_ex(arg, key, key_len) do { \
zval *___tmp; \ zval *___tmp; \
@ -485,7 +485,7 @@ ZEND_API int add_assoc_zval_ex(zval *arg, char *key, uint key_len, zval *value);
#define add_assoc_text(arg, key, str, duplicate) add_assoc_text_ex(arg, key, strlen(key)+1, str, duplicate) #define add_assoc_text(arg, key, str, duplicate) add_assoc_text_ex(arg, key, strlen(key)+1, str, duplicate)
#define add_assoc_textl(arg, key, str, length, duplicate) add_assoc_textl_ex(arg, key, strlen(key)+1, str, length, duplicate) #define add_assoc_textl(arg, key, str, length, duplicate) add_assoc_textl_ex(arg, key, strlen(key)+1, str, length, duplicate)
ZEND_API int add_ascii_assoc_zval_ex(zval *arg, char *key, uint key_len, zval *value); ZEND_API int add_ascii_assoc_zval_ex(zval *arg, const char *key, uint key_len, zval *value);
#define add_ascii_assoc_null_ex(arg, key, key_len) do { \ #define add_ascii_assoc_null_ex(arg, key, key_len) do { \
zval *___tmp; \ zval *___tmp; \
@ -630,7 +630,7 @@ ZEND_API int add_ascii_assoc_zval_ex(zval *arg, char *key, uint key_len, zval *v
#define add_ascii_assoc_text(__arg, __key, __str, __duplicate) add_ascii_assoc_text_ex(__arg, __key, strlen(__key)+1, __str, __duplicate) #define add_ascii_assoc_text(__arg, __key, __str, __duplicate) add_ascii_assoc_text_ex(__arg, __key, strlen(__key)+1, __str, __duplicate)
#define add_ascii_assoc_textl(__arg, __key, __str, __length, __duplicate) add_ascii_assoc_textl_ex(__arg, __key, strlen(__key)+1, __str, __length, __duplicate) #define add_ascii_assoc_textl(__arg, __key, __str, __length, __duplicate) add_ascii_assoc_textl_ex(__arg, __key, strlen(__key)+1, __str, __length, __duplicate)
ZEND_API int add_rt_assoc_zval_ex(zval *arg, char *key, uint key_len, zval *value); ZEND_API int add_rt_assoc_zval_ex(zval *arg, const char *key, uint key_len, zval *value);
#define add_rt_assoc_null_ex(arg, key, key_len) do { \ #define add_rt_assoc_null_ex(arg, key, key_len) do { \
zval *___tmp; \ zval *___tmp; \
@ -775,7 +775,7 @@ ZEND_API int add_rt_assoc_zval_ex(zval *arg, char *key, uint key_len, zval *valu
#define add_rt_assoc_text(__arg, __key, __str, __duplicate) add_rt_assoc_text_ex(__arg, __key, strlen(__key)+1, __str, __duplicate) #define add_rt_assoc_text(__arg, __key, __str, __duplicate) add_rt_assoc_text_ex(__arg, __key, strlen(__key)+1, __str, __duplicate)
#define add_rt_assoc_textl(__arg, __key, __str, __length, __duplicate) add_rt_assoc_textl_ex(__arg, __key, strlen(__key)+1, __str, __length, __duplicate) #define add_rt_assoc_textl(__arg, __key, __str, __length, __duplicate) add_rt_assoc_textl_ex(__arg, __key, strlen(__key)+1, __str, __length, __duplicate)
ZEND_API int add_utf8_assoc_zval_ex(zval *arg, char *key, uint key_len, zval *value); ZEND_API int add_utf8_assoc_zval_ex(zval *arg, const char *key, uint key_len, zval *value);
#define add_utf8_assoc_null_ex(arg, key, key_len) do { \ #define add_utf8_assoc_null_ex(arg, key, key_len) do { \
zval *___tmp; \ zval *___tmp; \
@ -1401,7 +1401,7 @@ ZEND_API int add_next_index_zval(zval *arg, zval *value);
UChar *___u_str = zend_ascii_to_unicode((str), (___u_len)+1 ZEND_FILE_LINE_CC); \ UChar *___u_str = zend_ascii_to_unicode((str), (___u_len)+1 ZEND_FILE_LINE_CC); \
___u_str[___u_len] = 0; \ ___u_str[___u_len] = 0; \
if ((flags) & ZSTR_AUTOFREE) { \ if ((flags) & ZSTR_AUTOFREE) { \
efree(str); \ efree((char*)(str)); \
} \ } \
add_next_index_unicodel(arg, ___u_str, ___u_len, 0); \ add_next_index_unicodel(arg, ___u_str, ___u_len, 0); \
} else { \ } else { \
@ -1416,7 +1416,7 @@ ZEND_API int add_next_index_zval(zval *arg, zval *value);
add_next_index_unicodel(arg, ___u_str, ___u_len, 0); \ add_next_index_unicodel(arg, ___u_str, ___u_len, 0); \
} \ } \
if ((flags) & ZSTR_AUTOFREE) { \ if ((flags) & ZSTR_AUTOFREE) { \
efree(str); \ efree((char*)(str)); \
} \ } \
} else { \ } else { \
add_next_index_stringl(arg, (char*)(str), length, (flags) & ZSTR_DUPLICATE); \ add_next_index_stringl(arg, (char*)(str), length, (flags) & ZSTR_DUPLICATE); \
@ -1430,7 +1430,7 @@ ZEND_API int add_next_index_zval(zval *arg, zval *value);
add_next_index_unicodel(arg, ___u_str, ___u_len, 0); \ add_next_index_unicodel(arg, ___u_str, ___u_len, 0); \
} \ } \
if ((flags) & ZSTR_AUTOFREE) { \ if ((flags) & ZSTR_AUTOFREE) { \
efree(str); \ efree((char*)(str)); \
} \ } \
} else { \ } else { \
add_next_index_stringl(arg, (char*)(str), length, (flags) & ZSTR_DUPLICATE); \ add_next_index_stringl(arg, (char*)(str), length, (flags) & ZSTR_DUPLICATE); \
@ -1448,16 +1448,16 @@ ZEND_API int add_next_index_zval(zval *arg, zval *value);
#define add_next_index_unset(__arg) add_next_index_null(__arg) #define add_next_index_unset(__arg) add_next_index_null(__arg)
#define add_property_unset(__arg, __key) add_property_null(__arg, __key) #define add_property_unset(__arg, __key) add_property_null(__arg, __key)
ZEND_API int add_get_assoc_string_ex(zval *arg, char *key, uint key_len, char *str, void **dest, int duplicate); ZEND_API int add_get_assoc_string_ex(zval *arg, const char *key, uint key_len, const char *str, void **dest, int duplicate);
ZEND_API int add_get_assoc_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, void **dest, int duplicate); ZEND_API int add_get_assoc_stringl_ex(zval *arg, const char *key, uint key_len, const char *str, uint length, void **dest, int duplicate);
#define add_get_assoc_string(__arg, __key, __str, __dest, __duplicate) add_get_assoc_string_ex(__arg, __key, strlen(__key)+1, __str, __dest, __duplicate) #define add_get_assoc_string(__arg, __key, __str, __dest, __duplicate) add_get_assoc_string_ex(__arg, __key, strlen(__key)+1, __str, __dest, __duplicate)
#define add_get_assoc_stringl(__arg, __key, __str, __length, __dest, __duplicate) add_get_assoc_stringl_ex(__arg, __key, strlen(__key)+1, __str, __length, __dest, __duplicate) #define add_get_assoc_stringl(__arg, __key, __str, __length, __dest, __duplicate) add_get_assoc_stringl_ex(__arg, __key, strlen(__key)+1, __str, __length, __dest, __duplicate)
ZEND_API int add_get_index_long(zval *arg, ulong idx, long l, void **dest); ZEND_API int add_get_index_long(zval *arg, ulong idx, long l, void **dest);
ZEND_API int add_get_index_double(zval *arg, ulong idx, double d, void **dest); ZEND_API int add_get_index_double(zval *arg, ulong idx, double d, void **dest);
ZEND_API int add_get_index_string(zval *arg, ulong idx, char *str, void **dest, int duplicate); ZEND_API int add_get_index_string(zval *arg, ulong idx, const char *str, void **dest, int duplicate);
ZEND_API int add_get_index_stringl(zval *arg, ulong idx, char *str, uint length, void **dest, int duplicate); ZEND_API int add_get_index_stringl(zval *arg, ulong idx, const char *str, uint length, void **dest, int duplicate);
ZEND_API int add_get_index_unicode(zval *arg, ulong idx, UChar *str, void **dest, int duplicate); ZEND_API int add_get_index_unicode(zval *arg, ulong idx, UChar *str, void **dest, int duplicate);
ZEND_API int add_get_index_unicodel(zval *arg, ulong idx, UChar *str, uint length, void **dest, int duplicate); ZEND_API int add_get_index_unicodel(zval *arg, ulong idx, UChar *str, uint length, void **dest, int duplicate);
@ -1636,22 +1636,22 @@ END_EXTERN_C()
} }
#define ZVAL_STRING(z, s, duplicate) { \ #define ZVAL_STRING(z, s, duplicate) { \
char *__s=(s); \ const char *__s=(s); \
Z_STRLEN_P(z) = strlen(__s); \ Z_STRLEN_P(z) = strlen(__s); \
Z_STRVAL_P(z) = (duplicate?estrndup(__s, Z_STRLEN_P(z)):__s); \ Z_STRVAL_P(z) = (duplicate?estrndup(__s, Z_STRLEN_P(z)):(char*)__s); \
Z_TYPE_P(z) = IS_STRING; \ Z_TYPE_P(z) = IS_STRING; \
} }
#define ZVAL_STRINGL(z, s, l, duplicate) { \ #define ZVAL_STRINGL(z, s, l, duplicate) { \
char *__s=(s); int __l=l; \ const char *__s=(s); int __l=l; \
Z_STRLEN_P(z) = __l; \ Z_STRLEN_P(z) = __l; \
Z_STRVAL_P(z) = (duplicate?estrndup(__s, __l):__s); \ Z_STRVAL_P(z) = (duplicate?estrndup(__s, __l):(char*)__s); \
Z_TYPE_P(z) = IS_STRING; \ Z_TYPE_P(z) = IS_STRING; \
} }
#define ZVAL_ASCII_STRING(z, s, flags) { \ #define ZVAL_ASCII_STRING(z, s, flags) { \
if (UG(unicode)) { \ if (UG(unicode)) { \
char *__s = (s); \ char *__s = (char*)(s); \
int __s_len = strlen(__s); \ int __s_len = strlen(__s); \
UChar *u_str = zend_ascii_to_unicode(__s, __s_len+1 ZEND_FILE_LINE_CC); \ UChar *u_str = zend_ascii_to_unicode(__s, __s_len+1 ZEND_FILE_LINE_CC); \
u_str[__s_len] = 0; \ u_str[__s_len] = 0; \
@ -1660,16 +1660,16 @@ END_EXTERN_C()
} \ } \
ZVAL_UNICODEL(z, u_str, __s_len, 0); \ ZVAL_UNICODEL(z, u_str, __s_len, 0); \
} else { \ } else { \
char *__s=(s); \ const char *__s=(s); \
Z_STRLEN_P(z) = strlen(__s); \ Z_STRLEN_P(z) = strlen(__s); \
Z_STRVAL_P(z) = (((flags) & ZSTR_DUPLICATE) ? estrndup(__s, Z_STRLEN_P(z)) : __s); \ Z_STRVAL_P(z) = (((flags) & ZSTR_DUPLICATE) ? estrndup(__s, Z_STRLEN_P(z)) :(char*) __s); \
Z_TYPE_P(z) = IS_STRING; \ Z_TYPE_P(z) = IS_STRING; \
} \ } \
} }
#define ZVAL_ASCII_STRINGL(z, s, l, flags) { \ #define ZVAL_ASCII_STRINGL(z, s, l, flags) { \
if (UG(unicode)) { \ if (UG(unicode)) { \
char *__s = (s); \ char *__s = (char*)(s); \
int __s_len = (l); \ int __s_len = (l); \
UChar *u_str = zend_ascii_to_unicode((__s), (__s_len)+1 ZEND_FILE_LINE_CC); \ UChar *u_str = zend_ascii_to_unicode((__s), (__s_len)+1 ZEND_FILE_LINE_CC); \
u_str[__s_len] = 0; \ u_str[__s_len] = 0; \
@ -1678,9 +1678,9 @@ END_EXTERN_C()
} \ } \
ZVAL_UNICODEL(z, u_str, __s_len, 0); \ ZVAL_UNICODEL(z, u_str, __s_len, 0); \
} else { \ } else { \
char *__s=(s); int __l=l; \ const char *__s=(s); int __l=l; \
Z_STRLEN_P(z) = __l; \ Z_STRLEN_P(z) = __l; \
Z_STRVAL_P(z) = (((flags) & ZSTR_DUPLICATE) ? estrndup(__s, __l) : __s); \ Z_STRVAL_P(z) = (((flags) & ZSTR_DUPLICATE) ? estrndup(__s, __l) : (char*)__s); \
Z_TYPE_P(z) = IS_STRING; \ Z_TYPE_P(z) = IS_STRING; \
} \ } \
} }
@ -1700,7 +1700,7 @@ END_EXTERN_C()
} else { \ } else { \
char *__s=(char *)(s); \ char *__s=(char *)(s); \
Z_STRLEN_P(z) = strlen(__s); \ Z_STRLEN_P(z) = strlen(__s); \
Z_STRVAL_P(z) = (((flags) & ZSTR_DUPLICATE) ? estrndup(__s, Z_STRLEN_P(z)) : __s); \ Z_STRVAL_P(z) = (((flags) & ZSTR_DUPLICATE) ? estrndup(__s, Z_STRLEN_P(z)) : (char*)__s); \
Z_TYPE_P(z) = IS_STRING; \ Z_TYPE_P(z) = IS_STRING; \
} \ } \
} }

View file

@ -89,7 +89,7 @@ static ZEND_FUNCTION(zend_thread_id);
#include "zend_arg_defs.c" #include "zend_arg_defs.c"
static zend_function_entry builtin_functions[] = { /* {{{ */ static const zend_function_entry builtin_functions[] = { /* {{{ */
ZEND_FE(zend_version, NULL) ZEND_FE(zend_version, NULL)
ZEND_FE(func_num_args, NULL) ZEND_FE(func_num_args, NULL)
ZEND_FE(func_get_arg, NULL) ZEND_FE(func_get_arg, NULL)
@ -1728,7 +1728,7 @@ ZEND_FUNCTION(get_defined_constants)
zend_constant *val; zend_constant *val;
int module_number; int module_number;
zval **modules; zval **modules;
char **module_names; const char **module_names;
zend_module_entry *module; zend_module_entry *module;
int i = 1; int i = 1;
@ -2282,7 +2282,7 @@ ZEND_FUNCTION(get_extension_funcs)
zend_uchar ext_type; zend_uchar ext_type;
char *name; char *name;
zend_module_entry *module; zend_module_entry *module;
zend_function_entry *func; const zend_function_entry *func;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "t", &ext, &ext_len, &ext_type) == FAILURE) { if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "t", &ext, &ext_len, &ext_type) == FAILURE) {
return; return;

View file

@ -620,7 +620,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_exception___construct, 0, 0, 0)
ZEND_ARG_INFO(0, code) ZEND_ARG_INFO(0, code)
ZEND_END_ARG_INFO() ZEND_END_ARG_INFO()
static zend_function_entry default_exception_functions[] = { static const zend_function_entry default_exception_functions[] = {
ZEND_ME(exception, __clone, NULL, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL) ZEND_ME(exception, __clone, NULL, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL)
ZEND_ME(exception, __construct, arginfo_exception___construct, ZEND_ACC_PUBLIC) ZEND_ME(exception, __construct, arginfo_exception___construct, ZEND_ACC_PUBLIC)
ZEND_ME(exception, getMessage, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) ZEND_ME(exception, getMessage, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
@ -642,7 +642,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_error_exception___construct, 0, 0, 0)
ZEND_ARG_INFO(0, lineno) ZEND_ARG_INFO(0, lineno)
ZEND_END_ARG_INFO() ZEND_END_ARG_INFO()
static zend_function_entry error_exception_functions[] = { static const zend_function_entry error_exception_functions[] = {
ZEND_ME(error_exception, __construct, arginfo_error_exception___construct, ZEND_ACC_PUBLIC) ZEND_ME(error_exception, __construct, arginfo_error_exception___construct, ZEND_ACC_PUBLIC)
ZEND_ME(error_exception, getSeverity, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) ZEND_ME(error_exception, getSeverity, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
{NULL, NULL, NULL} {NULL, NULL, NULL}

View file

@ -126,7 +126,7 @@ ZEND_API ulong zend_u_hash_func(zend_uchar type, zstr arKey, uint nKeyLength) /*
} }
/* }}} */ /* }}} */
ZEND_API ulong zend_hash_func(char *arKey, uint nKeyLength) /* {{{ */ ZEND_API ulong zend_hash_func(const char *arKey, uint nKeyLength) /* {{{ */
{ {
return zend_u_hash_func(IS_STRING, ZSTR(arKey), nKeyLength); return zend_u_hash_func(IS_STRING, ZSTR(arKey), nKeyLength);
} }
@ -323,13 +323,13 @@ ZEND_API int _zend_u_hash_add_or_update(HashTable *ht, zend_uchar type, zstr arK
} }
/* }}} */ /* }}} */
ZEND_API int _zend_hash_add_or_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC) /* {{{ */ ZEND_API int _zend_hash_add_or_update(HashTable *ht, const char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC) /* {{{ */
{ {
return _zend_u_hash_add_or_update(ht, IS_STRING, ZSTR(arKey), nKeyLength, pData, nDataSize, pDest, flag ZEND_FILE_LINE_CC); return _zend_u_hash_add_or_update(ht, IS_STRING, ZSTR(arKey), nKeyLength, pData, nDataSize, pDest, flag ZEND_FILE_LINE_CC);
} }
/* }}} */ /* }}} */
ZEND_API int _zend_ascii_hash_add_or_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC) /* {{{ */ ZEND_API int _zend_ascii_hash_add_or_update(HashTable *ht, const char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC) /* {{{ */
{ {
TSRMLS_FETCH(); TSRMLS_FETCH();
@ -347,7 +347,7 @@ ZEND_API int _zend_ascii_hash_add_or_update(HashTable *ht, char *arKey, uint nKe
} }
/* }}} */ /* }}} */
ZEND_API int _zend_rt_hash_add_or_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC) /* {{{ */ ZEND_API int _zend_rt_hash_add_or_update(HashTable *ht, const char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC) /* {{{ */
{ {
TSRMLS_FETCH(); TSRMLS_FETCH();
@ -373,7 +373,7 @@ string_key:
} }
/* }}} */ /* }}} */
ZEND_API int _zend_utf8_hash_add_or_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC) /* {{{ */ ZEND_API int _zend_utf8_hash_add_or_update(HashTable *ht, const char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC) /* {{{ */
{ {
TSRMLS_FETCH(); TSRMLS_FETCH();
@ -483,7 +483,7 @@ ZEND_API int _zend_u_hash_quick_add_or_update(HashTable *ht, zend_uchar type, zs
} }
/* }}} */ /* }}} */
ZEND_API int _zend_hash_quick_add_or_update(HashTable *ht, char *arKey, uint nKeyLength, ulong h, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC) /* {{{ */ ZEND_API int _zend_hash_quick_add_or_update(HashTable *ht, const char *arKey, uint nKeyLength, ulong h, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC) /* {{{ */
{ {
return _zend_u_hash_quick_add_or_update(ht, IS_STRING, ZSTR(arKey), nKeyLength, h, pData, nDataSize, pDest, flag ZEND_FILE_LINE_CC); return _zend_u_hash_quick_add_or_update(ht, IS_STRING, ZSTR(arKey), nKeyLength, h, pData, nDataSize, pDest, flag ZEND_FILE_LINE_CC);
} }
@ -497,7 +497,7 @@ ZEND_API int zend_u_hash_add_empty_element(HashTable *ht, zend_uchar type, zstr
} }
/* }}} */ /* }}} */
ZEND_API int zend_hash_add_empty_element(HashTable *ht, char *arKey, uint nKeyLength) /* {{{ */ ZEND_API int zend_hash_add_empty_element(HashTable *ht, const char *arKey, uint nKeyLength) /* {{{ */
{ {
void *dummy = (void *) 1; void *dummy = (void *) 1;
@ -682,13 +682,13 @@ ZEND_API int zend_u_hash_del_key_or_index(HashTable *ht, zend_uchar type, zstr a
} }
/* }}} */ /* }}} */
ZEND_API int zend_hash_del_key_or_index(HashTable *ht, char *arKey, uint nKeyLength, ulong h, int flag) /* {{{ */ ZEND_API int zend_hash_del_key_or_index(HashTable *ht, const char *arKey, uint nKeyLength, ulong h, int flag) /* {{{ */
{ {
return zend_u_hash_del_key_or_index(ht, IS_STRING, ZSTR(arKey), nKeyLength, h, flag); return zend_u_hash_del_key_or_index(ht, IS_STRING, ZSTR(arKey), nKeyLength, h, flag);
} }
/* }}} */ /* }}} */
ZEND_API int zend_ascii_hash_del(HashTable *ht, char *arKey, uint nKeyLength) /* {{{ */ ZEND_API int zend_ascii_hash_del(HashTable *ht, const char *arKey, uint nKeyLength) /* {{{ */
{ {
TSRMLS_FETCH(); TSRMLS_FETCH();
@ -706,7 +706,7 @@ ZEND_API int zend_ascii_hash_del(HashTable *ht, char *arKey, uint nKeyLength) /*
} }
/* }}} */ /* }}} */
ZEND_API int zend_rt_hash_del(HashTable *ht, char *arKey, uint nKeyLength) /* {{{ */ ZEND_API int zend_rt_hash_del(HashTable *ht, const char *arKey, uint nKeyLength) /* {{{ */
{ {
TSRMLS_FETCH(); TSRMLS_FETCH();
@ -731,7 +731,7 @@ string_key:
} }
/* }}} */ /* }}} */
ZEND_API int zend_utf8_hash_del(HashTable *ht, char *arKey, uint nKeyLength) /* {{{ */ ZEND_API int zend_utf8_hash_del(HashTable *ht, const char *arKey, uint nKeyLength) /* {{{ */
{ {
TSRMLS_FETCH(); TSRMLS_FETCH();
@ -1117,7 +1117,7 @@ ZEND_API ulong zend_u_get_hash_value(zend_uchar type, zstr arKey, uint nKeyLengt
} }
/* }}} */ /* }}} */
ZEND_API ulong zend_get_hash_value(char *arKey, uint nKeyLength) /* {{{ */ ZEND_API ulong zend_get_hash_value(const char *arKey, uint nKeyLength) /* {{{ */
{ {
return zend_u_get_hash_value(IS_STRING, ZSTR(arKey), nKeyLength); return zend_u_get_hash_value(IS_STRING, ZSTR(arKey), nKeyLength);
} }
@ -1160,13 +1160,13 @@ ZEND_API int zend_u_hash_find(HashTable *ht, zend_uchar type, zstr arKey, uint n
} }
/* }}} */ /* }}} */
ZEND_API int zend_hash_find(HashTable *ht, char *arKey, uint nKeyLength, void **pData) /* {{{ */ ZEND_API int zend_hash_find(HashTable *ht, const char *arKey, uint nKeyLength, void **pData) /* {{{ */
{ {
return zend_u_hash_find(ht, IS_STRING, ZSTR(arKey), nKeyLength, pData); return zend_u_hash_find(ht, IS_STRING, ZSTR(arKey), nKeyLength, pData);
} }
/* }}} */ /* }}} */
ZEND_API int zend_ascii_hash_find(HashTable *ht, char *arKey, uint nKeyLength, void **pData) /* {{{ */ ZEND_API int zend_ascii_hash_find(HashTable *ht, const char *arKey, uint nKeyLength, void **pData) /* {{{ */
{ {
TSRMLS_FETCH(); TSRMLS_FETCH();
@ -1184,7 +1184,7 @@ ZEND_API int zend_ascii_hash_find(HashTable *ht, char *arKey, uint nKeyLength, v
} }
/* }}} */ /* }}} */
ZEND_API int zend_rt_hash_find(HashTable *ht, char *arKey, uint nKeyLength, void **pData) /* {{{ */ ZEND_API int zend_rt_hash_find(HashTable *ht, const char *arKey, uint nKeyLength, void **pData) /* {{{ */
{ {
TSRMLS_FETCH(); TSRMLS_FETCH();
@ -1209,7 +1209,7 @@ string_key:
} }
/* }}} */ /* }}} */
ZEND_API int zend_utf8_hash_find(HashTable *ht, char *arKey, uint nKeyLength, void **pData) /* {{{ */ ZEND_API int zend_utf8_hash_find(HashTable *ht, const char *arKey, uint nKeyLength, void **pData) /* {{{ */
{ {
TSRMLS_FETCH(); TSRMLS_FETCH();
@ -1272,7 +1272,7 @@ ZEND_API int zend_u_hash_quick_find(HashTable *ht, zend_uchar type, zstr arKey,
} }
/* }}} */ /* }}} */
ZEND_API int zend_hash_quick_find(HashTable *ht, char *arKey, uint nKeyLength, ulong h, void **pData) /* {{{ */ ZEND_API int zend_hash_quick_find(HashTable *ht, const char *arKey, uint nKeyLength, ulong h, void **pData) /* {{{ */
{ {
return zend_u_hash_quick_find(ht, IS_STRING, ZSTR(arKey), nKeyLength, h, pData); return zend_u_hash_quick_find(ht, IS_STRING, ZSTR(arKey), nKeyLength, h, pData);
} }
@ -1310,13 +1310,13 @@ ZEND_API int zend_u_hash_exists(HashTable *ht, zend_uchar type, zstr arKey, uint
} }
/* }}} */ /* }}} */
ZEND_API int zend_hash_exists(HashTable *ht, char *arKey, uint nKeyLength) /* {{{ */ ZEND_API int zend_hash_exists(HashTable *ht, const char *arKey, uint nKeyLength) /* {{{ */
{ {
return zend_u_hash_exists(ht, IS_STRING, ZSTR(arKey), nKeyLength); return zend_u_hash_exists(ht, IS_STRING, ZSTR(arKey), nKeyLength);
} }
/* }}} */ /* }}} */
ZEND_API int zend_ascii_hash_exists(HashTable *ht, char *arKey, uint nKeyLength) /* {{{ */ ZEND_API int zend_ascii_hash_exists(HashTable *ht, const char *arKey, uint nKeyLength) /* {{{ */
{ {
TSRMLS_FETCH(); TSRMLS_FETCH();
@ -1334,7 +1334,7 @@ ZEND_API int zend_ascii_hash_exists(HashTable *ht, char *arKey, uint nKeyLength)
} }
/* }}} */ /* }}} */
ZEND_API int zend_rt_hash_exists(HashTable *ht, char *arKey, uint nKeyLength) /* {{{ */ ZEND_API int zend_rt_hash_exists(HashTable *ht, const char *arKey, uint nKeyLength) /* {{{ */
{ {
TSRMLS_FETCH(); TSRMLS_FETCH();
@ -1359,7 +1359,7 @@ string_key:
} }
/* }}} */ /* }}} */
ZEND_API int zend_utf8_hash_exists(HashTable *ht, char *arKey, uint nKeyLength) /* {{{ */ ZEND_API int zend_utf8_hash_exists(HashTable *ht, const char *arKey, uint nKeyLength) /* {{{ */
{ {
TSRMLS_FETCH(); TSRMLS_FETCH();
@ -1421,7 +1421,7 @@ ZEND_API int zend_u_hash_quick_exists(HashTable *ht, zend_uchar type, zstr arKey
} }
/* }}} */ /* }}} */
ZEND_API int zend_hash_quick_exists(HashTable *ht, char *arKey, uint nKeyLength, ulong h) /* {{{ */ ZEND_API int zend_hash_quick_exists(HashTable *ht, const char *arKey, uint nKeyLength, ulong h) /* {{{ */
{ {
return zend_u_hash_quick_exists(ht, IS_STRING, ZSTR(arKey), nKeyLength, h); return zend_u_hash_quick_exists(ht, IS_STRING, ZSTR(arKey), nKeyLength, h);
} }
@ -1937,13 +1937,13 @@ ZEND_API ulong zend_hash_next_free_element(HashTable *ht) /* {{{ */
/* {{{ HANDLE_*_NUMERIC macros */ /* {{{ HANDLE_*_NUMERIC macros */
#define HANDLE_NUMERIC(key, length, func) { \ #define HANDLE_NUMERIC(key, length, func) { \
register char *tmp=key; \ register const char *tmp=key; \
\ \
if (*tmp=='-') { \ if (*tmp=='-') { \
tmp++; \ tmp++; \
} \ } \
if ((*tmp>='0' && *tmp<='9')) do { /* possibly a numeric index */ \ if ((*tmp>='0' && *tmp<='9')) do { /* possibly a numeric index */ \
char *end=key+length-1; \ const char *end=key+length-1; \
long idx; \ long idx; \
\ \
if (*tmp++=='0' && length>2) { /* don't accept numbers with leading zeros */ \ if (*tmp++=='0' && length>2) { /* don't accept numbers with leading zeros */ \
@ -2066,119 +2066,119 @@ ZEND_API int zend_u_symtable_update_current_key(HashTable *ht, zend_uchar type,
} }
/* }}} */ /* }}} */
ZEND_API int zend_symtable_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest) /* {{{ */ ZEND_API int zend_symtable_update(HashTable *ht, const char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest) /* {{{ */
{ {
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_update(ht, idx, pData, nDataSize, pDest)); HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_update(ht, idx, pData, nDataSize, pDest));
return zend_hash_update(ht, arKey, nKeyLength, pData, nDataSize, pDest); return zend_hash_update(ht, arKey, nKeyLength, pData, nDataSize, pDest);
} }
/* }}} */ /* }}} */
ZEND_API int zend_symtable_del(HashTable *ht, char *arKey, uint nKeyLength) /* {{{ */ ZEND_API int zend_symtable_del(HashTable *ht, const char *arKey, uint nKeyLength) /* {{{ */
{ {
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_del(ht, idx)) HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_del(ht, idx))
return zend_hash_del(ht, arKey, nKeyLength); return zend_hash_del(ht, arKey, nKeyLength);
} }
/* }}} */ /* }}} */
ZEND_API int zend_symtable_find(HashTable *ht, char *arKey, uint nKeyLength, void **pData) /* {{{ */ ZEND_API int zend_symtable_find(HashTable *ht, const char *arKey, uint nKeyLength, void **pData) /* {{{ */
{ {
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_find(ht, idx, pData)); HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_find(ht, idx, pData));
return zend_hash_find(ht, arKey, nKeyLength, pData); return zend_hash_find(ht, arKey, nKeyLength, pData);
} }
/* }}} */ /* }}} */
ZEND_API int zend_symtable_exists(HashTable *ht, char *arKey, uint nKeyLength) /* {{{ */ ZEND_API int zend_symtable_exists(HashTable *ht, const char *arKey, uint nKeyLength) /* {{{ */
{ {
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_exists(ht, idx)); HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_exists(ht, idx));
return zend_hash_exists(ht, arKey, nKeyLength); return zend_hash_exists(ht, arKey, nKeyLength);
} }
/* }}} */ /* }}} */
ZEND_API int zend_symtable_update_current_key(HashTable *ht, char *arKey, uint nKeyLength) /* {{{ */ ZEND_API int zend_symtable_update_current_key(HashTable *ht, const char *arKey, uint nKeyLength) /* {{{ */
{ {
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_update_current_key(ht, HASH_KEY_IS_LONG, NULL_ZSTR, 0, idx)); HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_update_current_key(ht, HASH_KEY_IS_LONG, NULL_ZSTR, 0, idx));
return zend_hash_update_current_key(ht, HASH_KEY_IS_STRING, ZSTR(arKey), nKeyLength, 0); return zend_hash_update_current_key(ht, HASH_KEY_IS_STRING, ZSTR(arKey), nKeyLength, 0);
} }
/* }}} */ /* }}} */
ZEND_API int zend_ascii_symtable_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest) /* {{{ */ ZEND_API int zend_ascii_symtable_update(HashTable *ht, const char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest) /* {{{ */
{ {
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_update(ht, idx, pData, nDataSize, pDest)); HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_update(ht, idx, pData, nDataSize, pDest));
return zend_ascii_hash_update(ht, arKey, nKeyLength, pData, nDataSize, pDest); return zend_ascii_hash_update(ht, arKey, nKeyLength, pData, nDataSize, pDest);
} }
/* }}} */ /* }}} */
ZEND_API int zend_ascii_symtable_del(HashTable *ht, char *arKey, uint nKeyLength) /* {{{ */ ZEND_API int zend_ascii_symtable_del(HashTable *ht, const char *arKey, uint nKeyLength) /* {{{ */
{ {
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_del(ht, idx)) HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_del(ht, idx))
return zend_ascii_hash_del(ht, arKey, nKeyLength); return zend_ascii_hash_del(ht, arKey, nKeyLength);
} }
/* }}} */ /* }}} */
ZEND_API int zend_ascii_symtable_find(HashTable *ht, char *arKey, uint nKeyLength, void **pData) /* {{{ */ ZEND_API int zend_ascii_symtable_find(HashTable *ht, const char *arKey, uint nKeyLength, void **pData) /* {{{ */
{ {
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_find(ht, idx, pData)); HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_find(ht, idx, pData));
return zend_ascii_hash_find(ht, arKey, nKeyLength, pData); return zend_ascii_hash_find(ht, arKey, nKeyLength, pData);
} }
/* }}} */ /* }}} */
ZEND_API int zend_ascii_symtable_exists(HashTable *ht, char *arKey, uint nKeyLength) /* {{{ */ ZEND_API int zend_ascii_symtable_exists(HashTable *ht, const char *arKey, uint nKeyLength) /* {{{ */
{ {
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_exists(ht, idx)); HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_exists(ht, idx));
return zend_ascii_hash_exists(ht, arKey, nKeyLength); return zend_ascii_hash_exists(ht, arKey, nKeyLength);
} }
/* }}} */ /* }}} */
ZEND_API int zend_rt_symtable_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest) /* {{{ */ ZEND_API int zend_rt_symtable_update(HashTable *ht, const char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest) /* {{{ */
{ {
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_update(ht, idx, pData, nDataSize, pDest)); HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_update(ht, idx, pData, nDataSize, pDest));
return zend_rt_hash_update(ht, arKey, nKeyLength, pData, nDataSize, pDest); return zend_rt_hash_update(ht, arKey, nKeyLength, pData, nDataSize, pDest);
} }
/* }}} */ /* }}} */
ZEND_API int zend_rt_symtable_del(HashTable *ht, char *arKey, uint nKeyLength) /* {{{ */ ZEND_API int zend_rt_symtable_del(HashTable *ht, const char *arKey, uint nKeyLength) /* {{{ */
{ {
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_del(ht, idx)) HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_del(ht, idx))
return zend_rt_hash_del(ht, arKey, nKeyLength); return zend_rt_hash_del(ht, arKey, nKeyLength);
} }
/* }}} */ /* }}} */
ZEND_API int zend_rt_symtable_find(HashTable *ht, char *arKey, uint nKeyLength, void **pData) /* {{{ */ ZEND_API int zend_rt_symtable_find(HashTable *ht, const char *arKey, uint nKeyLength, void **pData) /* {{{ */
{ {
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_find(ht, idx, pData)); HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_find(ht, idx, pData));
return zend_rt_hash_find(ht, arKey, nKeyLength, pData); return zend_rt_hash_find(ht, arKey, nKeyLength, pData);
} }
/* }}} */ /* }}} */
ZEND_API int zend_rt_symtable_exists(HashTable *ht, char *arKey, uint nKeyLength) /* {{{ */ ZEND_API int zend_rt_symtable_exists(HashTable *ht, const char *arKey, uint nKeyLength) /* {{{ */
{ {
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_exists(ht, idx)); HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_exists(ht, idx));
return zend_rt_hash_exists(ht, arKey, nKeyLength); return zend_rt_hash_exists(ht, arKey, nKeyLength);
} }
/* }}} */ /* }}} */
ZEND_API int zend_utf8_symtable_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest) /* {{{ */ ZEND_API int zend_utf8_symtable_update(HashTable *ht, const char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest) /* {{{ */
{ {
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_update(ht, idx, pData, nDataSize, pDest)); HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_update(ht, idx, pData, nDataSize, pDest));
return zend_utf8_hash_update(ht, arKey, nKeyLength, pData, nDataSize, pDest); return zend_utf8_hash_update(ht, arKey, nKeyLength, pData, nDataSize, pDest);
} }
/* }}} */ /* }}} */
ZEND_API int zend_utf8_symtable_del(HashTable *ht, char *arKey, uint nKeyLength) /* {{{ */ ZEND_API int zend_utf8_symtable_del(HashTable *ht, const char *arKey, uint nKeyLength) /* {{{ */
{ {
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_del(ht, idx)) HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_del(ht, idx))
return zend_utf8_hash_del(ht, arKey, nKeyLength); return zend_utf8_hash_del(ht, arKey, nKeyLength);
} }
/* }}} */ /* }}} */
ZEND_API int zend_utf8_symtable_find(HashTable *ht, char *arKey, uint nKeyLength, void **pData) /* {{{ */ ZEND_API int zend_utf8_symtable_find(HashTable *ht, const char *arKey, uint nKeyLength, void **pData) /* {{{ */
{ {
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_find(ht, idx, pData)); HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_find(ht, idx, pData));
return zend_utf8_hash_find(ht, arKey, nKeyLength, pData); return zend_utf8_hash_find(ht, arKey, nKeyLength, pData);
} }
/* }}} */ /* }}} */
ZEND_API int zend_utf8_symtable_exists(HashTable *ht, char *arKey, uint nKeyLength) /* {{{ */ ZEND_API int zend_utf8_symtable_exists(HashTable *ht, const char *arKey, uint nKeyLength) /* {{{ */
{ {
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_exists(ht, idx)); HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_exists(ht, idx));
return zend_utf8_hash_exists(ht, arKey, nKeyLength); return zend_utf8_hash_exists(ht, arKey, nKeyLength);

View file

@ -39,7 +39,7 @@
typedef ulong (*hash_func_t)(char *arKey, uint nKeyLength); typedef ulong (*hash_func_t)(const char *arKey, uint nKeyLength);
typedef int (*compare_func_t)(const void *, const void * TSRMLS_DC); typedef int (*compare_func_t)(const void *, const void * TSRMLS_DC);
typedef void (*sort_func_t)(void *, size_t, register size_t, compare_func_t TSRMLS_DC); typedef void (*sort_func_t)(void *, size_t, register size_t, compare_func_t TSRMLS_DC);
typedef void (*dtor_func_t)(void *pDest); typedef void (*dtor_func_t)(void *pDest);
@ -115,10 +115,10 @@ ZEND_API void zend_hash_clean(HashTable *ht);
#define zend_u_hash_init_ex(ht, nSize, pHashFunction, pDestructor, persistent, unicode, bApplyProtection) _zend_u_hash_init_ex((ht), (nSize), (pHashFunction), (pDestructor), (persistent), (unicode), (bApplyProtection) ZEND_FILE_LINE_CC) #define zend_u_hash_init_ex(ht, nSize, pHashFunction, pDestructor, persistent, unicode, bApplyProtection) _zend_u_hash_init_ex((ht), (nSize), (pHashFunction), (pDestructor), (persistent), (unicode), (bApplyProtection) ZEND_FILE_LINE_CC)
/* additions/updates/changes */ /* additions/updates/changes */
ZEND_API int _zend_hash_add_or_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC); ZEND_API int _zend_hash_add_or_update(HashTable *ht, const char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC);
ZEND_API int _zend_ascii_hash_add_or_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC); ZEND_API int _zend_ascii_hash_add_or_update(HashTable *ht, const char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC);
ZEND_API int _zend_rt_hash_add_or_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC); ZEND_API int _zend_rt_hash_add_or_update(HashTable *ht, const char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC);
ZEND_API int _zend_utf8_hash_add_or_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC); ZEND_API int _zend_utf8_hash_add_or_update(HashTable *ht, const char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC);
ZEND_API int _zend_u_hash_add_or_update(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC); ZEND_API int _zend_u_hash_add_or_update(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC);
#define zend_hash_update(ht, arKey, nKeyLength, pData, nDataSize, pDest) \ #define zend_hash_update(ht, arKey, nKeyLength, pData, nDataSize, pDest) \
_zend_hash_add_or_update(ht, arKey, nKeyLength, pData, nDataSize, pDest, HASH_UPDATE ZEND_FILE_LINE_CC) _zend_hash_add_or_update(ht, arKey, nKeyLength, pData, nDataSize, pDest, HASH_UPDATE ZEND_FILE_LINE_CC)
@ -141,7 +141,7 @@ ZEND_API int _zend_u_hash_add_or_update(HashTable *ht, zend_uchar type, zstr arK
#define zend_u_hash_add(ht, type, arKey, nKeyLength, pData, nDataSize, pDest) \ #define zend_u_hash_add(ht, type, arKey, nKeyLength, pData, nDataSize, pDest) \
_zend_u_hash_add_or_update(ht, type, arKey, nKeyLength, pData, nDataSize, pDest, HASH_ADD ZEND_FILE_LINE_CC) _zend_u_hash_add_or_update(ht, type, arKey, nKeyLength, pData, nDataSize, pDest, HASH_ADD ZEND_FILE_LINE_CC)
ZEND_API int _zend_hash_quick_add_or_update(HashTable *ht, char *arKey, uint nKeyLength, ulong h, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC); ZEND_API int _zend_hash_quick_add_or_update(HashTable *ht, const char *arKey, uint nKeyLength, ulong h, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC);
ZEND_API int _zend_u_hash_quick_add_or_update(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength, ulong h, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC); ZEND_API int _zend_u_hash_quick_add_or_update(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength, ulong h, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC);
#define zend_hash_quick_update(ht, arKey, nKeyLength, h, pData, nDataSize, pDest) \ #define zend_hash_quick_update(ht, arKey, nKeyLength, h, pData, nDataSize, pDest) \
_zend_hash_quick_add_or_update(ht, arKey, nKeyLength, h, pData, nDataSize, pDest, HASH_UPDATE ZEND_FILE_LINE_CC) _zend_hash_quick_add_or_update(ht, arKey, nKeyLength, h, pData, nDataSize, pDest, HASH_UPDATE ZEND_FILE_LINE_CC)
@ -158,7 +158,7 @@ ZEND_API int _zend_hash_index_update_or_next_insert(HashTable *ht, ulong h, void
#define zend_hash_next_index_insert(ht, pData, nDataSize, pDest) \ #define zend_hash_next_index_insert(ht, pData, nDataSize, pDest) \
_zend_hash_index_update_or_next_insert(ht, 0, pData, nDataSize, pDest, HASH_NEXT_INSERT ZEND_FILE_LINE_CC) _zend_hash_index_update_or_next_insert(ht, 0, pData, nDataSize, pDest, HASH_NEXT_INSERT ZEND_FILE_LINE_CC)
ZEND_API int zend_hash_add_empty_element(HashTable *ht, char *arKey, uint nKeyLength); ZEND_API int zend_hash_add_empty_element(HashTable *ht, const char *arKey, uint nKeyLength);
ZEND_API int zend_u_hash_add_empty_element(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength); ZEND_API int zend_u_hash_add_empty_element(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength);
@ -188,10 +188,10 @@ ZEND_API void zend_hash_reverse_apply(HashTable *ht, apply_func_t apply_func TSR
ZEND_API void zend_hash_to_unicode(HashTable *ht, apply_func_t apply_func TSRMLS_DC); ZEND_API void zend_hash_to_unicode(HashTable *ht, apply_func_t apply_func TSRMLS_DC);
/* Deletes */ /* Deletes */
ZEND_API int zend_hash_del_key_or_index(HashTable *ht, char *arKey, uint nKeyLength, ulong h, int flag); ZEND_API int zend_hash_del_key_or_index(HashTable *ht, const char *arKey, uint nKeyLength, ulong h, int flag);
ZEND_API int zend_ascii_hash_del(HashTable *ht, char *arKey, uint nKeyLength); ZEND_API int zend_ascii_hash_del(HashTable *ht, const char *arKey, uint nKeyLength);
ZEND_API int zend_rt_hash_del(HashTable *ht, char *arKey, uint nKeyLength); ZEND_API int zend_rt_hash_del(HashTable *ht, const char *arKey, uint nKeyLength);
ZEND_API int zend_utf8_hash_del(HashTable *ht, char *arKey, uint nKeyLength); ZEND_API int zend_utf8_hash_del(HashTable *ht, const char *arKey, uint nKeyLength);
ZEND_API int zend_u_hash_del_key_or_index(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength, ulong h, int flag); ZEND_API int zend_u_hash_del_key_or_index(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength, ulong h, int flag);
#define zend_hash_del(ht, arKey, nKeyLength) \ #define zend_hash_del(ht, arKey, nKeyLength) \
zend_hash_del_key_or_index(ht, arKey, nKeyLength, 0, HASH_DEL_KEY) zend_hash_del_key_or_index(ht, arKey, nKeyLength, 0, HASH_DEL_KEY)
@ -200,26 +200,26 @@ ZEND_API int zend_u_hash_del_key_or_index(HashTable *ht, zend_uchar type, zstr a
#define zend_hash_index_del(ht, h) \ #define zend_hash_index_del(ht, h) \
zend_hash_del_key_or_index(ht, NULL, 0, h, HASH_DEL_INDEX) zend_hash_del_key_or_index(ht, NULL, 0, h, HASH_DEL_INDEX)
ZEND_API ulong zend_get_hash_value(char *arKey, uint nKeyLength); ZEND_API ulong zend_get_hash_value(const char *arKey, uint nKeyLength);
ZEND_API ulong zend_u_get_hash_value(zend_uchar type, zstr arKey, uint nKeyLength); ZEND_API ulong zend_u_get_hash_value(zend_uchar type, zstr arKey, uint nKeyLength);
/* Data retreival */ /* Data retreival */
ZEND_API int zend_hash_find(HashTable *ht, char *arKey, uint nKeyLength, void **pData); ZEND_API int zend_hash_find(HashTable *ht, const char *arKey, uint nKeyLength, void **pData);
ZEND_API int zend_ascii_hash_find(HashTable *ht, char *arKey, uint nKeyLength, void **pData); ZEND_API int zend_ascii_hash_find(HashTable *ht, const char *arKey, uint nKeyLength, void **pData);
ZEND_API int zend_rt_hash_find(HashTable *ht, char *arKey, uint nKeyLength, void **pData); ZEND_API int zend_rt_hash_find(HashTable *ht, const char *arKey, uint nKeyLength, void **pData);
ZEND_API int zend_utf8_hash_find(HashTable *ht, char *arKey, uint nKeyLength, void **pData); ZEND_API int zend_utf8_hash_find(HashTable *ht, const char *arKey, uint nKeyLength, void **pData);
ZEND_API int zend_u_hash_find(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength, void **pData); ZEND_API int zend_u_hash_find(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength, void **pData);
ZEND_API int zend_hash_quick_find(HashTable *ht, char *arKey, uint nKeyLength, ulong h, void **pData); ZEND_API int zend_hash_quick_find(HashTable *ht, const char *arKey, uint nKeyLength, ulong h, void **pData);
ZEND_API int zend_u_hash_quick_find(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength, ulong h, void **pData); ZEND_API int zend_u_hash_quick_find(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength, ulong h, void **pData);
ZEND_API int zend_hash_index_find(HashTable *ht, ulong h, void **pData); ZEND_API int zend_hash_index_find(HashTable *ht, ulong h, void **pData);
/* Misc */ /* Misc */
ZEND_API int zend_hash_exists(HashTable *ht, char *arKey, uint nKeyLength); ZEND_API int zend_hash_exists(HashTable *ht, const char *arKey, uint nKeyLength);
ZEND_API int zend_ascii_hash_exists(HashTable *ht, char *arKey, uint nKeyLength); ZEND_API int zend_ascii_hash_exists(HashTable *ht, const char *arKey, uint nKeyLength);
ZEND_API int zend_rt_hash_exists(HashTable *ht, char *arKey, uint nKeyLength); ZEND_API int zend_rt_hash_exists(HashTable *ht, const char *arKey, uint nKeyLength);
ZEND_API int zend_utf8_hash_exists(HashTable *ht, char *arKey, uint nKeyLength); ZEND_API int zend_utf8_hash_exists(HashTable *ht, const char *arKey, uint nKeyLength);
ZEND_API int zend_u_hash_exists(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength); ZEND_API int zend_u_hash_exists(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength);
ZEND_API int zend_hash_quick_exists(HashTable *ht, char *arKey, uint nKeyLength, ulong h); ZEND_API int zend_hash_quick_exists(HashTable *ht, const char *arKey, uint nKeyLength, ulong h);
ZEND_API int zend_u_hash_quick_exists(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength, ulong h); ZEND_API int zend_u_hash_quick_exists(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength, ulong h);
ZEND_API int zend_hash_index_exists(HashTable *ht, ulong h); ZEND_API int zend_hash_index_exists(HashTable *ht, ulong h);
ZEND_API ulong zend_hash_next_free_element(HashTable *ht); ZEND_API ulong zend_hash_next_free_element(HashTable *ht);
@ -312,7 +312,7 @@ ZEND_API int zend_hash_rehash(HashTable *ht);
* -- Ralf S. Engelschall <rse@engelschall.com> * -- Ralf S. Engelschall <rse@engelschall.com>
*/ */
static inline ulong zend_inline_hash_func(char *arKey, uint nKeyLength) static inline ulong zend_inline_hash_func(const char *arKey, uint nKeyLength)
{ {
register ulong hash = 5381; register ulong hash = 5381;
@ -344,7 +344,7 @@ EMPTY_SWITCH_DEFAULT_CASE()
#define zend_u_inline_hash_func(type, arKey, nKeyLength) \ #define zend_u_inline_hash_func(type, arKey, nKeyLength) \
zend_inline_hash_func(arKey.s, USTR_BYTES(type, nKeyLength)) zend_inline_hash_func(arKey.s, USTR_BYTES(type, nKeyLength))
ZEND_API ulong zend_hash_func(char *arKey, uint nKeyLength); ZEND_API ulong zend_hash_func(const char *arKey, uint nKeyLength);
ZEND_API ulong zend_u_hash_func(zend_uchar type, zstr arKey, uint nKeyLength); ZEND_API ulong zend_u_hash_func(zend_uchar type, zstr arKey, uint nKeyLength);
#if ZEND_DEBUG #if ZEND_DEBUG
@ -362,26 +362,26 @@ END_EXTERN_C()
zend_hash_init(ht, n, NULL, ZVAL_PTR_DTOR, persistent) zend_hash_init(ht, n, NULL, ZVAL_PTR_DTOR, persistent)
ZEND_API int zend_symtable_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest); ZEND_API int zend_symtable_update(HashTable *ht, const char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest);
ZEND_API int zend_symtable_del(HashTable *ht, char *arKey, uint nKeyLength); ZEND_API int zend_symtable_del(HashTable *ht, const char *arKey, uint nKeyLength);
ZEND_API int zend_symtable_find(HashTable *ht, char *arKey, uint nKeyLength, void **pData); ZEND_API int zend_symtable_find(HashTable *ht, const char *arKey, uint nKeyLength, void **pData);
ZEND_API int zend_symtable_exists(HashTable *ht, char *arKey, uint nKeyLength); ZEND_API int zend_symtable_exists(HashTable *ht, const char *arKey, uint nKeyLength);
ZEND_API int zend_symtable_update_current_key(HashTable *ht, char *arKey, uint nKeyLength); ZEND_API int zend_symtable_update_current_key(HashTable *ht, const char *arKey, uint nKeyLength);
ZEND_API int zend_ascii_symtable_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest); ZEND_API int zend_ascii_symtable_update(HashTable *ht, const char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest);
ZEND_API int zend_ascii_symtable_del(HashTable *ht, char *arKey, uint nKeyLength); ZEND_API int zend_ascii_symtable_del(HashTable *ht, const char *arKey, uint nKeyLength);
ZEND_API int zend_ascii_symtable_find(HashTable *ht, char *arKey, uint nKeyLength, void **pData); ZEND_API int zend_ascii_symtable_find(HashTable *ht, const char *arKey, uint nKeyLength, void **pData);
ZEND_API int zend_ascii_symtable_exists(HashTable *ht, char *arKey, uint nKeyLength); ZEND_API int zend_ascii_symtable_exists(HashTable *ht, const char *arKey, uint nKeyLength);
ZEND_API int zend_rt_symtable_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest); ZEND_API int zend_rt_symtable_update(HashTable *ht, const char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest);
ZEND_API int zend_rt_symtable_del(HashTable *ht, char *arKey, uint nKeyLength); ZEND_API int zend_rt_symtable_del(HashTable *ht, const char *arKey, uint nKeyLength);
ZEND_API int zend_rt_symtable_find(HashTable *ht, char *arKey, uint nKeyLength, void **pData); ZEND_API int zend_rt_symtable_find(HashTable *ht, const char *arKey, uint nKeyLength, void **pData);
ZEND_API int zend_rt_symtable_exists(HashTable *ht, char *arKey, uint nKeyLength); ZEND_API int zend_rt_symtable_exists(HashTable *ht, const char *arKey, uint nKeyLength);
ZEND_API int zend_utf8_symtable_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest); ZEND_API int zend_utf8_symtable_update(HashTable *ht, const char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest);
ZEND_API int zend_utf8_symtable_del(HashTable *ht, char *arKey, uint nKeyLength); ZEND_API int zend_utf8_symtable_del(HashTable *ht, const char *arKey, uint nKeyLength);
ZEND_API int zend_utf8_symtable_find(HashTable *ht, char *arKey, uint nKeyLength, void **pData); ZEND_API int zend_utf8_symtable_find(HashTable *ht, const char *arKey, uint nKeyLength, void **pData);
ZEND_API int zend_utf8_symtable_exists(HashTable *ht, char *arKey, uint nKeyLength); ZEND_API int zend_utf8_symtable_exists(HashTable *ht, const char *arKey, uint nKeyLength);
ZEND_API int zend_u_symtable_update(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest); ZEND_API int zend_u_symtable_update(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest);
ZEND_API int zend_u_symtable_del(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength); ZEND_API int zend_u_symtable_del(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength);

View file

@ -165,9 +165,9 @@ ZEND_API void zend_ini_sort_entries(TSRMLS_D) /* {{{ */
/* /*
* Registration / unregistration * Registration / unregistration
*/ */
ZEND_API int zend_register_ini_entries(zend_ini_entry *ini_entry, int module_number TSRMLS_DC) /* {{{ */ ZEND_API int zend_register_ini_entries(const zend_ini_entry *ini_entry, int module_number TSRMLS_DC) /* {{{ */
{ {
zend_ini_entry *p = ini_entry; const zend_ini_entry *p = ini_entry;
zend_ini_entry *hashed_ini_entry; zend_ini_entry *hashed_ini_entry;
zval default_value; zval default_value;
HashTable *directives = registered_zend_ini_directives; HashTable *directives = registered_zend_ini_directives;
@ -188,12 +188,12 @@ ZEND_API int zend_register_ini_entries(zend_ini_entry *ini_entry, int module_num
#endif #endif
while (p->name) { while (p->name) {
p->module_number = module_number;
config_directive_success = 0; config_directive_success = 0;
if (zend_hash_add(directives, p->name, p->name_length, p, sizeof(zend_ini_entry), (void **) &hashed_ini_entry) == FAILURE) { if (zend_hash_add(directives, p->name, p->name_length, (void*)p, sizeof(zend_ini_entry), (void **) &hashed_ini_entry) == FAILURE) {
zend_unregister_ini_entries(module_number TSRMLS_CC); zend_unregister_ini_entries(module_number TSRMLS_CC);
return FAILURE; return FAILURE;
} }
hashed_ini_entry->module_number = module_number;
if ((zend_get_configuration_directive(p->name, p->name_length, &default_value)) == SUCCESS) { if ((zend_get_configuration_directive(p->name, p->name_length, &default_value)) == SUCCESS) {
if (!hashed_ini_entry->on_modify if (!hashed_ini_entry->on_modify
|| hashed_ini_entry->on_modify(hashed_ini_entry, Z_STRVAL(default_value), Z_STRLEN(default_value), hashed_ini_entry->mh_arg1, hashed_ini_entry->mh_arg2, hashed_ini_entry->mh_arg3, ZEND_INI_STAGE_STARTUP TSRMLS_CC) == SUCCESS) { || hashed_ini_entry->on_modify(hashed_ini_entry, Z_STRVAL(default_value), Z_STRLEN(default_value), hashed_ini_entry->mh_arg1, hashed_ini_entry->mh_arg2, hashed_ini_entry->mh_arg3, ZEND_INI_STAGE_STARTUP TSRMLS_CC) == SUCCESS) {

View file

@ -92,7 +92,7 @@ ZEND_API int zend_copy_ini_directives(TSRMLS_D);
ZEND_API void zend_ini_sort_entries(TSRMLS_D); ZEND_API void zend_ini_sort_entries(TSRMLS_D);
ZEND_API int zend_register_ini_entries(zend_ini_entry *ini_entry, int module_number TSRMLS_DC); ZEND_API int zend_register_ini_entries(const zend_ini_entry *ini_entry, int module_number TSRMLS_DC);
ZEND_API void zend_unregister_ini_entries(int module_number TSRMLS_DC); ZEND_API void zend_unregister_ini_entries(int module_number TSRMLS_DC);
ZEND_API void zend_ini_refresh_caches(int stage TSRMLS_DC); ZEND_API void zend_ini_refresh_caches(int stage TSRMLS_DC);
ZEND_API int zend_alter_ini_entry(char *name, uint name_length, char *new_value, uint new_value_length, int modify_type, int stage); ZEND_API int zend_alter_ini_entry(char *name, uint name_length, char *new_value, uint new_value_length, int modify_type, int stage);
@ -111,7 +111,7 @@ ZEND_API ZEND_INI_DISP(zend_ini_color_displayer_cb);
ZEND_API ZEND_INI_DISP(display_link_numbers); ZEND_API ZEND_INI_DISP(display_link_numbers);
END_EXTERN_C() END_EXTERN_C()
#define ZEND_INI_BEGIN() static zend_ini_entry ini_entries[] = { #define ZEND_INI_BEGIN() static const zend_ini_entry ini_entries[] = {
#define ZEND_INI_END() { 0, 0, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, 0, 0, NULL } }; #define ZEND_INI_END() { 0, 0, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, 0, 0, NULL } };
#define ZEND_INI_ENTRY3_EX(name, default_value, modifiable, on_modify, arg1, arg2, arg3, displayer) \ #define ZEND_INI_ENTRY3_EX(name, default_value, modifiable, on_modify, arg1, arg2, arg3, displayer) \

View file

@ -485,12 +485,12 @@ static int zend_implement_serializable(zend_class_entry *interface, zend_class_e
/* }}}*/ /* }}}*/
/* {{{ function tables */ /* {{{ function tables */
zend_function_entry zend_funcs_aggregate[] = { const zend_function_entry zend_funcs_aggregate[] = {
ZEND_ABSTRACT_ME(iterator, getIterator, NULL) ZEND_ABSTRACT_ME(iterator, getIterator, NULL)
{NULL, NULL, NULL} {NULL, NULL, NULL}
}; };
zend_function_entry zend_funcs_iterator[] = { const zend_function_entry zend_funcs_iterator[] = {
ZEND_ABSTRACT_ME(iterator, current, NULL) ZEND_ABSTRACT_ME(iterator, current, NULL)
ZEND_ABSTRACT_ME(iterator, next, NULL) ZEND_ABSTRACT_ME(iterator, next, NULL)
ZEND_ABSTRACT_ME(iterator, key, NULL) ZEND_ABSTRACT_ME(iterator, key, NULL)
@ -499,7 +499,7 @@ zend_function_entry zend_funcs_iterator[] = {
{NULL, NULL, NULL} {NULL, NULL, NULL}
}; };
zend_function_entry *zend_funcs_traversable = NULL; const zend_function_entry *zend_funcs_traversable = NULL;
static static
ZEND_BEGIN_ARG_INFO_EX(arginfo_arrayaccess_offset, 0, 0, 1) ZEND_BEGIN_ARG_INFO_EX(arginfo_arrayaccess_offset, 0, 0, 1)
@ -517,7 +517,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_arrayaccess_offset_value, 0, 0, 2)
ZEND_ARG_INFO(0, value) ZEND_ARG_INFO(0, value)
ZEND_END_ARG_INFO() ZEND_END_ARG_INFO()
zend_function_entry zend_funcs_arrayaccess[] = { const zend_function_entry zend_funcs_arrayaccess[] = {
ZEND_ABSTRACT_ME(arrayaccess, offsetExists, arginfo_arrayaccess_offset) ZEND_ABSTRACT_ME(arrayaccess, offsetExists, arginfo_arrayaccess_offset)
ZEND_ABSTRACT_ME(arrayaccess, offsetGet, arginfo_arrayaccess_offset_get) ZEND_ABSTRACT_ME(arrayaccess, offsetGet, arginfo_arrayaccess_offset_get)
ZEND_ABSTRACT_ME(arrayaccess, offsetSet, arginfo_arrayaccess_offset_value) ZEND_ABSTRACT_ME(arrayaccess, offsetSet, arginfo_arrayaccess_offset_value)
@ -530,7 +530,7 @@ ZEND_BEGIN_ARG_INFO(arginfo_serializable_serialize, 0)
ZEND_ARG_INFO(0, serialized) ZEND_ARG_INFO(0, serialized)
ZEND_END_ARG_INFO() ZEND_END_ARG_INFO()
zend_function_entry zend_funcs_serializable[] = { const zend_function_entry zend_funcs_serializable[] = {
ZEND_ABSTRACT_ME(serializable, serialize, NULL) ZEND_ABSTRACT_ME(serializable, serialize, NULL)
ZEND_FENTRY(unserialize, NULL, arginfo_serializable_serialize, ZEND_ACC_PUBLIC|ZEND_ACC_ABSTRACT|ZEND_ACC_CTOR) ZEND_FENTRY(unserialize, NULL, arginfo_serializable_serialize, ZEND_ACC_PUBLIC|ZEND_ACC_ABSTRACT|ZEND_ACC_CTOR)
{NULL, NULL, NULL} {NULL, NULL, NULL}

View file

@ -32,12 +32,12 @@
#define ZEND_MODULE_INFO_FUNC_ARGS zend_module_entry *zend_module TSRMLS_DC #define ZEND_MODULE_INFO_FUNC_ARGS zend_module_entry *zend_module TSRMLS_DC
#define ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU zend_module TSRMLS_CC #define ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU zend_module TSRMLS_CC
extern struct _zend_arg_info first_arg_force_ref[2]; extern const struct _zend_arg_info first_arg_force_ref[2];
extern struct _zend_arg_info second_arg_force_ref[3]; extern const struct _zend_arg_info second_arg_force_ref[3];
extern struct _zend_arg_info third_arg_force_ref[4]; extern const struct _zend_arg_info third_arg_force_ref[4];
extern struct _zend_arg_info fourth_arg_force_ref[5]; extern const struct _zend_arg_info fourth_arg_force_ref[5];
extern struct _zend_arg_info fifth_arg_force_ref[6]; extern const struct _zend_arg_info fifth_arg_force_ref[6];
extern struct _zend_arg_info all_args_by_ref[1]; extern const struct _zend_arg_info all_args_by_ref[1];
#define ZEND_MODULE_API_NO 20060613 #define ZEND_MODULE_API_NO 20060613
#ifdef ZTS #ifdef ZTS
@ -79,10 +79,10 @@ struct _zend_module_entry {
unsigned int zend_api; unsigned int zend_api;
unsigned char zend_debug; unsigned char zend_debug;
unsigned char zts; unsigned char zts;
struct _zend_ini_entry *ini_entry; const struct _zend_ini_entry *ini_entry;
struct _zend_module_dep *deps; const struct _zend_module_dep *deps;
char *name; const char *name;
struct _zend_function_entry *functions; const struct _zend_function_entry *functions;
int (*module_startup_func)(INIT_FUNC_ARGS); int (*module_startup_func)(INIT_FUNC_ARGS);
int (*module_shutdown_func)(SHUTDOWN_FUNC_ARGS); int (*module_shutdown_func)(SHUTDOWN_FUNC_ARGS);
int (*request_startup_func)(INIT_FUNC_ARGS); int (*request_startup_func)(INIT_FUNC_ARGS);

View file

@ -105,7 +105,7 @@ ZEND_END_ARG_INFO()
/* }}} */ /* }}} */
zend_function_entry bcmath_functions[] = { const zend_function_entry bcmath_functions[] = {
PHP_FE(bcadd, arginfo_bcadd) PHP_FE(bcadd, arginfo_bcadd)
PHP_FE(bcsub, arginfo_bcsub) PHP_FE(bcsub, arginfo_bcsub)
PHP_FE(bcmul, arginfo_bcmul) PHP_FE(bcmul, arginfo_bcmul)

View file

@ -94,7 +94,7 @@ ZEND_END_ARG_INFO()
/* }}} */ /* }}} */
static zend_function_entry bz2_functions[] = { static const zend_function_entry bz2_functions[] = {
PHP_FE(bzopen, arginfo_bzopen) PHP_FE(bzopen, arginfo_bzopen)
PHP_FE(bzread, arginfo_bzread) PHP_FE(bzread, arginfo_bzread)
PHP_FALIAS(bzwrite, fwrite, NULL) PHP_FALIAS(bzwrite, fwrite, NULL)

View file

@ -147,7 +147,7 @@ ZEND_END_ARG_INFO()
/* }}} */ /* }}} */
zend_function_entry calendar_functions[] = { const zend_function_entry calendar_functions[] = {
PHP_FE(jdtogregorian, arginfo_jdtogregorian) PHP_FE(jdtogregorian, arginfo_jdtogregorian)
PHP_FE(gregoriantojd, arginfo_gregoriantojd) PHP_FE(gregoriantojd, arginfo_gregoriantojd)
PHP_FE(jdtojulian, arginfo_jdtojulian) PHP_FE(jdtojulian, arginfo_jdtojulian)

View file

@ -39,7 +39,7 @@ zend_class_entry
*php_com_exception_class_entry, *php_com_exception_class_entry,
*php_com_saproxy_class_entry; *php_com_saproxy_class_entry;
zend_function_entry com_dotnet_functions[] = { const zend_function_entry com_dotnet_functions[] = {
PHP_FE(variant_set, NULL) PHP_FE(variant_set, NULL)
PHP_FE(variant_add, NULL) PHP_FE(variant_add, NULL)
PHP_FE(variant_cat, NULL) PHP_FE(variant_cat, NULL)

View file

@ -678,7 +678,7 @@ CPH_METHOD(__construct)
static zend_function_entry com_persist_helper_methods[] = { static const zend_function_entry com_persist_helper_methods[] = {
CPH_ME(__construct, NULL) CPH_ME(__construct, NULL)
CPH_ME(GetCurFileName, NULL) CPH_ME(GetCurFileName, NULL)
CPH_ME(SaveToFile, NULL) CPH_ME(SaveToFile, NULL)

View file

@ -105,7 +105,7 @@ ZEND_END_ARG_INFO()
/* {{{ ctype_functions[] /* {{{ ctype_functions[]
* Every user visible function must have an entry in ctype_functions[]. * Every user visible function must have an entry in ctype_functions[].
*/ */
static zend_function_entry ctype_functions[] = { static const zend_function_entry ctype_functions[] = {
PHP_FE(ctype_alnum, arginfo_ctype_alnum) PHP_FE(ctype_alnum, arginfo_ctype_alnum)
PHP_FE(ctype_alpha, arginfo_ctype_alpha) PHP_FE(ctype_alpha, arginfo_ctype_alpha)
PHP_FE(ctype_cntrl, arginfo_ctype_cntrl) PHP_FE(ctype_cntrl, arginfo_ctype_cntrl)

View file

@ -289,7 +289,7 @@ ZEND_END_ARG_INFO()
/* {{{ curl_functions[] /* {{{ curl_functions[]
*/ */
zend_function_entry curl_functions[] = { const zend_function_entry curl_functions[] = {
PHP_FE(curl_init, arginfo_curl_init) PHP_FE(curl_init, arginfo_curl_init)
PHP_FE(curl_copy_handle, arginfo_curl_copy_handle) PHP_FE(curl_copy_handle, arginfo_curl_copy_handle)
PHP_FE(curl_version, arginfo_curl_version) PHP_FE(curl_version, arginfo_curl_version)

View file

@ -149,7 +149,7 @@ ZEND_END_ARG_INFO()
/* }}} */ /* }}} */
/* {{{ Function table */ /* {{{ Function table */
zend_function_entry date_functions[] = { const zend_function_entry date_functions[] = {
PHP_FE(strtotime, arginfo_strtotime) PHP_FE(strtotime, arginfo_strtotime)
PHP_FE(date, arginfo_date) PHP_FE(date, arginfo_date)
PHP_FE(idate, arginfo_idate) PHP_FE(idate, arginfo_idate)
@ -201,7 +201,7 @@ zend_function_entry date_functions[] = {
}; };
zend_function_entry date_funcs_date[] = { const zend_function_entry date_funcs_date[] = {
PHP_ME(DateTime, __construct, NULL, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC) PHP_ME(DateTime, __construct, NULL, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(format, date_format, NULL, 0) PHP_ME_MAPPING(format, date_format, NULL, 0)
PHP_ME_MAPPING(modify, date_modify, NULL, 0) PHP_ME_MAPPING(modify, date_modify, NULL, 0)
@ -214,7 +214,7 @@ zend_function_entry date_funcs_date[] = {
{NULL, NULL, NULL} {NULL, NULL, NULL}
}; };
zend_function_entry date_funcs_timezone[] = { const zend_function_entry date_funcs_timezone[] = {
PHP_ME(DateTimeZone, __construct, NULL, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC) PHP_ME(DateTimeZone, __construct, NULL, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(getName, timezone_name_get, NULL, 0) PHP_ME_MAPPING(getName, timezone_name_get, NULL, 0)
PHP_ME_MAPPING(getOffset, timezone_offset_get, NULL, 0) PHP_ME_MAPPING(getOffset, timezone_offset_get, NULL, 0)
@ -305,7 +305,7 @@ static int date_object_compare_date(zval *d1, zval *d2 TSRMLS_DC);
static zend_object_value date_object_clone_timezone(zval *this_ptr TSRMLS_DC); static zend_object_value date_object_clone_timezone(zval *this_ptr TSRMLS_DC);
/* This is need to ensure that session extension request shutdown occurs 1st, because it uses the date extension */ /* This is need to ensure that session extension request shutdown occurs 1st, because it uses the date extension */
static zend_module_dep date_deps[] = { static const zend_module_dep date_deps[] = {
ZEND_MOD_OPTIONAL("session") ZEND_MOD_OPTIONAL("session")
{NULL, NULL, NULL} {NULL, NULL, NULL}
}; };

View file

@ -144,7 +144,7 @@ ZEND_END_ARG_INFO()
/* {{{ dba_functions[] /* {{{ dba_functions[]
*/ */
zend_function_entry dba_functions[] = { const zend_function_entry dba_functions[] = {
PHP_FE(dba_open, arginfo_dba_open) PHP_FE(dba_open, arginfo_dba_open)
PHP_FE(dba_popen, arginfo_dba_popen) PHP_FE(dba_popen, arginfo_dba_popen)
PHP_FE(dba_close, arginfo_dba_close) PHP_FE(dba_close, arginfo_dba_close)

View file

@ -803,7 +803,7 @@ ZEND_END_ARG_INFO()
/* {{{ dbase_functions[] /* {{{ dbase_functions[]
*/ */
zend_function_entry dbase_functions[] = { const zend_function_entry dbase_functions[] = {
PHP_FE(dbase_open, arginfo_dbase_open) PHP_FE(dbase_open, arginfo_dbase_open)
PHP_FE(dbase_create, arginfo_dbase_create) PHP_FE(dbase_create, arginfo_dbase_create)
PHP_FE(dbase_close, arginfo_dbase_close) PHP_FE(dbase_close, arginfo_dbase_close)

View file

@ -37,7 +37,7 @@
* Since: * Since:
*/ */
zend_function_entry php_dom_attr_class_functions[] = { const zend_function_entry php_dom_attr_class_functions[] = {
PHP_FALIAS(isId, dom_attr_is_id, NULL) PHP_FALIAS(isId, dom_attr_is_id, NULL)
PHP_ME(domattr, __construct, NULL, ZEND_ACC_PUBLIC) PHP_ME(domattr, __construct, NULL, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL} {NULL, NULL, NULL}

View file

@ -35,7 +35,7 @@
* Since: * Since:
*/ */
zend_function_entry php_dom_cdatasection_class_functions[] = { const zend_function_entry php_dom_cdatasection_class_functions[] = {
PHP_ME(domcdatasection, __construct, NULL, ZEND_ACC_PUBLIC) PHP_ME(domcdatasection, __construct, NULL, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL} {NULL, NULL, NULL}
}; };

View file

@ -35,7 +35,7 @@
* Since: * Since:
*/ */
zend_function_entry php_dom_characterdata_class_functions[] = { const zend_function_entry php_dom_characterdata_class_functions[] = {
PHP_FALIAS(substringData, dom_characterdata_substring_data, NULL) PHP_FALIAS(substringData, dom_characterdata_substring_data, NULL)
PHP_FALIAS(appendData, dom_characterdata_append_data, NULL) PHP_FALIAS(appendData, dom_characterdata_append_data, NULL)
PHP_FALIAS(insertData, dom_characterdata_insert_data, NULL) PHP_FALIAS(insertData, dom_characterdata_insert_data, NULL)

View file

@ -35,7 +35,7 @@
* Since: * Since:
*/ */
zend_function_entry php_dom_comment_class_functions[] = { const zend_function_entry php_dom_comment_class_functions[] = {
PHP_ME(domcomment, __construct, NULL, ZEND_ACC_PUBLIC) PHP_ME(domcomment, __construct, NULL, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL} {NULL, NULL, NULL}
}; };

View file

@ -50,7 +50,7 @@ struct _idsIterator {
* Since: * Since:
*/ */
zend_function_entry php_dom_document_class_functions[] = { const zend_function_entry php_dom_document_class_functions[] = {
PHP_FALIAS(createElement, dom_document_create_element, NULL) PHP_FALIAS(createElement, dom_document_create_element, NULL)
PHP_FALIAS(createDocumentFragment, dom_document_create_document_fragment, NULL) PHP_FALIAS(createDocumentFragment, dom_document_create_document_fragment, NULL)
PHP_FALIAS(createTextNode, dom_document_create_text_node, NULL) PHP_FALIAS(createTextNode, dom_document_create_text_node, NULL)

View file

@ -35,7 +35,7 @@
* Since: * Since:
*/ */
zend_function_entry php_dom_documentfragment_class_functions[] = { const zend_function_entry php_dom_documentfragment_class_functions[] = {
PHP_ME(domdocumentfragment, __construct, NULL, ZEND_ACC_PUBLIC) PHP_ME(domdocumentfragment, __construct, NULL, ZEND_ACC_PUBLIC)
PHP_ME(domdocumentfragment, appendXML, NULL, ZEND_ACC_PUBLIC) PHP_ME(domdocumentfragment, appendXML, NULL, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL} {NULL, NULL, NULL}

View file

@ -34,7 +34,7 @@
* Since: * Since:
*/ */
zend_function_entry php_dom_documenttype_class_functions[] = { const zend_function_entry php_dom_documenttype_class_functions[] = {
{NULL, NULL, NULL} {NULL, NULL, NULL}
}; };

View file

@ -21,36 +21,36 @@
#ifndef DOM_FE_H #ifndef DOM_FE_H
#define DOM_FE_H #define DOM_FE_H
extern zend_function_entry php_dom_domexception_class_functions[]; extern const zend_function_entry php_dom_domexception_class_functions[];
extern zend_function_entry php_dom_domstringlist_class_functions[]; extern const zend_function_entry php_dom_domstringlist_class_functions[];
extern zend_function_entry php_dom_namelist_class_functions[]; extern const zend_function_entry php_dom_namelist_class_functions[];
extern zend_function_entry php_dom_domimplementationlist_class_functions[]; extern const zend_function_entry php_dom_domimplementationlist_class_functions[];
extern zend_function_entry php_dom_domimplementationsource_class_functions[]; extern const zend_function_entry php_dom_domimplementationsource_class_functions[];
extern zend_function_entry php_dom_domimplementation_class_functions[]; extern const zend_function_entry php_dom_domimplementation_class_functions[];
extern zend_function_entry php_dom_documentfragment_class_functions[]; extern const zend_function_entry php_dom_documentfragment_class_functions[];
extern zend_function_entry php_dom_document_class_functions[]; extern const zend_function_entry php_dom_document_class_functions[];
extern zend_function_entry php_dom_node_class_functions[]; extern const zend_function_entry php_dom_node_class_functions[];
extern zend_function_entry php_dom_nodelist_class_functions[]; extern const zend_function_entry php_dom_nodelist_class_functions[];
extern zend_function_entry php_dom_namednodemap_class_functions[]; extern const zend_function_entry php_dom_namednodemap_class_functions[];
extern zend_function_entry php_dom_characterdata_class_functions[]; extern const zend_function_entry php_dom_characterdata_class_functions[];
extern zend_function_entry php_dom_attr_class_functions[]; extern const zend_function_entry php_dom_attr_class_functions[];
extern zend_function_entry php_dom_element_class_functions[]; extern const zend_function_entry php_dom_element_class_functions[];
extern zend_function_entry php_dom_text_class_functions[]; extern const zend_function_entry php_dom_text_class_functions[];
extern zend_function_entry php_dom_comment_class_functions[]; extern const zend_function_entry php_dom_comment_class_functions[];
extern zend_function_entry php_dom_typeinfo_class_functions[]; extern const zend_function_entry php_dom_typeinfo_class_functions[];
extern zend_function_entry php_dom_userdatahandler_class_functions[]; extern const zend_function_entry php_dom_userdatahandler_class_functions[];
extern zend_function_entry php_dom_domerror_class_functions[]; extern const zend_function_entry php_dom_domerror_class_functions[];
extern zend_function_entry php_dom_domerrorhandler_class_functions[]; extern const zend_function_entry php_dom_domerrorhandler_class_functions[];
extern zend_function_entry php_dom_domlocator_class_functions[]; extern const zend_function_entry php_dom_domlocator_class_functions[];
extern zend_function_entry php_dom_domconfiguration_class_functions[]; extern const zend_function_entry php_dom_domconfiguration_class_functions[];
extern zend_function_entry php_dom_cdatasection_class_functions[]; extern const zend_function_entry php_dom_cdatasection_class_functions[];
extern zend_function_entry php_dom_documenttype_class_functions[]; extern const zend_function_entry php_dom_documenttype_class_functions[];
extern zend_function_entry php_dom_notation_class_functions[]; extern const zend_function_entry php_dom_notation_class_functions[];
extern zend_function_entry php_dom_entity_class_functions[]; extern const zend_function_entry php_dom_entity_class_functions[];
extern zend_function_entry php_dom_entityreference_class_functions[]; extern const zend_function_entry php_dom_entityreference_class_functions[];
extern zend_function_entry php_dom_processinginstruction_class_functions[]; extern const zend_function_entry php_dom_processinginstruction_class_functions[];
extern zend_function_entry php_dom_string_extend_class_functions[]; extern const zend_function_entry php_dom_string_extend_class_functions[];
extern zend_function_entry php_dom_xpath_class_functions[]; extern const zend_function_entry php_dom_xpath_class_functions[];
/* domexception errors */ /* domexception errors */
typedef enum { typedef enum {

View file

@ -35,7 +35,7 @@
* Since: DOM Level 3 * Since: DOM Level 3
*/ */
zend_function_entry php_dom_domconfiguration_class_functions[] = { const zend_function_entry php_dom_domconfiguration_class_functions[] = {
PHP_FALIAS(setParameter, dom_domconfiguration_set_parameter, NULL) PHP_FALIAS(setParameter, dom_domconfiguration_set_parameter, NULL)
PHP_FALIAS(getParameter, dom_domconfiguration_get_parameter, NULL) PHP_FALIAS(getParameter, dom_domconfiguration_get_parameter, NULL)
PHP_FALIAS(canSetParameter, dom_domconfiguration_can_set_parameter, NULL) PHP_FALIAS(canSetParameter, dom_domconfiguration_can_set_parameter, NULL)

View file

@ -35,7 +35,7 @@
* Since: DOM Level 3 * Since: DOM Level 3
*/ */
zend_function_entry php_dom_domerror_class_functions[] = { const zend_function_entry php_dom_domerror_class_functions[] = {
{NULL, NULL, NULL} {NULL, NULL, NULL}
}; };

View file

@ -35,7 +35,7 @@
* Since: DOM Level 3 * Since: DOM Level 3
*/ */
zend_function_entry php_dom_domerrorhandler_class_functions[] = { const zend_function_entry php_dom_domerrorhandler_class_functions[] = {
PHP_FALIAS(handleError, dom_domerrorhandler_handle_error, NULL) PHP_FALIAS(handleError, dom_domerrorhandler_handle_error, NULL)
{NULL, NULL, NULL} {NULL, NULL, NULL}
}; };

View file

@ -37,7 +37,7 @@
extern zend_class_entry *dom_domexception_class_entry; extern zend_class_entry *dom_domexception_class_entry;
zend_function_entry php_dom_domexception_class_functions[] = { const zend_function_entry php_dom_domexception_class_functions[] = {
{NULL, NULL, NULL} {NULL, NULL, NULL}
}; };

View file

@ -34,7 +34,7 @@
* Since: * Since:
*/ */
zend_function_entry php_dom_domimplementation_class_functions[] = { const zend_function_entry php_dom_domimplementation_class_functions[] = {
PHP_ME(domimplementation, getFeature, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_ALLOW_STATIC) PHP_ME(domimplementation, getFeature, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_ALLOW_STATIC)
PHP_ME(domimplementation, hasFeature, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_ALLOW_STATIC) PHP_ME(domimplementation, hasFeature, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_ALLOW_STATIC)
PHP_ME(domimplementation, createDocumentType, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_ALLOW_STATIC) PHP_ME(domimplementation, createDocumentType, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_ALLOW_STATIC)

View file

@ -35,7 +35,7 @@
* Since: DOM Level 3 * Since: DOM Level 3
*/ */
zend_function_entry php_dom_domimplementationlist_class_functions[] = { const zend_function_entry php_dom_domimplementationlist_class_functions[] = {
PHP_FALIAS(item, dom_domimplementationlist_item, NULL) PHP_FALIAS(item, dom_domimplementationlist_item, NULL)
{NULL, NULL, NULL} {NULL, NULL, NULL}
}; };

View file

@ -35,7 +35,7 @@
* Since: DOM Level 3 * Since: DOM Level 3
*/ */
zend_function_entry php_dom_domimplementationsource_class_functions[] = { const zend_function_entry php_dom_domimplementationsource_class_functions[] = {
PHP_FALIAS(getDomimplementation, dom_domimplementationsource_get_domimplementation, NULL) PHP_FALIAS(getDomimplementation, dom_domimplementationsource_get_domimplementation, NULL)
PHP_FALIAS(getDomimplementations, dom_domimplementationsource_get_domimplementations, NULL) PHP_FALIAS(getDomimplementations, dom_domimplementationsource_get_domimplementations, NULL)
{NULL, NULL, NULL} {NULL, NULL, NULL}

View file

@ -35,7 +35,7 @@
* Since: DOM Level 3 * Since: DOM Level 3
*/ */
zend_function_entry php_dom_domlocator_class_functions[] = { const zend_function_entry php_dom_domlocator_class_functions[] = {
{NULL, NULL, NULL} {NULL, NULL, NULL}
}; };

View file

@ -35,7 +35,7 @@
* Since: DOM Level 3 * Since: DOM Level 3
*/ */
zend_function_entry php_dom_domstringlist_class_functions[] = { const zend_function_entry php_dom_domstringlist_class_functions[] = {
PHP_FALIAS(item, dom_domstringlist_item, NULL) PHP_FALIAS(item, dom_domstringlist_item, NULL)
{NULL, NULL, NULL} {NULL, NULL, NULL}
}; };

View file

@ -35,7 +35,7 @@
* Since: * Since:
*/ */
zend_function_entry php_dom_element_class_functions[] = { const zend_function_entry php_dom_element_class_functions[] = {
PHP_FALIAS(getAttribute, dom_element_get_attribute, NULL) PHP_FALIAS(getAttribute, dom_element_get_attribute, NULL)
PHP_FALIAS(setAttribute, dom_element_set_attribute, NULL) PHP_FALIAS(setAttribute, dom_element_set_attribute, NULL)
PHP_FALIAS(removeAttribute, dom_element_remove_attribute, NULL) PHP_FALIAS(removeAttribute, dom_element_remove_attribute, NULL)

View file

@ -35,7 +35,7 @@
* Since: * Since:
*/ */
zend_function_entry php_dom_entity_class_functions[] = { const zend_function_entry php_dom_entity_class_functions[] = {
{NULL, NULL, NULL} {NULL, NULL, NULL}
}; };

View file

@ -35,7 +35,7 @@
* Since: * Since:
*/ */
zend_function_entry php_dom_entityreference_class_functions[] = { const zend_function_entry php_dom_entityreference_class_functions[] = {
PHP_ME(domentityreference, __construct, NULL, ZEND_ACC_PUBLIC) PHP_ME(domentityreference, __construct, NULL, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL} {NULL, NULL, NULL}
}; };

View file

@ -35,7 +35,7 @@
* Since: * Since:
*/ */
zend_function_entry php_dom_namednodemap_class_functions[] = { const zend_function_entry php_dom_namednodemap_class_functions[] = {
PHP_FALIAS(getNamedItem, dom_namednodemap_get_named_item, NULL) PHP_FALIAS(getNamedItem, dom_namednodemap_get_named_item, NULL)
PHP_FALIAS(setNamedItem, dom_namednodemap_set_named_item, NULL) PHP_FALIAS(setNamedItem, dom_namednodemap_set_named_item, NULL)
PHP_FALIAS(removeNamedItem, dom_namednodemap_remove_named_item, NULL) PHP_FALIAS(removeNamedItem, dom_namednodemap_remove_named_item, NULL)

View file

@ -35,7 +35,7 @@
* Since: DOM Level 3 * Since: DOM Level 3
*/ */
zend_function_entry php_dom_namelist_class_functions[] = { const zend_function_entry php_dom_namelist_class_functions[] = {
PHP_FALIAS(getName, dom_namelist_get_name, NULL) PHP_FALIAS(getName, dom_namelist_get_name, NULL)
PHP_FALIAS(getNamespaceURI, dom_namelist_get_namespace_uri, NULL) PHP_FALIAS(getNamespaceURI, dom_namelist_get_namespace_uri, NULL)
{NULL, NULL, NULL} {NULL, NULL, NULL}

View file

@ -34,7 +34,7 @@
* Since: * Since:
*/ */
zend_function_entry php_dom_node_class_functions[] = { const zend_function_entry php_dom_node_class_functions[] = {
PHP_FALIAS(insertBefore, dom_node_insert_before, NULL) PHP_FALIAS(insertBefore, dom_node_insert_before, NULL)
PHP_FALIAS(replaceChild, dom_node_replace_child, NULL) PHP_FALIAS(replaceChild, dom_node_replace_child, NULL)
PHP_FALIAS(removeChild, dom_node_remove_child, NULL) PHP_FALIAS(removeChild, dom_node_remove_child, NULL)

View file

@ -35,7 +35,7 @@
* Since: * Since:
*/ */
zend_function_entry php_dom_nodelist_class_functions[] = { const zend_function_entry php_dom_nodelist_class_functions[] = {
PHP_FALIAS(item, dom_nodelist_item, NULL) PHP_FALIAS(item, dom_nodelist_item, NULL)
{NULL, NULL, NULL} {NULL, NULL, NULL}
}; };

View file

@ -35,7 +35,7 @@
* Since: * Since:
*/ */
zend_function_entry php_dom_notation_class_functions[] = { const zend_function_entry php_dom_notation_class_functions[] = {
{NULL, NULL, NULL} {NULL, NULL, NULL}
}; };

View file

@ -480,7 +480,7 @@ zend_object_value dom_objects_store_clone_obj(zval *zobject TSRMLS_DC)
return retval; return retval;
} }
static zend_function_entry dom_functions[] = { static const zend_function_entry dom_functions[] = {
PHP_FE(dom_import_simplexml, NULL) PHP_FE(dom_import_simplexml, NULL)
{NULL, NULL, NULL} {NULL, NULL, NULL}
}; };
@ -489,7 +489,7 @@ static zend_object_handlers* dom_get_obj_handlers(TSRMLS_D) {
return &dom_object_handlers; return &dom_object_handlers;
} }
static zend_module_dep dom_deps[] = { static const zend_module_dep dom_deps[] = {
ZEND_MOD_REQUIRED("libxml") ZEND_MOD_REQUIRED("libxml")
ZEND_MOD_CONFLICTS("domxml") ZEND_MOD_CONFLICTS("domxml")
{NULL, NULL, NULL} {NULL, NULL, NULL}

View file

@ -35,7 +35,7 @@
* Since: * Since:
*/ */
zend_function_entry php_dom_processinginstruction_class_functions[] = { const zend_function_entry php_dom_processinginstruction_class_functions[] = {
PHP_ME(domprocessinginstruction, __construct, NULL, ZEND_ACC_PUBLIC) PHP_ME(domprocessinginstruction, __construct, NULL, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL} {NULL, NULL, NULL}
}; };

View file

@ -35,7 +35,7 @@
* Since: * Since:
*/ */
zend_function_entry php_dom_string_extend_class_functions[] = { const zend_function_entry php_dom_string_extend_class_functions[] = {
PHP_FALIAS(findOffset16, dom_string_extend_find_offset16, NULL) PHP_FALIAS(findOffset16, dom_string_extend_find_offset16, NULL)
PHP_FALIAS(findOffset32, dom_string_extend_find_offset32, NULL) PHP_FALIAS(findOffset32, dom_string_extend_find_offset32, NULL)
{NULL, NULL, NULL} {NULL, NULL, NULL}

View file

@ -35,7 +35,7 @@
* Since: * Since:
*/ */
zend_function_entry php_dom_text_class_functions[] = { const zend_function_entry php_dom_text_class_functions[] = {
PHP_FALIAS(splitText, dom_text_split_text, NULL) PHP_FALIAS(splitText, dom_text_split_text, NULL)
PHP_FALIAS(isWhitespaceInElementContent, dom_text_is_whitespace_in_element_content, NULL) PHP_FALIAS(isWhitespaceInElementContent, dom_text_is_whitespace_in_element_content, NULL)
PHP_FALIAS(isElementContentWhitespace, dom_text_is_whitespace_in_element_content, NULL) PHP_FALIAS(isElementContentWhitespace, dom_text_is_whitespace_in_element_content, NULL)

View file

@ -35,7 +35,7 @@
* Since: DOM Level 3 * Since: DOM Level 3
*/ */
zend_function_entry php_dom_typeinfo_class_functions[] = { const zend_function_entry php_dom_typeinfo_class_functions[] = {
{NULL, NULL, NULL} {NULL, NULL, NULL}
}; };

View file

@ -35,7 +35,7 @@
* Since: DOM Level 3 * Since: DOM Level 3
*/ */
zend_function_entry php_dom_userdatahandler_class_functions[] = { const zend_function_entry php_dom_userdatahandler_class_functions[] = {
PHP_FALIAS(handle, dom_userdatahandler_handle, NULL) PHP_FALIAS(handle, dom_userdatahandler_handle, NULL)
{NULL, NULL, NULL} {NULL, NULL, NULL}
}; };

View file

@ -36,7 +36,7 @@
#if defined(LIBXML_XPATH_ENABLED) #if defined(LIBXML_XPATH_ENABLED)
zend_function_entry php_dom_xpath_class_functions[] = { const zend_function_entry php_dom_xpath_class_functions[] = {
PHP_ME(domxpath, __construct, NULL, ZEND_ACC_PUBLIC) PHP_ME(domxpath, __construct, NULL, ZEND_ACC_PUBLIC)
PHP_FALIAS(registerNamespace, dom_xpath_register_ns, NULL) PHP_FALIAS(registerNamespace, dom_xpath_register_ns, NULL)
PHP_FALIAS(query, dom_xpath_query, NULL) PHP_FALIAS(query, dom_xpath_query, NULL)

View file

@ -76,7 +76,7 @@ ZEND_END_ARG_INFO()
/* }}} */ /* }}} */
/* {{{ Function table */ /* {{{ Function table */
zend_function_entry ereg_functions[] = { const zend_function_entry ereg_functions[] = {
PHP_FE(ereg, arginfo_ereg) PHP_FE(ereg, arginfo_ereg)
PHP_FE(ereg_replace, arginfo_ereg_replace) PHP_FE(ereg_replace, arginfo_ereg_replace)
PHP_FE(eregi, arginfo_eregi) PHP_FE(eregi, arginfo_eregi)

View file

@ -132,7 +132,7 @@ ZEND_END_ARG_INFO()
/* {{{ exif_functions[] /* {{{ exif_functions[]
*/ */
zend_function_entry exif_functions[] = { const zend_function_entry exif_functions[] = {
PHP_FE(exif_read_data, arginfo_exif_read_data) PHP_FE(exif_read_data, arginfo_exif_read_data)
PHP_FALIAS(read_exif_data, exif_read_data, arginfo_exif_read_data) PHP_FALIAS(read_exif_data, exif_read_data, arginfo_exif_read_data)
PHP_FE(exif_tagname, arginfo_exif_tagname) PHP_FE(exif_tagname, arginfo_exif_tagname)

View file

@ -543,7 +543,7 @@ ZEND_END_ARG_INFO()
/* {{{ fbsql_functions[] /* {{{ fbsql_functions[]
*/ */
zend_function_entry fbsql_functions[] = { const zend_function_entry fbsql_functions[] = {
PHP_FE(fbsql_connect, arginfo_fbsql_connect) PHP_FE(fbsql_connect, arginfo_fbsql_connect)
PHP_FE(fbsql_pconnect, arginfo_fbsql_pconnect) PHP_FE(fbsql_pconnect, arginfo_fbsql_pconnect)
PHP_FE(fbsql_close, arginfo_fbsql_close) PHP_FE(fbsql_close, arginfo_fbsql_close)

View file

@ -276,7 +276,7 @@ ZEND_END_ARG_INFO()
/* {{{ fdf_functions[] /* {{{ fdf_functions[]
*/ */
zend_function_entry fdf_functions[] = { const zend_function_entry fdf_functions[] = {
PHP_FE(fdf_add_template, arginfo_fdf_add_template) PHP_FE(fdf_add_template, arginfo_fdf_add_template)
PHP_FE(fdf_close, arginfo_fdf_close) PHP_FE(fdf_close, arginfo_fdf_close)
PHP_FE(fdf_create, arginfo_fdf_create) PHP_FE(fdf_create, arginfo_fdf_create)

View file

@ -79,7 +79,7 @@ static unsigned int php_sapi_filter(int arg, char *var, char **val, unsigned int
/* {{{ filter_functions[] /* {{{ filter_functions[]
*/ */
zend_function_entry filter_functions[] = { const zend_function_entry filter_functions[] = {
PHP_FE(filter_input, NULL) PHP_FE(filter_input, NULL)
PHP_FE(filter_var, NULL) PHP_FE(filter_var, NULL)
PHP_FE(filter_input_array, NULL) PHP_FE(filter_input_array, NULL)

View file

@ -274,7 +274,7 @@ ZEND_END_ARG_INFO()
/* }}} */ /* }}} */
zend_function_entry php_ftp_functions[] = { const zend_function_entry php_ftp_functions[] = {
PHP_FE(ftp_connect, arginfo_ftp_connect) PHP_FE(ftp_connect, arginfo_ftp_connect)
#if HAVE_OPENSSL_EXT #if HAVE_OPENSSL_EXT
PHP_FE(ftp_ssl_connect, arginfo_ftp_ssl_connect) PHP_FE(ftp_ssl_connect, arginfo_ftp_ssl_connect)

View file

@ -936,7 +936,7 @@ ZEND_END_ARG_INFO()
/* {{{ gd_functions[] /* {{{ gd_functions[]
*/ */
zend_function_entry gd_functions[] = { const zend_function_entry gd_functions[] = {
PHP_FE(gd_info, arginfo_gd_info) PHP_FE(gd_info, arginfo_gd_info)
PHP_FE(imagearc, arginfo_imagearc) PHP_FE(imagearc, arginfo_imagearc)
PHP_FE(imageellipse, arginfo_imageellipse) PHP_FE(imageellipse, arginfo_imageellipse)

View file

@ -101,7 +101,7 @@ ZEND_END_ARG_INFO()
/* {{{ php_gettext_functions[] /* {{{ php_gettext_functions[]
*/ */
zend_function_entry php_gettext_functions[] = { const zend_function_entry php_gettext_functions[] = {
PHP_NAMED_FE(textdomain, zif_textdomain, arginfo_textdomain) PHP_NAMED_FE(textdomain, zif_textdomain, arginfo_textdomain)
PHP_NAMED_FE(gettext, zif_gettext, arginfo_gettext) PHP_NAMED_FE(gettext, zif_gettext, arginfo_gettext)
/* Alias for gettext() */ /* Alias for gettext() */

View file

@ -278,7 +278,7 @@ static ZEND_GINIT_FUNCTION(gmp);
/* {{{ gmp_functions[] /* {{{ gmp_functions[]
*/ */
zend_function_entry gmp_functions[] = { const zend_function_entry gmp_functions[] = {
ZEND_FE(gmp_init, arginfo_gmp_init) ZEND_FE(gmp_init, arginfo_gmp_init)
ZEND_FE(gmp_intval, arginfo_gmp_intval) ZEND_FE(gmp_intval, arginfo_gmp_intval)
ZEND_FE(gmp_strval, arginfo_gmp_strval) ZEND_FE(gmp_strval, arginfo_gmp_strval)

View file

@ -856,7 +856,7 @@ ZEND_END_ARG_INFO()
/* {{{ hash_functions[] /* {{{ hash_functions[]
*/ */
zend_function_entry hash_functions[] = { const zend_function_entry hash_functions[] = {
PHP_HASH_FE(hash) PHP_HASH_FE(hash)
PHP_HASH_FE(hash_file) PHP_HASH_FE(hash_file)

View file

@ -135,7 +135,7 @@ ZEND_END_ARG_INFO()
/* {{{ iconv_functions[] /* {{{ iconv_functions[]
*/ */
zend_function_entry iconv_functions[] = { const zend_function_entry iconv_functions[] = {
PHP_RAW_NAMED_FE(iconv,php_if_iconv, arginfo_iconv) PHP_RAW_NAMED_FE(iconv,php_if_iconv, arginfo_iconv)
PHP_FE(iconv_get_encoding, arginfo_iconv_get_encoding) PHP_FE(iconv_get_encoding, arginfo_iconv_get_encoding)
PHP_FE(iconv_set_encoding, arginfo_iconv_set_encoding) PHP_FE(iconv_set_encoding, arginfo_iconv_set_encoding)

View file

@ -92,7 +92,7 @@ static PHP_GINIT_FUNCTION(imap);
/* {{{ imap_functions[] /* {{{ imap_functions[]
*/ */
zend_function_entry imap_functions[] = { const zend_function_entry imap_functions[] = {
PHP_FE(imap_open, NULL) PHP_FE(imap_open, NULL)
PHP_FE(imap_reopen, NULL) PHP_FE(imap_reopen, NULL)
PHP_FE(imap_close, NULL) PHP_FE(imap_close, NULL)
@ -173,7 +173,7 @@ zend_function_entry imap_functions[] = {
/* }}} */ /* }}} */
/* {{{ imap dependencies */ /* {{{ imap dependencies */
static zend_module_dep imap_deps[] = { static const zend_module_dep imap_deps[] = {
ZEND_MOD_REQUIRED("standard") ZEND_MOD_REQUIRED("standard")
{NULL, NULL, NULL} {NULL, NULL, NULL}
}; };

View file

@ -47,7 +47,7 @@ ZEND_DECLARE_MODULE_GLOBALS(ibase)
static PHP_GINIT_FUNCTION(ibase); static PHP_GINIT_FUNCTION(ibase);
/* {{{ extension definition structures */ /* {{{ extension definition structures */
zend_function_entry ibase_functions[] = { const zend_function_entry ibase_functions[] = {
PHP_FE(ibase_connect, NULL) PHP_FE(ibase_connect, NULL)
PHP_FE(ibase_pconnect, NULL) PHP_FE(ibase_pconnect, NULL)
PHP_FE(ibase_close, NULL) PHP_FE(ibase_close, NULL)

View file

@ -36,7 +36,7 @@ static const char digits[] = "0123456789abcdef";
* *
* Every user visible function must have an entry in json_functions[]. * Every user visible function must have an entry in json_functions[].
*/ */
function_entry json_functions[] = { const function_entry json_functions[] = {
PHP_FE(json_encode, NULL) PHP_FE(json_encode, NULL)
PHP_FE(json_decode, NULL) PHP_FE(json_decode, NULL)
{NULL, NULL, NULL} /* Must be the last line in json_functions[] */ {NULL, NULL, NULL} /* Must be the last line in json_functions[] */

View file

@ -100,7 +100,7 @@ static int le_link, le_result, le_result_entry;
*/ */
/* {{{ ldap_functions[] /* {{{ ldap_functions[]
*/ */
zend_function_entry ldap_functions[] = { const zend_function_entry ldap_functions[] = {
PHP_FE(ldap_connect, NULL) PHP_FE(ldap_connect, NULL)
PHP_FALIAS(ldap_close, ldap_unbind, NULL) PHP_FALIAS(ldap_close, ldap_unbind, NULL)
PHP_FE(ldap_bind, NULL) PHP_FE(ldap_bind, NULL)

View file

@ -112,7 +112,7 @@ ZEND_END_ARG_INFO()
/* }}} */ /* }}} */
/* {{{ extension definition structures */ /* {{{ extension definition structures */
static zend_function_entry libxml_functions[] = { static const zend_function_entry libxml_functions[] = {
PHP_FE(libxml_set_streams_context, arginfo_libxml_set_streams_context) PHP_FE(libxml_set_streams_context, arginfo_libxml_set_streams_context)
PHP_FE(libxml_use_internal_errors, arginfo_libxml_use_internal_errors) PHP_FE(libxml_use_internal_errors, arginfo_libxml_use_internal_errors)
PHP_FE(libxml_get_last_error, arginfo_libxml_get_last_error) PHP_FE(libxml_get_last_error, arginfo_libxml_get_last_error)

View file

@ -196,7 +196,7 @@ static const struct mb_overload_def mb_ovld[] = {
/* }}} */ /* }}} */
/* {{{ zend_function_entry mbstring_functions[] */ /* {{{ zend_function_entry mbstring_functions[] */
zend_function_entry mbstring_functions[] = { const zend_function_entry mbstring_functions[] = {
PHP_FE(mb_convert_case, NULL) PHP_FE(mb_convert_case, NULL)
PHP_FE(mb_strtoupper, NULL) PHP_FE(mb_strtoupper, NULL)
PHP_FE(mb_strtolower, NULL) PHP_FE(mb_strtolower, NULL)

View file

@ -44,7 +44,7 @@ typedef struct _php_mcrypt {
zend_bool init; zend_bool init;
} php_mcrypt; } php_mcrypt;
zend_function_entry mcrypt_functions[] = { /* {{{ */ const zend_function_entry mcrypt_functions[] = { /* {{{ */
PHP_FE(mcrypt_ecb, NULL) PHP_FE(mcrypt_ecb, NULL)
PHP_FE(mcrypt_cbc, NULL) PHP_FE(mcrypt_cbc, NULL)
PHP_FE(mcrypt_cfb, NULL) PHP_FE(mcrypt_cfb, NULL)

View file

@ -32,7 +32,7 @@
#include "php_globals.h" #include "php_globals.h"
#include "ext/standard/info.h" #include "ext/standard/info.h"
zend_function_entry mhash_functions[] = { const zend_function_entry mhash_functions[] = {
PHP_FE(mhash_count, NULL) PHP_FE(mhash_count, NULL)
PHP_FE(mhash_get_block_size, NULL) PHP_FE(mhash_get_block_size, NULL)
PHP_FE(mhash_get_hash_name, NULL) PHP_FE(mhash_get_hash_name, NULL)

View file

@ -218,7 +218,7 @@ static PHP_GINIT_FUNCTION(mime_magic);
static magic_server_config_rec mime_global; static magic_server_config_rec mime_global;
/* {{{ mime_magic_functions[] */ /* {{{ mime_magic_functions[] */
zend_function_entry mime_magic_functions[] = { const zend_function_entry mime_magic_functions[] = {
PHP_FE(mime_content_type, NULL) PHP_FE(mime_content_type, NULL)
{NULL, NULL, NULL} {NULL, NULL, NULL}
}; };

View file

@ -45,7 +45,7 @@
void destroySWFBlock(SWFBlock block); void destroySWFBlock(SWFBlock block);
#endif #endif
static zend_function_entry ming_functions[] = { static const zend_function_entry ming_functions[] = {
PHP_FALIAS(ming_setcubicthreshold, ming_setCubicThreshold, NULL) PHP_FALIAS(ming_setcubicthreshold, ming_setCubicThreshold, NULL)
PHP_FALIAS(ming_setscale, ming_setScale, NULL) PHP_FALIAS(ming_setscale, ming_setScale, NULL)
PHP_FALIAS(ming_useswfversion, ming_useSWFVersion, NULL) PHP_FALIAS(ming_useswfversion, ming_useSWFVersion, NULL)
@ -355,7 +355,7 @@ static SWFAction getAction(zval *id TSRMLS_DC)
} }
/* }}} */ /* }}} */
static zend_function_entry swfaction_functions[] = { static const zend_function_entry swfaction_functions[] = {
PHP_ME(swfaction, __construct, NULL, 0) PHP_ME(swfaction, __construct, NULL, 0)
{ NULL, NULL, NULL } { NULL, NULL, NULL }
}; };
@ -461,7 +461,7 @@ PHP_METHOD(swfbitmap, getHeight)
} }
/* }}} */ /* }}} */
static zend_function_entry swfbitmap_functions[] = { static const zend_function_entry swfbitmap_functions[] = {
PHP_ME(swfbitmap, __construct, NULL, 0) PHP_ME(swfbitmap, __construct, NULL, 0)
PHP_ME(swfbitmap, getWidth, NULL, 0) PHP_ME(swfbitmap, getWidth, NULL, 0)
PHP_ME(swfbitmap, getHeight, NULL, 0) PHP_ME(swfbitmap, getHeight, NULL, 0)
@ -704,7 +704,7 @@ PHP_FUNCTION(ming_keypress)
} }
/* }}} */ /* }}} */
static zend_function_entry swfbutton_functions[] = { static const zend_function_entry swfbutton_functions[] = {
PHP_ME(swfbutton, __construct, NULL, 0) PHP_ME(swfbutton, __construct, NULL, 0)
PHP_ME(swfbutton, setHit, NULL, 0) PHP_ME(swfbutton, setHit, NULL, 0)
PHP_ME(swfbutton, setOver, NULL, 0) PHP_ME(swfbutton, setOver, NULL, 0)
@ -1199,7 +1199,7 @@ PHP_METHOD(swfdisplayitem, getRot)
/* }}} */ /* }}} */
#endif #endif
static zend_function_entry swfdisplayitem_functions[] = { static const zend_function_entry swfdisplayitem_functions[] = {
PHP_ME(swfdisplayitem, moveTo, NULL, 0) PHP_ME(swfdisplayitem, moveTo, NULL, 0)
PHP_ME(swfdisplayitem, move, NULL, 0) PHP_ME(swfdisplayitem, move, NULL, 0)
PHP_ME(swfdisplayitem, scaleTo, NULL, 0) PHP_ME(swfdisplayitem, scaleTo, NULL, 0)
@ -1347,7 +1347,7 @@ PHP_METHOD(swffill, skewYTo)
SWFFill_skewYTo(getFill(getThis() TSRMLS_CC), FLOAT_Z_DVAL_PP(y)); SWFFill_skewYTo(getFill(getThis() TSRMLS_CC), FLOAT_Z_DVAL_PP(y));
} }
/* }}} */ /* }}} */
static zend_function_entry swffill_functions[] = { static const zend_function_entry swffill_functions[] = {
PHP_ME(swffill, __construct, NULL, 0) PHP_ME(swffill, __construct, NULL, 0)
PHP_ME(swffill, moveTo, NULL, 0) PHP_ME(swffill, moveTo, NULL, 0)
PHP_ME(swffill, scaleTo, NULL, 0) PHP_ME(swffill, scaleTo, NULL, 0)
@ -1412,7 +1412,7 @@ PHP_METHOD(swffontchar, addUTF8Chars)
} }
/* }}} */ /* }}} */
static zend_function_entry swffontchar_functions[] = { static const zend_function_entry swffontchar_functions[] = {
PHP_ME(swffontchar, addChars, NULL, 0) PHP_ME(swffontchar, addChars, NULL, 0)
PHP_ME(swffontchar, addUTF8Chars, NULL, 0) PHP_ME(swffontchar, addUTF8Chars, NULL, 0)
{ NULL, NULL, NULL } { NULL, NULL, NULL }
@ -1614,7 +1614,7 @@ PHP_METHOD(swffont, getShape)
#endif #endif
static zend_function_entry swffont_functions[] = { static const zend_function_entry swffont_functions[] = {
PHP_ME(swffont, __construct, NULL, 0) PHP_ME(swffont, __construct, NULL, 0)
PHP_ME(swffont, getWidth, NULL, 0) PHP_ME(swffont, getWidth, NULL, 0)
#ifdef HAVE_NEW_MING #ifdef HAVE_NEW_MING
@ -1700,7 +1700,7 @@ PHP_METHOD(swfgradient, addEntry)
} }
/* }}} */ /* }}} */
static zend_function_entry swfgradient_functions[] = { static const zend_function_entry swfgradient_functions[] = {
PHP_ME(swfgradient, __construct, NULL, 0) PHP_ME(swfgradient, __construct, NULL, 0)
PHP_ME(swfgradient, addEntry, NULL, 0) PHP_ME(swfgradient, addEntry, NULL, 0)
{ NULL, NULL, NULL } { NULL, NULL, NULL }
@ -1769,7 +1769,7 @@ PHP_METHOD(swfmorph, getShape2)
} }
/* }}} */ /* }}} */
static zend_function_entry swfmorph_functions[] = { static const zend_function_entry swfmorph_functions[] = {
PHP_ME(swfmorph, __construct, NULL, 0) PHP_ME(swfmorph, __construct, NULL, 0)
PHP_ME(swfmorph, getShape1, NULL, 0) PHP_ME(swfmorph, getShape1, NULL, 0)
PHP_ME(swfmorph, getShape2, NULL, 0) PHP_ME(swfmorph, getShape2, NULL, 0)
@ -1849,7 +1849,7 @@ static void destroy_SWFSound_resource(zend_rsrc_list_entry *resource TSRMLS_DC)
/* }}} */ /* }}} */
static zend_function_entry swfsound_functions[] = { static const zend_function_entry swfsound_functions[] = {
PHP_ME(swfsound, __construct, NULL, 0) PHP_ME(swfsound, __construct, NULL, 0)
{ NULL, NULL, NULL } { NULL, NULL, NULL }
}; };
@ -1934,7 +1934,7 @@ PHP_METHOD(swfsoundinstance, loopCount)
} }
/* }}} */ /* }}} */
static zend_function_entry swfsoundinstance_functions[] = { static const zend_function_entry swfsoundinstance_functions[] = {
PHP_ME(swfsoundinstance, noMultiple, NULL, 0) PHP_ME(swfsoundinstance, noMultiple, NULL, 0)
PHP_ME(swfsoundinstance, loopInPoint, NULL, 0) PHP_ME(swfsoundinstance, loopInPoint, NULL, 0)
PHP_ME(swfsoundinstance, loopOutPoint, NULL, 0) PHP_ME(swfsoundinstance, loopOutPoint, NULL, 0)
@ -2038,7 +2038,7 @@ PHP_METHOD(swfvideostream, getnumframes)
/* }}} */ /* }}} */
static zend_function_entry swfvideostream_functions[] = { static const zend_function_entry swfvideostream_functions[] = {
PHP_ME(swfvideostream, __construct, NULL, 0) PHP_ME(swfvideostream, __construct, NULL, 0)
PHP_ME(swfvideostream, setdimension, NULL, 0) PHP_ME(swfvideostream, setdimension, NULL, 0)
PHP_ME(swfvideostream, getnumframes, NULL, 0) PHP_ME(swfvideostream, getnumframes, NULL, 0)
@ -2115,7 +2115,7 @@ static SWFPrebuiltClip getPrebuiltClip(zval *id TSRMLS_DC)
} }
/* }}} */ /* }}} */
static zend_function_entry swfprebuiltclip_functions[] = { static const zend_function_entry swfprebuiltclip_functions[] = {
PHP_ME(swfprebuiltclip, __construct, NULL, 0) PHP_ME(swfprebuiltclip, __construct, NULL, 0)
{ NULL, NULL, NULL } { NULL, NULL, NULL }
}; };
@ -2767,7 +2767,7 @@ PHP_METHOD(swfmovie, addFont)
/* }}} */ /* }}} */
#endif #endif
static zend_function_entry swfmovie_functions[] = { static const zend_function_entry swfmovie_functions[] = {
PHP_ME(swfmovie, __construct, NULL, 0) PHP_ME(swfmovie, __construct, NULL, 0)
PHP_ME(swfmovie, nextFrame, NULL, 0) PHP_ME(swfmovie, nextFrame, NULL, 0)
PHP_ME(swfmovie, labelFrame, NULL, 0) PHP_ME(swfmovie, labelFrame, NULL, 0)
@ -3298,7 +3298,7 @@ PHP_METHOD(swfshape, drawCubicTo)
} }
/* }}} */ /* }}} */
static zend_function_entry swfshape_functions[] = { static const zend_function_entry swfshape_functions[] = {
PHP_ME(swfshape, __construct, NULL, 0) PHP_ME(swfshape, __construct, NULL, 0)
PHP_ME(swfshape, setLine, NULL, 0) PHP_ME(swfshape, setLine, NULL, 0)
PHP_ME(swfshape, addFill, NULL, 0) PHP_ME(swfshape, addFill, NULL, 0)
@ -3489,7 +3489,7 @@ PHP_METHOD(swfsprite, stopSound)
/* }}} */ /* }}} */
#endif #endif
static zend_function_entry swfsprite_functions[] = { static const zend_function_entry swfsprite_functions[] = {
PHP_ME(swfsprite, __construct, NULL, 0) PHP_ME(swfsprite, __construct, NULL, 0)
PHP_ME(swfsprite, add, NULL, 0) PHP_ME(swfsprite, add, NULL, 0)
PHP_ME(swfsprite, remove, NULL, 0) PHP_ME(swfsprite, remove, NULL, 0)
@ -3775,7 +3775,7 @@ PHP_METHOD(swftext, getLeading)
} }
/* }}} */ /* }}} */
static zend_function_entry swftext_functions[] = { static const zend_function_entry swftext_functions[] = {
PHP_ME(swftext, __construct, NULL, 0) PHP_ME(swftext, __construct, NULL, 0)
PHP_ME(swftext, setFont, NULL, 0) PHP_ME(swftext, setFont, NULL, 0)
PHP_ME(swftext, setHeight, NULL, 0) PHP_ME(swftext, setHeight, NULL, 0)
@ -4086,7 +4086,7 @@ PHP_METHOD(swftextfield, addChars)
/* }}} */ /* }}} */
#endif #endif
static zend_function_entry swftextfield_functions[] = { static const zend_function_entry swftextfield_functions[] = {
PHP_ME(swftextfield, __construct, NULL, 0) PHP_ME(swftextfield, __construct, NULL, 0)
PHP_ME(swftextfield, setFont, NULL, 0) PHP_ME(swftextfield, setFont, NULL, 0)
PHP_ME(swftextfield, setBounds, NULL, 0) PHP_ME(swftextfield, setBounds, NULL, 0)

View file

@ -46,7 +46,7 @@ static php_msql_globals msql_globals;
/* {{{ msql_functions[] /* {{{ msql_functions[]
*/ */
zend_function_entry msql_functions[] = { const zend_function_entry msql_functions[] = {
PHP_FE(msql_connect, NULL) PHP_FE(msql_connect, NULL)
PHP_FE(msql_pconnect, NULL) PHP_FE(msql_pconnect, NULL)
PHP_FE(msql_close, NULL) PHP_FE(msql_close, NULL)

View file

@ -47,7 +47,7 @@ static void php_mssql_get_column_content_without_type(mssql_link *mssql_ptr,int
static void _mssql_bind_hash_dtor(void *data); static void _mssql_bind_hash_dtor(void *data);
zend_function_entry mssql_functions[] = { const zend_function_entry mssql_functions[] = {
PHP_FE(mssql_connect, NULL) PHP_FE(mssql_connect, NULL)
PHP_FE(mssql_pconnect, NULL) PHP_FE(mssql_pconnect, NULL)
PHP_FE(mssql_close, NULL) PHP_FE(mssql_close, NULL)

View file

@ -132,7 +132,7 @@ static MYSQLND_QCACHE *mysql_mysqlnd_qcache;
/* {{{ mysql_functions[] /* {{{ mysql_functions[]
*/ */
zend_function_entry mysql_functions[] = { const zend_function_entry mysql_functions[] = {
PHP_FE(mysql_connect, NULL) PHP_FE(mysql_connect, NULL)
PHP_FE(mysql_pconnect, NULL) PHP_FE(mysql_pconnect, NULL)
PHP_FE(mysql_close, NULL) PHP_FE(mysql_close, NULL)
@ -219,7 +219,7 @@ zend_function_entry mysql_functions[] = {
/* }}} */ /* }}} */
/* Dependancies */ /* Dependancies */
static zend_module_dep mysql_deps[] = { static const zend_module_dep mysql_deps[] = {
#if defined(HAVE_MYSQLND) #if defined(HAVE_MYSQLND)
ZEND_MOD_REQUIRED("mysqlnd") ZEND_MOD_REQUIRED("mysqlnd")
#endif #endif

View file

@ -465,7 +465,7 @@ PHP_MYSQLI_EXPORT(zend_object_value) mysqli_objects_new(zend_class_entry *class_
/* Dependancies */ /* Dependancies */
static zend_module_dep mysqli_deps[] = { static const zend_module_dep mysqli_deps[] = {
#if defined(HAVE_SPL) && ((PHP_MAJOR_VERSION > 5) || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 1)) #if defined(HAVE_SPL) && ((PHP_MAJOR_VERSION > 5) || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 1))
ZEND_MOD_REQUIRED("spl") ZEND_MOD_REQUIRED("spl")
#endif #endif

View file

@ -154,7 +154,7 @@ mysqli_property_entry mysqli_driver_property_entries[] = {
/* {{{ mysqli_driver_methods[] /* {{{ mysqli_driver_methods[]
*/ */
zend_function_entry mysqli_driver_methods[] = { const zend_function_entry mysqli_driver_methods[] = {
#if defined(HAVE_EMBEDDED_MYSQLI) #if defined(HAVE_EMBEDDED_MYSQLI)
PHP_FALIAS(embedded_server_start, mysqli_embedded_server_start, NULL) PHP_FALIAS(embedded_server_start, mysqli_embedded_server_start, NULL)
PHP_FALIAS(embedded_server_end, mysqli_embedded_server_end, NULL) PHP_FALIAS(embedded_server_end, mysqli_embedded_server_end, NULL)

View file

@ -32,7 +32,7 @@
/* {{{ mysqli_exception_methods[] /* {{{ mysqli_exception_methods[]
*/ */
zend_function_entry mysqli_exception_methods[] = { const zend_function_entry mysqli_exception_methods[] = {
{NULL, NULL, NULL} {NULL, NULL, NULL}
}; };
/* }}} */ /* }}} */

View file

@ -52,7 +52,7 @@ static
* *
* Every user visible function must have an entry in mysqli_functions[]. * Every user visible function must have an entry in mysqli_functions[].
*/ */
zend_function_entry mysqli_functions[] = { const zend_function_entry mysqli_functions[] = {
PHP_FE(mysqli_affected_rows, NULL) PHP_FE(mysqli_affected_rows, NULL)
PHP_FE(mysqli_autocommit, NULL) PHP_FE(mysqli_autocommit, NULL)
PHP_FE(mysqli_change_user, NULL) PHP_FE(mysqli_change_user, NULL)
@ -195,7 +195,7 @@ zend_function_entry mysqli_functions[] = {
* *
* Every user visible function must have an entry in mysqli_functions[]. * Every user visible function must have an entry in mysqli_functions[].
*/ */
zend_function_entry mysqli_link_methods[] = { const zend_function_entry mysqli_link_methods[] = {
PHP_FALIAS(autocommit,mysqli_autocommit,NULL) PHP_FALIAS(autocommit,mysqli_autocommit,NULL)
PHP_FALIAS(change_user,mysqli_change_user,NULL) PHP_FALIAS(change_user,mysqli_change_user,NULL)
PHP_FALIAS(character_set_name, mysqli_character_set_name,NULL) PHP_FALIAS(character_set_name, mysqli_character_set_name,NULL)
@ -263,7 +263,7 @@ zend_function_entry mysqli_link_methods[] = {
* *
* Every user visible function must have an entry in mysqli_result_functions[]. * Every user visible function must have an entry in mysqli_result_functions[].
*/ */
zend_function_entry mysqli_result_methods[] = { const zend_function_entry mysqli_result_methods[] = {
PHP_FALIAS(__construct, mysqli_result_construct, NULL) PHP_FALIAS(__construct, mysqli_result_construct, NULL)
PHP_FALIAS(close,mysqli_free_result,NULL) PHP_FALIAS(close,mysqli_free_result,NULL)
PHP_FALIAS(free,mysqli_free_result,NULL) PHP_FALIAS(free,mysqli_free_result,NULL)
@ -288,7 +288,7 @@ zend_function_entry mysqli_result_methods[] = {
* *
* Every user visible function must have an entry in mysqli_stmt_functions[]. * Every user visible function must have an entry in mysqli_stmt_functions[].
*/ */
zend_function_entry mysqli_stmt_methods[] = { const zend_function_entry mysqli_stmt_methods[] = {
PHP_FALIAS(__construct, mysqli_stmt_construct, NULL) PHP_FALIAS(__construct, mysqli_stmt_construct, NULL)
PHP_FALIAS(attr_get,mysqli_stmt_attr_get,NULL) PHP_FALIAS(attr_get,mysqli_stmt_attr_get,NULL)
PHP_FALIAS(attr_set,mysqli_stmt_attr_set,NULL) PHP_FALIAS(attr_set,mysqli_stmt_attr_set,NULL)

View file

@ -313,7 +313,7 @@ PHP_METHOD(mysqli_warning, __construct)
/* }}} */ /* }}} */
/* {{{ mysqli_warning_methods */ /* {{{ mysqli_warning_methods */
zend_function_entry mysqli_warning_methods[] = { const zend_function_entry mysqli_warning_methods[] = {
PHP_ME(mysqli_warning, __construct, NULL, ZEND_ACC_PROTECTED) PHP_ME(mysqli_warning, __construct, NULL, ZEND_ACC_PROTECTED)
PHP_ME(mysqli_warning, next, NULL, ZEND_ACC_PUBLIC) PHP_ME(mysqli_warning, next, NULL, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL} {NULL, NULL, NULL}

View file

@ -165,13 +165,13 @@ typedef long long my_longlong;
#define PHP_MYSQLI_EXPORT(__type) PHP_MYSQLI_API __type #define PHP_MYSQLI_EXPORT(__type) PHP_MYSQLI_API __type
extern zend_function_entry mysqli_functions[]; extern const zend_function_entry mysqli_functions[];
extern zend_function_entry mysqli_link_methods[]; extern const zend_function_entry mysqli_link_methods[];
extern zend_function_entry mysqli_stmt_methods[]; extern const zend_function_entry mysqli_stmt_methods[];
extern zend_function_entry mysqli_result_methods[]; extern const zend_function_entry mysqli_result_methods[];
extern zend_function_entry mysqli_driver_methods[]; extern const zend_function_entry mysqli_driver_methods[];
extern zend_function_entry mysqli_warning_methods[]; extern const zend_function_entry mysqli_warning_methods[];
extern zend_function_entry mysqli_exception_methods[]; extern const zend_function_entry mysqli_exception_methods[];
extern mysqli_property_entry mysqli_link_property_entries[]; extern mysqli_property_entry mysqli_link_property_entries[];
extern mysqli_property_entry mysqli_result_property_entries[]; extern mysqli_property_entry mysqli_result_property_entries[];

View file

@ -1562,7 +1562,7 @@ PHPAPI MYSQLND *mysqlnd_init(zend_bool persistent)
* *
* Every user visible function must have an entry in mysqlnd_functions[]. * Every user visible function must have an entry in mysqlnd_functions[].
*/ */
static zend_function_entry mysqlnd_functions[] = { static const zend_function_entry mysqlnd_functions[] = {
{NULL, NULL, NULL} /* Must be the last line in mysqlnd_functions[] */ {NULL, NULL, NULL} /* Must be the last line in mysqlnd_functions[] */
}; };
/* }}} */ /* }}} */

View file

@ -203,7 +203,7 @@ PHP_FUNCTION(oci_collection_trim);
/* {{{ extension definition structures /* {{{ extension definition structures
*/ */
static zend_function_entry php_oci_functions[] = { static const zend_function_entry php_oci_functions[] = {
PHP_FE(oci_define_by_name, oci_third_arg_force_ref) PHP_FE(oci_define_by_name, oci_third_arg_force_ref)
PHP_FE(oci_bind_by_name, oci_third_arg_force_ref) PHP_FE(oci_bind_by_name, oci_third_arg_force_ref)
PHP_FE(oci_bind_array_by_name, oci_third_arg_force_ref) PHP_FE(oci_bind_array_by_name, oci_third_arg_force_ref)
@ -326,7 +326,7 @@ static zend_function_entry php_oci_functions[] = {
{NULL,NULL,NULL} {NULL,NULL,NULL}
}; };
static zend_function_entry php_oci_lob_class_functions[] = { static const zend_function_entry php_oci_lob_class_functions[] = {
PHP_FALIAS(load, oci_lob_load, NULL) PHP_FALIAS(load, oci_lob_load, NULL)
PHP_FALIAS(tell, oci_lob_tell, NULL) PHP_FALIAS(tell, oci_lob_tell, NULL)
PHP_FALIAS(truncate, oci_lob_truncate, NULL) PHP_FALIAS(truncate, oci_lob_truncate, NULL)
@ -355,7 +355,7 @@ static zend_function_entry php_oci_lob_class_functions[] = {
}; };
#ifdef PHP_OCI8_HAVE_COLLECTIONS #ifdef PHP_OCI8_HAVE_COLLECTIONS
static zend_function_entry php_oci_coll_class_functions[] = { static const zend_function_entry php_oci_coll_class_functions[] = {
PHP_FALIAS(append, oci_collection_append, NULL) PHP_FALIAS(append, oci_collection_append, NULL)
PHP_FALIAS(getelem, oci_collection_element_get, NULL) PHP_FALIAS(getelem, oci_collection_element_get, NULL)
PHP_FALIAS(assignelem, oci_collection_element_assign, NULL) PHP_FALIAS(assignelem, oci_collection_element_assign, NULL)

View file

@ -49,7 +49,7 @@
#include "ext/standard/info.h" #include "ext/standard/info.h"
#include "php_ini.h" #include "php_ini.h"
zend_function_entry birdstep_functions[] = { const zend_function_entry birdstep_functions[] = {
PHP_FE(birdstep_connect, NULL) PHP_FE(birdstep_connect, NULL)
PHP_FE(birdstep_close, NULL) PHP_FE(birdstep_close, NULL)
PHP_FE(birdstep_exec, NULL) PHP_FE(birdstep_exec, NULL)

View file

@ -68,7 +68,7 @@ static int le_result, le_conn, le_pconn;
/* {{{ odbc_functions[] /* {{{ odbc_functions[]
*/ */
zend_function_entry odbc_functions[] = { const zend_function_entry odbc_functions[] = {
PHP_FE(odbc_autocommit, NULL) PHP_FE(odbc_autocommit, NULL)
PHP_FE(odbc_binmode, NULL) PHP_FE(odbc_binmode, NULL)
PHP_FE(odbc_close, NULL) PHP_FE(odbc_close, NULL)

View file

@ -101,7 +101,7 @@ PHP_FUNCTION(openssl_dh_compute_key);
/* {{{ openssl_functions[] /* {{{ openssl_functions[]
*/ */
zend_function_entry openssl_functions[] = { const zend_function_entry openssl_functions[] = {
/* public/private key functions */ /* public/private key functions */
PHP_FE(openssl_pkey_free, NULL) PHP_FE(openssl_pkey_free, NULL)
PHP_FE(openssl_pkey_new, NULL) PHP_FE(openssl_pkey_new, NULL)

View file

@ -44,7 +44,7 @@
ZEND_DECLARE_MODULE_GLOBALS(pcntl) ZEND_DECLARE_MODULE_GLOBALS(pcntl)
static PHP_GINIT_FUNCTION(pcntl); static PHP_GINIT_FUNCTION(pcntl);
zend_function_entry pcntl_functions[] = { const zend_function_entry pcntl_functions[] = {
PHP_FE(pcntl_fork, NULL) PHP_FE(pcntl_fork, NULL)
PHP_FE(pcntl_waitpid, second_arg_force_ref) PHP_FE(pcntl_waitpid, second_arg_force_ref)
PHP_FE(pcntl_wait, first_arg_force_ref) PHP_FE(pcntl_wait, first_arg_force_ref)

View file

@ -2006,7 +2006,7 @@ PHP_FUNCTION(preg_last_error)
/* {{{ module definition structures */ /* {{{ module definition structures */
zend_function_entry pcre_functions[] = { const zend_function_entry pcre_functions[] = {
PHP_FE(preg_match, third_arg_force_ref) PHP_FE(preg_match, third_arg_force_ref)
PHP_FE(preg_match_all, third_arg_force_ref) PHP_FE(preg_match_all, third_arg_force_ref)
PHP_FE(preg_replace, fifth_arg_force_ref) PHP_FE(preg_replace, fifth_arg_force_ref)

View file

@ -114,7 +114,7 @@ PHP_FUNCTION(pdo_drivers)
/* }}} */ /* }}} */
/* {{{ pdo_functions[] */ /* {{{ pdo_functions[] */
zend_function_entry pdo_functions[] = { const zend_function_entry pdo_functions[] = {
PHP_FE(pdo_drivers, NULL) PHP_FE(pdo_drivers, NULL)
{NULL, NULL, NULL} {NULL, NULL, NULL}
}; };
@ -122,7 +122,7 @@ zend_function_entry pdo_functions[] = {
/* {{{ pdo_functions[] */ /* {{{ pdo_functions[] */
#if ZEND_MODULE_API_NO >= 20050922 #if ZEND_MODULE_API_NO >= 20050922
static zend_module_dep pdo_deps[] = { static const zend_module_dep pdo_deps[] = {
#ifdef HAVE_SPL #ifdef HAVE_SPL
ZEND_MOD_REQUIRED("spl") ZEND_MOD_REQUIRED("spl")
#endif #endif

View file

@ -1137,7 +1137,7 @@ static PHP_METHOD(PDO, getAvailableDrivers)
} }
/* }}} */ /* }}} */
zend_function_entry pdo_dbh_functions[] = { const zend_function_entry pdo_dbh_functions[] = {
ZEND_MALIAS(PDO, __construct, dbh_constructor, NULL, ZEND_ACC_PUBLIC) ZEND_MALIAS(PDO, __construct, dbh_constructor, NULL, ZEND_ACC_PUBLIC)
PHP_ME(PDO, prepare, NULL, ZEND_ACC_PUBLIC) PHP_ME(PDO, prepare, NULL, ZEND_ACC_PUBLIC)
PHP_ME(PDO, beginTransaction, NULL, ZEND_ACC_PUBLIC) PHP_ME(PDO, beginTransaction, NULL, ZEND_ACC_PUBLIC)
@ -1160,7 +1160,7 @@ zend_function_entry pdo_dbh_functions[] = {
/* {{{ overloaded object handlers for PDO class */ /* {{{ overloaded object handlers for PDO class */
int pdo_hash_methods(pdo_dbh_t *dbh, int kind TSRMLS_DC) int pdo_hash_methods(pdo_dbh_t *dbh, int kind TSRMLS_DC)
{ {
zend_function_entry *funcs; const zend_function_entry *funcs;
zend_function func; zend_function func;
zend_internal_function *ifunc = (zend_internal_function*)&func; zend_internal_function *ifunc = (zend_internal_function*)&func;
int namelen; int namelen;
@ -1183,11 +1183,11 @@ int pdo_hash_methods(pdo_dbh_t *dbh, int kind TSRMLS_DC)
while (funcs->fname) { while (funcs->fname) {
ifunc->type = ZEND_INTERNAL_FUNCTION; ifunc->type = ZEND_INTERNAL_FUNCTION;
ifunc->handler = funcs->handler; ifunc->handler = funcs->handler;
pdo_zstr_sval(ifunc->function_name) = funcs->fname; pdo_zstr_sval(ifunc->function_name) = (char*)funcs->fname;
ifunc->scope = dbh->ce; ifunc->scope = dbh->ce;
ifunc->prototype = NULL; ifunc->prototype = NULL;
if (funcs->arg_info) { if (funcs->arg_info) {
ifunc->arg_info = funcs->arg_info + 1; ifunc->arg_info = (zend_arg_info*)funcs->arg_info + 1;
ifunc->num_args = funcs->num_args; ifunc->num_args = funcs->num_args;
if (funcs->arg_info[0].required_num_args == -1) { if (funcs->arg_info[0].required_num_args == -1) {
ifunc->required_num_args = funcs->num_args; ifunc->required_num_args = funcs->num_args;

View file

@ -2126,7 +2126,7 @@ static PHP_METHOD(PDOStatement, __sleep)
} }
/* }}} */ /* }}} */
zend_function_entry pdo_dbstmt_functions[] = { const zend_function_entry pdo_dbstmt_functions[] = {
PHP_ME(PDOStatement, execute, NULL, ZEND_ACC_PUBLIC) PHP_ME(PDOStatement, execute, NULL, ZEND_ACC_PUBLIC)
PHP_ME(PDOStatement, fetch, NULL, ZEND_ACC_PUBLIC) PHP_ME(PDOStatement, fetch, NULL, ZEND_ACC_PUBLIC)
PHP_ME(PDOStatement, bindParam, second_arg_force_ref, ZEND_ACC_PUBLIC) PHP_ME(PDOStatement, bindParam, second_arg_force_ref, ZEND_ACC_PUBLIC)
@ -2504,7 +2504,7 @@ zend_object_iterator *pdo_stmt_iter_get(zend_class_entry *ce, zval *object, int
/* {{{ overloaded handlers for PDORow class (used by PDO_FETCH_LAZY) */ /* {{{ overloaded handlers for PDORow class (used by PDO_FETCH_LAZY) */
zend_function_entry pdo_row_functions[] = { const zend_function_entry pdo_row_functions[] = {
{NULL, NULL, NULL} {NULL, NULL, NULL}
}; };

View file

@ -289,7 +289,7 @@ enum {
PDO_DBH_DRIVER_METHOD_KIND__MAX PDO_DBH_DRIVER_METHOD_KIND__MAX
}; };
typedef zend_function_entry *(*pdo_dbh_get_driver_methods_func)(pdo_dbh_t *dbh, int kind TSRMLS_DC); typedef const zend_function_entry *(*pdo_dbh_get_driver_methods_func)(pdo_dbh_t *dbh, int kind TSRMLS_DC);
struct pdo_dbh_methods { struct pdo_dbh_methods {
pdo_dbh_close_func closer; pdo_dbh_close_func closer;

View file

@ -32,12 +32,12 @@ void pdo_dbh_init(TSRMLS_D);
void pdo_stmt_init(TSRMLS_D); void pdo_stmt_init(TSRMLS_D);
extern zend_object_value pdo_dbh_new(zend_class_entry *ce TSRMLS_DC); extern zend_object_value pdo_dbh_new(zend_class_entry *ce TSRMLS_DC);
extern zend_function_entry pdo_dbh_functions[]; extern const zend_function_entry pdo_dbh_functions[];
extern zend_class_entry *pdo_dbh_ce; extern zend_class_entry *pdo_dbh_ce;
extern ZEND_RSRC_DTOR_FUNC(php_pdo_pdbh_dtor); extern ZEND_RSRC_DTOR_FUNC(php_pdo_pdbh_dtor);
extern zend_object_value pdo_dbstmt_new(zend_class_entry *ce TSRMLS_DC); extern zend_object_value pdo_dbstmt_new(zend_class_entry *ce TSRMLS_DC);
extern zend_function_entry pdo_dbstmt_functions[]; extern const zend_function_entry pdo_dbstmt_functions[];
extern zend_class_entry *pdo_dbstmt_ce; extern zend_class_entry *pdo_dbstmt_ce;
void pdo_dbstmt_free_storage(pdo_stmt_t *stmt TSRMLS_DC); void pdo_dbstmt_free_storage(pdo_stmt_t *stmt TSRMLS_DC);
zend_object_iterator *pdo_stmt_iter_get(zend_class_entry *ce, zval *object, int by_ref TSRMLS_DC); zend_object_iterator *pdo_stmt_iter_get(zend_class_entry *ce, zval *object, int by_ref TSRMLS_DC);
@ -46,7 +46,7 @@ int pdo_stmt_describe_columns(pdo_stmt_t *stmt TSRMLS_DC);
int pdo_stmt_setup_fetch_mode(INTERNAL_FUNCTION_PARAMETERS, pdo_stmt_t *stmt, int skip_first_arg); int pdo_stmt_setup_fetch_mode(INTERNAL_FUNCTION_PARAMETERS, pdo_stmt_t *stmt, int skip_first_arg);
extern zend_object_value pdo_row_new(zend_class_entry *ce TSRMLS_DC); extern zend_object_value pdo_row_new(zend_class_entry *ce TSRMLS_DC);
extern zend_function_entry pdo_row_functions[]; extern const zend_function_entry pdo_row_functions[];
extern zend_class_entry *pdo_row_ce; extern zend_class_entry *pdo_row_ce;
void pdo_row_free_storage(pdo_stmt_t *stmt TSRMLS_DC); void pdo_row_free_storage(pdo_stmt_t *stmt TSRMLS_DC);
extern zend_object_handlers pdo_row_object_handlers; extern zend_object_handlers pdo_row_object_handlers;

View file

@ -35,12 +35,12 @@
ZEND_DECLARE_MODULE_GLOBALS(dblib) ZEND_DECLARE_MODULE_GLOBALS(dblib)
static PHP_GINIT_FUNCTION(dblib); static PHP_GINIT_FUNCTION(dblib);
zend_function_entry pdo_dblib_functions[] = { const zend_function_entry pdo_dblib_functions[] = {
{NULL, NULL, NULL} {NULL, NULL, NULL}
}; };
#if ZEND_MODULE_API_NO >= 20050922 #if ZEND_MODULE_API_NO >= 20050922
static zend_module_dep pdo_dblib_deps[] = { static const zend_module_dep pdo_dblib_deps[] = {
ZEND_MOD_REQUIRED("pdo") ZEND_MOD_REQUIRED("pdo")
{NULL, NULL, NULL} {NULL, NULL, NULL}
}; };

View file

@ -30,7 +30,7 @@
#include "php_pdo_firebird.h" #include "php_pdo_firebird.h"
#include "php_pdo_firebird_int.h" #include "php_pdo_firebird_int.h"
zend_function_entry pdo_firebird_functions[] = { /* {{{ */ const zend_function_entry pdo_firebird_functions[] = { /* {{{ */
{NULL, NULL, NULL} {NULL, NULL, NULL}
}; };
/* }}} */ /* }}} */

View file

@ -31,14 +31,14 @@
#include "php_pdo_mysql_int.h" #include "php_pdo_mysql_int.h"
/* {{{ pdo_mysql_functions[] */ /* {{{ pdo_mysql_functions[] */
zend_function_entry pdo_mysql_functions[] = { const zend_function_entry pdo_mysql_functions[] = {
{NULL, NULL, NULL} {NULL, NULL, NULL}
}; };
/* }}} */ /* }}} */
/* {{{ pdo_mysql_functions[] */ /* {{{ pdo_mysql_functions[] */
#if ZEND_MODULE_API_NO >= 20050922 #if ZEND_MODULE_API_NO >= 20050922
static zend_module_dep pdo_mysql_deps[] = { static const zend_module_dep pdo_mysql_deps[] = {
ZEND_MOD_REQUIRED("pdo") ZEND_MOD_REQUIRED("pdo")
{NULL, NULL, NULL} {NULL, NULL, NULL}
}; };

View file

@ -31,7 +31,7 @@
#include "php_pdo_oci_int.h" #include "php_pdo_oci_int.h"
/* {{{ pdo_oci_functions[] */ /* {{{ pdo_oci_functions[] */
zend_function_entry pdo_oci_functions[] = { const zend_function_entry pdo_oci_functions[] = {
{NULL, NULL, NULL} {NULL, NULL, NULL}
}; };
/* }}} */ /* }}} */
@ -39,7 +39,7 @@ zend_function_entry pdo_oci_functions[] = {
/* {{{ pdo_oci_module_entry */ /* {{{ pdo_oci_module_entry */
#if ZEND_MODULE_API_NO >= 20050922 #if ZEND_MODULE_API_NO >= 20050922
static zend_module_dep pdo_oci_deps[] = { static const zend_module_dep pdo_oci_deps[] = {
ZEND_MOD_REQUIRED("pdo") ZEND_MOD_REQUIRED("pdo")
{NULL, NULL, NULL} {NULL, NULL, NULL}
}; };

View file

@ -31,14 +31,14 @@
#include "php_pdo_odbc_int.h" #include "php_pdo_odbc_int.h"
/* {{{ pdo_odbc_functions[] */ /* {{{ pdo_odbc_functions[] */
function_entry pdo_odbc_functions[] = { const function_entry pdo_odbc_functions[] = {
{NULL, NULL, NULL} {NULL, NULL, NULL}
}; };
/* }}} */ /* }}} */
/* {{{ pdo_odbc_deps[] */ /* {{{ pdo_odbc_deps[] */
#if ZEND_MODULE_API_NO >= 20050922 #if ZEND_MODULE_API_NO >= 20050922
static zend_module_dep pdo_odbc_deps[] = { static const zend_module_dep pdo_odbc_deps[] = {
ZEND_MOD_REQUIRED("pdo") ZEND_MOD_REQUIRED("pdo")
{NULL, NULL, NULL} {NULL, NULL, NULL}
}; };

Some files were not shown because too many files have changed in this diff Show more