- Constness (Added const qualifier to several function parameters)

This commit is contained in:
Felipe Pena 2008-08-12 17:15:59 +00:00
parent d1789653a2
commit a5f867f3d5
30 changed files with 416 additions and 416 deletions

View File

@ -71,7 +71,7 @@ ZEND_API char *(*zend_resolve_path)(const char *filename, int filename_len TSRML
void (*zend_on_timeout)(int seconds TSRMLS_DC); void (*zend_on_timeout)(int seconds TSRMLS_DC);
static void (*zend_message_dispatcher_p)(long message, void *data); static void (*zend_message_dispatcher_p)(long message, void *data);
static int (*zend_get_configuration_directive_p)(char *name, uint name_length, zval *contents); static int (*zend_get_configuration_directive_p)(const char *name, uint name_length, zval *contents);
static ZEND_INI_MH(OnUpdateErrorReporting) /* {{{ */ static ZEND_INI_MH(OnUpdateErrorReporting) /* {{{ */
{ {
@ -1286,7 +1286,7 @@ void zend_set_utility_values(zend_utility_values *utility_values) /* {{{ */
/* }}} */ /* }}} */
/* this should be compatible with the standard zenderror */ /* this should be compatible with the standard zenderror */
void zenderror(char *error) /* {{{ */ void zenderror(const char *error) /* {{{ */
{ {
zend_error(E_PARSE, "%s", error); zend_error(E_PARSE, "%s", error);
} }
@ -1309,7 +1309,7 @@ ZEND_API void _zend_bailout(char *filename, uint lineno) /* {{{ */
/* }}} */ /* }}} */
END_EXTERN_C() END_EXTERN_C()
void zend_append_version_info(zend_extension *extension) /* {{{ */ void zend_append_version_info(const zend_extension *extension) /* {{{ */
{ {
char *new_info; char *new_info;
uint new_info_length; uint new_info_length;
@ -1477,7 +1477,7 @@ ZEND_API void zend_message_dispatcher(long message, void *data) /* {{{ */
/* }}} */ /* }}} */
END_EXTERN_C() END_EXTERN_C()
ZEND_API int zend_get_configuration_directive(char *name, uint name_length, zval *contents) /* {{{ */ ZEND_API int zend_get_configuration_directive(const char *name, uint name_length, zval *contents) /* {{{ */
{ {
if (zend_get_configuration_directive_p) { if (zend_get_configuration_directive_p) {
return zend_get_configuration_directive_p(name, name_length, contents); return zend_get_configuration_directive_p(name, name_length, contents);
@ -1674,7 +1674,7 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */
void zend_error_noreturn(int type, const char *format, ...) __attribute__ ((alias("zend_error"),noreturn)); void zend_error_noreturn(int type, const char *format, ...) __attribute__ ((alias("zend_error"),noreturn));
#endif #endif
ZEND_API void zend_output_debug_string(zend_bool trigger_break, char *format, ...) /* {{{ */ ZEND_API void zend_output_debug_string(zend_bool trigger_break, const char *format, ...) /* {{{ */
{ {
#if ZEND_DEBUG #if ZEND_DEBUG
va_list args; va_list args;
@ -1772,7 +1772,7 @@ ZEND_API int zend_execute_scripts(int type TSRMLS_DC, zval **retval, int file_co
#define COMPILED_STRING_DESCRIPTION_FORMAT "%s(%d) : %s" #define COMPILED_STRING_DESCRIPTION_FORMAT "%s(%d) : %s"
ZEND_API char *zend_make_compiled_string_description(char *name TSRMLS_DC) /* {{{ */ ZEND_API char *zend_make_compiled_string_description(const char *name TSRMLS_DC) /* {{{ */
{ {
char *cur_filename; char *cur_filename;
int cur_lineno; int cur_lineno;

View File

@ -513,7 +513,7 @@ typedef struct _zend_utility_functions {
void (*message_handler)(long message, void *data); void (*message_handler)(long message, void *data);
void (*block_interruptions)(void); void (*block_interruptions)(void);
void (*unblock_interruptions)(void); void (*unblock_interruptions)(void);
int (*get_configuration_directive)(char *name, uint name_length, zval *contents); int (*get_configuration_directive)(const char *name, uint name_length, zval *contents);
void (*ticks_function)(int ticks); void (*ticks_function)(int ticks);
void (*on_timeout)(int seconds TSRMLS_DC); void (*on_timeout)(int seconds TSRMLS_DC);
int (*stream_open_function)(const char *filename, zend_file_handle *handle TSRMLS_DC); int (*stream_open_function)(const char *filename, zend_file_handle *handle TSRMLS_DC);
@ -620,7 +620,7 @@ ZEND_API int zend_print_zval_ex(zend_write_func_t write_func, zval *expr, int in
ZEND_API void zend_print_zval_r(zval *expr, int indent TSRMLS_DC); ZEND_API void zend_print_zval_r(zval *expr, int indent TSRMLS_DC);
ZEND_API void zend_print_flat_zval_r(zval *expr TSRMLS_DC); ZEND_API void zend_print_flat_zval_r(zval *expr TSRMLS_DC);
ZEND_API void zend_print_zval_r_ex(zend_write_func_t write_func, zval *expr, int indent TSRMLS_DC); ZEND_API void zend_print_zval_r_ex(zend_write_func_t write_func, zval *expr, int indent TSRMLS_DC);
ZEND_API void zend_output_debug_string(zend_bool trigger_break, char *format, ...); ZEND_API void zend_output_debug_string(zend_bool trigger_break, const char *format, ...);
END_EXTERN_C() END_EXTERN_C()
void zend_activate(TSRMLS_D); void zend_activate(TSRMLS_D);
@ -673,7 +673,7 @@ extern ZEND_API char *(*zend_resolve_path)(const char *filename, int filename_le
ZEND_API void zend_error(int type, const char *format, ...); ZEND_API void zend_error(int type, const char *format, ...);
void zenderror(char *error); void zenderror(const char *error);
/* The following #define is used for code duality in PHP for Engine 1 & 2 */ /* The following #define is used for code duality in PHP for Engine 1 & 2 */
#define ZEND_STANDARD_CLASS_DEF_PTR zend_standard_class_def #define ZEND_STANDARD_CLASS_DEF_PTR zend_standard_class_def
@ -691,7 +691,7 @@ END_EXTERN_C()
BEGIN_EXTERN_C() BEGIN_EXTERN_C()
ZEND_API void zend_message_dispatcher(long message, void *data); ZEND_API void zend_message_dispatcher(long message, void *data);
ZEND_API int zend_get_configuration_directive(char *name, uint name_length, zval *contents); ZEND_API int zend_get_configuration_directive(const char *name, uint name_length, zval *contents);
ZEND_API void zend_reset_locale_deps(TSRMLS_D); ZEND_API void zend_reset_locale_deps(TSRMLS_D);
END_EXTERN_C() END_EXTERN_C()

View File

@ -229,13 +229,13 @@ ZEND_API char *zend_get_type_by_const(int type) /* {{{ */
} }
/* }}} */ /* }}} */
ZEND_API char *zend_zval_type_name(zval *arg) /* {{{ */ ZEND_API char *zend_zval_type_name(const zval *arg) /* {{{ */
{ {
return zend_get_type_by_const(Z_TYPE_P(arg)); return zend_get_type_by_const(Z_TYPE_P(arg));
} }
/* }}} */ /* }}} */
ZEND_API zend_class_entry *zend_get_class_entry(zval *zobject TSRMLS_DC) /* {{{ */ ZEND_API zend_class_entry *zend_get_class_entry(const zval *zobject TSRMLS_DC) /* {{{ */
{ {
if (Z_OBJ_HT_P(zobject)->get_class_entry) { if (Z_OBJ_HT_P(zobject)->get_class_entry) {
return Z_OBJ_HT_P(zobject)->get_class_entry(zobject TSRMLS_CC); return Z_OBJ_HT_P(zobject)->get_class_entry(zobject TSRMLS_CC);
@ -247,7 +247,7 @@ ZEND_API zend_class_entry *zend_get_class_entry(zval *zobject TSRMLS_DC) /* {{{
/* }}} */ /* }}} */
/* returns 1 if you need to copy result, 0 if it's already a copy */ /* returns 1 if you need to copy result, 0 if it's already a copy */
ZEND_API int zend_get_object_classname(zval *object, zstr *class_name, zend_uint *class_name_len TSRMLS_DC) /* {{{ */ ZEND_API int zend_get_object_classname(const zval *object, zstr *class_name, zend_uint *class_name_len TSRMLS_DC) /* {{{ */
{ {
if (Z_OBJ_HT_P(object)->get_class_name == NULL || if (Z_OBJ_HT_P(object)->get_class_name == NULL ||
Z_OBJ_HT_P(object)->get_class_name(object, class_name, class_name_len, 0 TSRMLS_CC) != SUCCESS) { Z_OBJ_HT_P(object)->get_class_name(object, class_name, class_name_len, 0 TSRMLS_CC) != SUCCESS) {
@ -315,7 +315,7 @@ static int parse_arg_object_to_string(zval **arg, char **p, int *pl, int type TS
} }
/* }}} */ /* }}} */
static char *zend_parse_arg_impl(int arg_num, zval **arg, va_list *va, char **spec, char T_arg_type, int* ret_type, char **error, int *severity TSRMLS_DC) /* {{{ */ static char *zend_parse_arg_impl(int arg_num, zval **arg, const va_list *va, char **spec, char T_arg_type, int* ret_type, char **error, int *severity TSRMLS_DC) /* {{{ */
{ {
char *spec_walk = *spec; char *spec_walk = *spec;
char c = *spec_walk++; char c = *spec_walk++;
@ -853,7 +853,7 @@ static char *zend_parse_arg_impl(int arg_num, zval **arg, va_list *va, char **sp
} }
/* }}} */ /* }}} */
static int zend_parse_arg(int arg_num, zval **arg, va_list *va, char **spec, int quiet, char T_arg_type TSRMLS_DC) /* {{{ */ static int zend_parse_arg(int arg_num, zval **arg, const va_list *va, char **spec, int quiet, char T_arg_type TSRMLS_DC) /* {{{ */
{ {
char *expected_type = NULL, *error = NULL; char *expected_type = NULL, *error = NULL;
int ret_type = IS_STRING; int ret_type = IS_STRING;
@ -884,7 +884,7 @@ static int zend_parse_arg(int arg_num, zval **arg, va_list *va, char **spec, int
} }
/* }}} */ /* }}} */
static int zend_parse_va_args(int num_args, char *type_spec, va_list *va, int flags TSRMLS_DC) /* {{{ */ static int zend_parse_va_args(int num_args, char *type_spec, const va_list *va, int flags TSRMLS_DC) /* {{{ */
{ {
char *spec_walk; char *spec_walk;
int c, i; int c, i;
@ -1208,7 +1208,7 @@ ZEND_API int _array_init(zval *arg, uint size ZEND_FILE_LINE_DC) /* {{{ */
} }
/* }}} */ /* }}} */
static int zend_merge_property(zval **value TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */ static int zend_merge_property(zval **value TSRMLS_DC, int num_args, va_list args, const zend_hash_key *hash_key) /* {{{ */
{ {
/* which name should a numeric property have ? */ /* which name should a numeric property have ? */
if (hash_key->nKeyLength) { if (hash_key->nKeyLength) {
@ -1500,7 +1500,7 @@ ZEND_API int add_get_index_unicodel(zval *arg, ulong index, UChar *str, uint len
} }
/* }}} */ /* }}} */
ZEND_API int add_property_long_ex(zval *arg, char *key, uint key_len, long n TSRMLS_DC) /* {{{ */ ZEND_API int add_property_long_ex(zval *arg, const char *key, uint key_len, long n TSRMLS_DC) /* {{{ */
{ {
zval *tmp; zval *tmp;
zval *z_key; zval *z_key;
@ -1518,7 +1518,7 @@ ZEND_API int add_property_long_ex(zval *arg, char *key, uint key_len, long n TSR
} }
/* }}} */ /* }}} */
ZEND_API int add_property_bool_ex(zval *arg, char *key, uint key_len, int b TSRMLS_DC) /* {{{ */ ZEND_API int add_property_bool_ex(zval *arg, const char *key, uint key_len, int b TSRMLS_DC) /* {{{ */
{ {
zval *tmp; zval *tmp;
zval *z_key; zval *z_key;
@ -1536,7 +1536,7 @@ ZEND_API int add_property_bool_ex(zval *arg, char *key, uint key_len, int b TSRM
} }
/* }}} */ /* }}} */
ZEND_API int add_property_null_ex(zval *arg, char *key, uint key_len TSRMLS_DC) /* {{{ */ ZEND_API int add_property_null_ex(zval *arg, const char *key, uint key_len TSRMLS_DC) /* {{{ */
{ {
zval *tmp; zval *tmp;
zval *z_key; zval *z_key;
@ -1554,7 +1554,7 @@ ZEND_API int add_property_null_ex(zval *arg, char *key, uint key_len TSRMLS_DC)
} }
/* }}} */ /* }}} */
ZEND_API int add_property_resource_ex(zval *arg, char *key, uint key_len, long n TSRMLS_DC) /* {{{ */ ZEND_API int add_property_resource_ex(zval *arg, const char *key, uint key_len, long n TSRMLS_DC) /* {{{ */
{ {
zval *tmp; zval *tmp;
zval *z_key; zval *z_key;
@ -1572,7 +1572,7 @@ ZEND_API int add_property_resource_ex(zval *arg, char *key, uint key_len, long n
} }
/* }}} */ /* }}} */
ZEND_API int add_property_double_ex(zval *arg, char *key, uint key_len, double d TSRMLS_DC) /* {{{ */ ZEND_API int add_property_double_ex(zval *arg, const char *key, uint key_len, double d TSRMLS_DC) /* {{{ */
{ {
zval *tmp; zval *tmp;
zval *z_key; zval *z_key;
@ -1590,7 +1590,7 @@ ZEND_API int add_property_double_ex(zval *arg, char *key, uint key_len, double d
} }
/* }}} */ /* }}} */
ZEND_API int add_property_string_ex(zval *arg, char *key, uint key_len, char *str, int duplicate TSRMLS_DC) /* {{{ */ ZEND_API int add_property_string_ex(zval *arg, const char *key, uint key_len, char *str, int duplicate TSRMLS_DC) /* {{{ */
{ {
zval *tmp; zval *tmp;
zval *z_key; zval *z_key;
@ -1608,7 +1608,7 @@ ZEND_API int add_property_string_ex(zval *arg, char *key, uint key_len, char *st
} }
/* }}} */ /* }}} */
ZEND_API int add_property_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, int duplicate TSRMLS_DC) /* {{{ */ ZEND_API int add_property_stringl_ex(zval *arg, const char *key, uint key_len, char *str, uint length, int duplicate TSRMLS_DC) /* {{{ */
{ {
zval *tmp; zval *tmp;
zval *z_key; zval *z_key;
@ -1626,7 +1626,7 @@ ZEND_API int add_property_stringl_ex(zval *arg, char *key, uint key_len, char *s
} }
/* }}} */ /* }}} */
ZEND_API int add_property_ascii_string_ex(zval *arg, char *key, uint key_len, char *str, int duplicate TSRMLS_DC) /* {{{ */ ZEND_API int add_property_ascii_string_ex(zval *arg, const char *key, uint key_len, char *str, int duplicate TSRMLS_DC) /* {{{ */
{ {
zval *tmp; zval *tmp;
zval *z_key; zval *z_key;
@ -1644,7 +1644,7 @@ ZEND_API int add_property_ascii_string_ex(zval *arg, char *key, uint key_len, ch
} }
/* }}} */ /* }}} */
ZEND_API int add_property_ascii_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, int duplicate TSRMLS_DC) /* {{{ */ ZEND_API int add_property_ascii_stringl_ex(zval *arg, const char *key, uint key_len, char *str, uint length, int duplicate TSRMLS_DC) /* {{{ */
{ {
zval *tmp; zval *tmp;
zval *z_key; zval *z_key;
@ -1662,7 +1662,7 @@ ZEND_API int add_property_ascii_stringl_ex(zval *arg, char *key, uint key_len, c
} }
/* }}} */ /* }}} */
ZEND_API int add_property_rt_string_ex(zval *arg, char *key, uint key_len, char *str, int duplicate TSRMLS_DC) /* {{{ */ ZEND_API int add_property_rt_string_ex(zval *arg, const char *key, uint key_len, char *str, int duplicate TSRMLS_DC) /* {{{ */
{ {
zval *tmp; zval *tmp;
zval *z_key; zval *z_key;
@ -1680,7 +1680,7 @@ ZEND_API int add_property_rt_string_ex(zval *arg, char *key, uint key_len, char
} }
/* }}} */ /* }}} */
ZEND_API int add_property_rt_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, int duplicate TSRMLS_DC) /* {{{ */ ZEND_API int add_property_rt_stringl_ex(zval *arg, const char *key, uint key_len, char *str, uint length, int duplicate TSRMLS_DC) /* {{{ */
{ {
zval *tmp; zval *tmp;
zval *z_key; zval *z_key;
@ -1698,7 +1698,7 @@ ZEND_API int add_property_rt_stringl_ex(zval *arg, char *key, uint key_len, char
} }
/* }}} */ /* }}} */
ZEND_API int add_property_utf8_string_ex(zval *arg, char *key, uint key_len, char *str, int duplicate TSRMLS_DC) /* {{{ */ ZEND_API int add_property_utf8_string_ex(zval *arg, const char *key, uint key_len, char *str, int duplicate TSRMLS_DC) /* {{{ */
{ {
zval *tmp; zval *tmp;
zval *z_key; zval *z_key;
@ -1716,7 +1716,7 @@ ZEND_API int add_property_utf8_string_ex(zval *arg, char *key, uint key_len, cha
} }
/* }}} */ /* }}} */
ZEND_API int add_property_utf8_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, int duplicate TSRMLS_DC) /* {{{ */ ZEND_API int add_property_utf8_stringl_ex(zval *arg, const char *key, uint key_len, char *str, uint length, int duplicate TSRMLS_DC) /* {{{ */
{ {
zval *tmp; zval *tmp;
zval *z_key; zval *z_key;
@ -1734,7 +1734,7 @@ ZEND_API int add_property_utf8_stringl_ex(zval *arg, char *key, uint key_len, ch
} }
/* }}} */ /* }}} */
ZEND_API int add_property_unicode_ex(zval *arg, char *key, uint key_len, UChar *str, int duplicate TSRMLS_DC) /* {{{ */ ZEND_API int add_property_unicode_ex(zval *arg, const char *key, uint key_len, UChar *str, int duplicate TSRMLS_DC) /* {{{ */
{ {
zval *tmp; zval *tmp;
zval *z_key; zval *z_key;
@ -1752,7 +1752,7 @@ ZEND_API int add_property_unicode_ex(zval *arg, char *key, uint key_len, UChar *
} }
/* }}} */ /* }}} */
ZEND_API int add_property_unicodel_ex(zval *arg, char *key, uint key_len, UChar *str, uint length, int duplicate TSRMLS_DC) /* {{{ */ ZEND_API int add_property_unicodel_ex(zval *arg, const char *key, uint key_len, UChar *str, uint length, int duplicate TSRMLS_DC) /* {{{ */
{ {
zval *tmp; zval *tmp;
zval *z_key; zval *z_key;
@ -1770,7 +1770,7 @@ ZEND_API int add_property_unicodel_ex(zval *arg, char *key, uint key_len, UChar
} }
/* }}} */ /* }}} */
ZEND_API int add_property_zval_ex(zval *arg, char *key, uint key_len, zval *value TSRMLS_DC) /* {{{ */ ZEND_API int add_property_zval_ex(zval *arg, const char *key, uint key_len, zval *value TSRMLS_DC) /* {{{ */
{ {
zval *z_key; zval *z_key;
@ -2009,7 +2009,7 @@ ZEND_API zend_module_entry* zend_register_internal_module(zend_module_entry *mod
} }
/* }}} */ /* }}} */
ZEND_API void zend_check_magic_method_implementation(zend_class_entry *ce, zend_function *fptr, int error_type TSRMLS_DC) /* {{{ */ ZEND_API void zend_check_magic_method_implementation(const zend_class_entry *ce, const zend_function *fptr, int error_type TSRMLS_DC) /* {{{ */
{ {
unsigned int lcname_len; unsigned int lcname_len;
zstr lcname; zstr lcname;
@ -2411,7 +2411,7 @@ ZEND_API int zend_startup_module(zend_module_entry *module) /* {{{ */
} }
/* }}} */ /* }}} */
ZEND_API int zend_get_module_started(char *module_name) /* {{{ */ ZEND_API int zend_get_module_started(const char *module_name) /* {{{ */
{ {
zend_module_entry *module; zend_module_entry *module;
@ -2490,7 +2490,7 @@ int module_registry_cleanup(zend_module_entry *module TSRMLS_DC) /* {{{ */
} }
/* }}} */ /* }}} */
int module_registry_unload_temp(zend_module_entry *module TSRMLS_DC) /* {{{ */ int module_registry_unload_temp(const zend_module_entry *module TSRMLS_DC) /* {{{ */
{ {
return (module->type == MODULE_TEMPORARY) ? ZEND_HASH_APPLY_REMOVE : ZEND_HASH_APPLY_STOP; return (module->type == MODULE_TEMPORARY) ? ZEND_HASH_APPLY_REMOVE : ZEND_HASH_APPLY_STOP;
} }
@ -2598,7 +2598,7 @@ ZEND_API int zend_u_register_class_alias_ex(zend_uchar utype, zstr name, int nam
} }
/* }}} */ /* }}} */
ZEND_API int zend_register_class_alias_ex(char *name, int name_len, zend_class_entry *ce TSRMLS_DC) /* {{{ */ ZEND_API int zend_register_class_alias_ex(const char *name, int name_len, zend_class_entry *ce TSRMLS_DC) /* {{{ */
{ {
char *lcname = zend_str_tolower_dup(name, name_len); char *lcname = zend_str_tolower_dup(name, name_len);
int ret; int ret;
@ -2612,7 +2612,7 @@ ZEND_API int zend_register_class_alias_ex(char *name, int name_len, zend_class_e
} }
/* }}} */ /* }}} */
ZEND_API int zend_set_hash_symbol(zval *symbol, char *name, int name_length, zend_bool is_ref, int num_symbol_tables, ...) /* {{{ */ ZEND_API int zend_set_hash_symbol(zval *symbol, const char *name, int name_length, zend_bool is_ref, int num_symbol_tables, ...) /* {{{ */
{ {
HashTable *symbol_table; HashTable *symbol_table;
va_list symbol_table_list; va_list symbol_table_list;
@ -2689,7 +2689,7 @@ ZEND_API int zend_disable_class(char *class_name, uint class_name_length TSRMLS_
} }
/* }}} */ /* }}} */
static int zend_is_callable_check_class(zend_uchar utype, zstr name, int name_len, zend_fcall_info_cache *fcc, char **error TSRMLS_DC) /* {{{ */ static int zend_is_callable_check_class(zend_uchar utype, const zstr name, int name_len, zend_fcall_info_cache *fcc, char **error TSRMLS_DC) /* {{{ */
{ {
int ret = 0; int ret = 0;
zend_class_entry **pce; zend_class_entry **pce;
@ -3567,7 +3567,7 @@ ZEND_API int zend_u_declare_property_ex(zend_class_entry *ce, zend_uchar type, z
} }
/* }}} */ /* }}} */
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, const char *name, int name_length, zval *property, int access_type, zstr doc_comment, int doc_comment_len TSRMLS_DC) /* {{{ */
{ {
if (UG(unicode)) { if (UG(unicode)) {
zstr uname; zstr uname;
@ -3715,13 +3715,13 @@ ZEND_API int zend_declare_property_stringl(zend_class_entry *ce, char *name, int
} }
/* }}} */ /* }}} */
ZEND_API int zend_declare_class_constant(zend_class_entry *ce, char *name, size_t name_length, zval *value TSRMLS_DC) /* {{{ */ ZEND_API int zend_declare_class_constant(zend_class_entry *ce, const char *name, size_t name_length, zval *value TSRMLS_DC) /* {{{ */
{ {
return zend_ascii_hash_update(&ce->constants_table, name, name_length+1, &value, sizeof(zval *), NULL); return zend_ascii_hash_update(&ce->constants_table, name, name_length+1, &value, sizeof(zval *), NULL);
} }
/* }}} */ /* }}} */
ZEND_API int zend_declare_class_constant_null(zend_class_entry *ce, char *name, size_t name_length TSRMLS_DC) /* {{{ */ ZEND_API int zend_declare_class_constant_null(zend_class_entry *ce, const char *name, size_t name_length TSRMLS_DC) /* {{{ */
{ {
zval *constant; zval *constant;
@ -3736,7 +3736,7 @@ ZEND_API int zend_declare_class_constant_null(zend_class_entry *ce, char *name,
} }
/* }}} */ /* }}} */
ZEND_API int zend_declare_class_constant_long(zend_class_entry *ce, char *name, size_t name_length, long value TSRMLS_DC) /* {{{ */ ZEND_API int zend_declare_class_constant_long(zend_class_entry *ce, const char *name, size_t name_length, long value TSRMLS_DC) /* {{{ */
{ {
zval *constant; zval *constant;
@ -3751,7 +3751,7 @@ ZEND_API int zend_declare_class_constant_long(zend_class_entry *ce, char *name,
} }
/* }}} */ /* }}} */
ZEND_API int zend_declare_class_constant_bool(zend_class_entry *ce, char *name, size_t name_length, zend_bool value TSRMLS_DC) /* {{{ */ ZEND_API int zend_declare_class_constant_bool(zend_class_entry *ce, const char *name, size_t name_length, zend_bool value TSRMLS_DC) /* {{{ */
{ {
zval *constant; zval *constant;
@ -3766,7 +3766,7 @@ ZEND_API int zend_declare_class_constant_bool(zend_class_entry *ce, char *name,
} }
/* }}} */ /* }}} */
ZEND_API int zend_declare_class_constant_double(zend_class_entry *ce, char *name, size_t name_length, double value TSRMLS_DC) /* {{{ */ ZEND_API int zend_declare_class_constant_double(zend_class_entry *ce, const char *name, size_t name_length, double value TSRMLS_DC) /* {{{ */
{ {
zval *constant; zval *constant;
@ -3781,7 +3781,7 @@ ZEND_API int zend_declare_class_constant_double(zend_class_entry *ce, char *name
} }
/* }}} */ /* }}} */
ZEND_API int zend_declare_class_constant_stringl(zend_class_entry *ce, char *name, size_t name_length, char *value, size_t value_length TSRMLS_DC) /* {{{ */ ZEND_API int zend_declare_class_constant_stringl(zend_class_entry *ce, const char *name, size_t name_length, const char *value, size_t value_length TSRMLS_DC) /* {{{ */
{ {
zval *constant; zval *constant;
@ -3804,7 +3804,7 @@ ZEND_API int zend_declare_class_constant_stringl(zend_class_entry *ce, char *nam
} }
/* }}} */ /* }}} */
ZEND_API int zend_declare_class_constant_string(zend_class_entry *ce, char *name, size_t name_length, char *value TSRMLS_DC) /* {{{ */ ZEND_API int zend_declare_class_constant_string(zend_class_entry *ce, const char *name, size_t name_length, const char *value TSRMLS_DC) /* {{{ */
{ {
return zend_declare_class_constant_stringl(ce, name, name_length, value, strlen(value) TSRMLS_CC); return zend_declare_class_constant_stringl(ce, name, name_length, value, strlen(value) TSRMLS_CC);
} }
@ -3910,7 +3910,7 @@ ZEND_API void zend_update_property_double(zend_class_entry *scope, zval *object,
} }
/* }}} */ /* }}} */
ZEND_API void zend_update_property_string(zend_class_entry *scope, zval *object, char *name, int name_length, char *value TSRMLS_DC) /* {{{ */ ZEND_API void zend_update_property_string(zend_class_entry *scope, zval *object, char *name, int name_length, const char *value TSRMLS_DC) /* {{{ */
{ {
zval *tmp; zval *tmp;
@ -3922,7 +3922,7 @@ ZEND_API void zend_update_property_string(zend_class_entry *scope, zval *object,
} }
/* }}} */ /* }}} */
ZEND_API void zend_update_property_stringl(zend_class_entry *scope, zval *object, char *name, int name_length, char *value, int value_len TSRMLS_DC) /* {{{ */ ZEND_API void zend_update_property_stringl(zend_class_entry *scope, zval *object, char *name, int name_length, const char *value, int value_len TSRMLS_DC) /* {{{ */
{ {
zval *tmp; zval *tmp;
@ -3934,7 +3934,7 @@ ZEND_API void zend_update_property_stringl(zend_class_entry *scope, zval *object
} }
/* }}} */ /* }}} */
ZEND_API void zend_update_property_ascii_string(zend_class_entry *scope, zval *object, char *name, int name_length, char *value TSRMLS_DC) /* {{{ */ ZEND_API void zend_update_property_ascii_string(zend_class_entry *scope, zval *object, char *name, int name_length, const char *value TSRMLS_DC) /* {{{ */
{ {
zval *tmp; zval *tmp;
@ -3946,7 +3946,7 @@ ZEND_API void zend_update_property_ascii_string(zend_class_entry *scope, zval *o
} }
/* }}} */ /* }}} */
ZEND_API void zend_update_property_ascii_stringl(zend_class_entry *scope, zval *object, char *name, int name_length, char *value, int value_len TSRMLS_DC) /* {{{ */ ZEND_API void zend_update_property_ascii_stringl(zend_class_entry *scope, zval *object, char *name, int name_length, const char *value, int value_len TSRMLS_DC) /* {{{ */
{ {
zval *tmp; zval *tmp;
@ -3958,7 +3958,7 @@ ZEND_API void zend_update_property_ascii_stringl(zend_class_entry *scope, zval *
} }
/* }}} */ /* }}} */
ZEND_API void zend_update_property_rt_string(zend_class_entry *scope, zval *object, char *name, int name_length, char *value TSRMLS_DC) /* {{{ */ ZEND_API void zend_update_property_rt_string(zend_class_entry *scope, zval *object, char *name, int name_length, const char *value TSRMLS_DC) /* {{{ */
{ {
zval *tmp; zval *tmp;
@ -3970,7 +3970,7 @@ ZEND_API void zend_update_property_rt_string(zend_class_entry *scope, zval *obje
} }
/* }}} */ /* }}} */
ZEND_API void zend_update_property_rt_stringl(zend_class_entry *scope, zval *object, char *name, int name_length, char *value, int value_len TSRMLS_DC) /* {{{ */ ZEND_API void zend_update_property_rt_stringl(zend_class_entry *scope, zval *object, char *name, int name_length, const char *value, int value_len TSRMLS_DC) /* {{{ */
{ {
zval *tmp; zval *tmp;
@ -4089,7 +4089,7 @@ ZEND_API int zend_update_static_property_double(zend_class_entry *scope, char *n
} }
/* }}} */ /* }}} */
ZEND_API int zend_update_static_property_string(zend_class_entry *scope, char *name, int name_length, char *value TSRMLS_DC) /* {{{ */ ZEND_API int zend_update_static_property_string(zend_class_entry *scope, char *name, int name_length, const char *value TSRMLS_DC) /* {{{ */
{ {
zval *tmp; zval *tmp;
@ -4101,7 +4101,7 @@ ZEND_API int zend_update_static_property_string(zend_class_entry *scope, char *n
} }
/* }}} */ /* }}} */
ZEND_API int zend_update_static_property_stringl(zend_class_entry *scope, char *name, int name_length, char *value, int value_len TSRMLS_DC) /* {{{ */ ZEND_API int zend_update_static_property_stringl(zend_class_entry *scope, char *name, int name_length, const char *value, int value_len TSRMLS_DC) /* {{{ */
{ {
zval *tmp; zval *tmp;
@ -4113,7 +4113,7 @@ ZEND_API int zend_update_static_property_stringl(zend_class_entry *scope, char *
} }
/* }}} */ /* }}} */
ZEND_API int zend_update_static_property_ascii_string(zend_class_entry *scope, char *name, int name_length, char *value TSRMLS_DC) /* {{{ */ ZEND_API int zend_update_static_property_ascii_string(zend_class_entry *scope, char *name, int name_length, const char *value TSRMLS_DC) /* {{{ */
{ {
zval *tmp; zval *tmp;
@ -4125,7 +4125,7 @@ ZEND_API int zend_update_static_property_ascii_string(zend_class_entry *scope, c
} }
/* }}} */ /* }}} */
ZEND_API int zend_update_static_property_ascii_stringl(zend_class_entry *scope, char *name, int name_length, char *value, int value_len TSRMLS_DC) /* {{{ */ ZEND_API int zend_update_static_property_ascii_stringl(zend_class_entry *scope, char *name, int name_length, const char *value, int value_len TSRMLS_DC) /* {{{ */
{ {
zval *tmp; zval *tmp;
@ -4137,7 +4137,7 @@ ZEND_API int zend_update_static_property_ascii_stringl(zend_class_entry *scope,
} }
/* }}} */ /* }}} */
ZEND_API int zend_update_static_property_rt_string(zend_class_entry *scope, char *name, int name_length, char *value TSRMLS_DC) /* {{{ */ ZEND_API int zend_update_static_property_rt_string(zend_class_entry *scope, char *name, int name_length, const char *value TSRMLS_DC) /* {{{ */
{ {
zval *tmp; zval *tmp;
@ -4149,7 +4149,7 @@ ZEND_API int zend_update_static_property_rt_string(zend_class_entry *scope, char
} }
/* }}} */ /* }}} */
ZEND_API int zend_update_static_property_rt_stringl(zend_class_entry *scope, char *name, int name_length, char *value, int value_len TSRMLS_DC) /* {{{ */ ZEND_API int zend_update_static_property_rt_stringl(zend_class_entry *scope, char *name, int name_length, const char *value, int value_len TSRMLS_DC) /* {{{ */
{ {
zval *tmp; zval *tmp;

View File

@ -243,7 +243,7 @@ ZEND_API int zend_copy_parameters_array(int param_count, zval *argument_array TS
#define ZEND_PARSE_PARAMS_QUIET 1<<1 #define ZEND_PARSE_PARAMS_QUIET 1<<1
ZEND_API int zend_parse_parameters(int num_args TSRMLS_DC, char *type_spec, ...); ZEND_API int zend_parse_parameters(int num_args TSRMLS_DC, char *type_spec, ...);
ZEND_API int zend_parse_parameters_ex(int flags, int num_args TSRMLS_DC, char *type_spec, ...); ZEND_API int zend_parse_parameters_ex(int flags, int num_args TSRMLS_DC, char *type_spec, ...);
ZEND_API char *zend_zval_type_name(zval *arg); ZEND_API char *zend_zval_type_name(const zval *arg);
ZEND_API int zend_parse_method_parameters(int num_args TSRMLS_DC, zval *this_ptr, char *type_spec, ...); ZEND_API int zend_parse_method_parameters(int num_args TSRMLS_DC, zval *this_ptr, char *type_spec, ...);
ZEND_API int zend_parse_method_parameters_ex(int flags, int num_args TSRMLS_DC, zval *this_ptr, char *type_spec, ...); ZEND_API int zend_parse_method_parameters_ex(int flags, int num_args TSRMLS_DC, zval *this_ptr, char *type_spec, ...);
@ -257,14 +257,14 @@ ZEND_API zend_module_entry* zend_register_internal_module(zend_module_entry *mod
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);
ZEND_API int zend_startup_module_ex(zend_module_entry *module TSRMLS_DC); ZEND_API int zend_startup_module_ex(zend_module_entry *module TSRMLS_DC);
ZEND_API int zend_startup_modules(TSRMLS_D); ZEND_API int zend_startup_modules(TSRMLS_D);
ZEND_API void zend_check_magic_method_implementation(zend_class_entry *ce, zend_function *fptr, int error_type TSRMLS_DC); ZEND_API void zend_check_magic_method_implementation(const zend_class_entry *ce, const zend_function *fptr, int error_type TSRMLS_DC);
ZEND_API zend_class_entry *zend_register_internal_class(zend_class_entry *class_entry TSRMLS_DC); ZEND_API zend_class_entry *zend_register_internal_class(zend_class_entry *class_entry TSRMLS_DC);
ZEND_API zend_class_entry *zend_register_internal_class_ex(zend_class_entry *class_entry, zend_class_entry *parent_ce, char *parent_name TSRMLS_DC); ZEND_API zend_class_entry *zend_register_internal_class_ex(zend_class_entry *class_entry, zend_class_entry *parent_ce, char *parent_name TSRMLS_DC);
ZEND_API zend_class_entry *zend_register_internal_interface(zend_class_entry *orig_class_entry TSRMLS_DC); ZEND_API zend_class_entry *zend_register_internal_interface(zend_class_entry *orig_class_entry TSRMLS_DC);
ZEND_API void zend_class_implements(zend_class_entry *class_entry TSRMLS_DC, int num_interfaces, ...); ZEND_API void zend_class_implements(zend_class_entry *class_entry TSRMLS_DC, int num_interfaces, ...);
ZEND_API int zend_register_class_alias_ex(char *name, int name_len, zend_class_entry *ce TSRMLS_DC); ZEND_API int zend_register_class_alias_ex(const char *name, int name_len, zend_class_entry *ce TSRMLS_DC);
ZEND_API int zend_u_register_class_alias_ex(zend_uchar utype, zstr name, int name_len, zend_class_entry *ce TSRMLS_DC); ZEND_API int zend_u_register_class_alias_ex(zend_uchar utype, zstr name, int name_len, zend_class_entry *ce TSRMLS_DC);
#define zend_register_class_alias(name, ce) \ #define zend_register_class_alias(name, ce) \
@ -288,9 +288,9 @@ ZEND_API zend_bool zend_is_callable_ex(zval *callable, zval **object_pp, uint ch
ZEND_API zend_bool zend_is_callable(zval *callable, uint check_flags, zval *callable_name TSRMLS_DC); ZEND_API zend_bool zend_is_callable(zval *callable, uint check_flags, zval *callable_name TSRMLS_DC);
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 const char *zend_get_module_version(const 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(const 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, const 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_null(zend_class_entry *ce, char *name, int name_length, int access_type TSRMLS_DC); ZEND_API int zend_declare_property_null(zend_class_entry *ce, char *name, int name_length, int access_type TSRMLS_DC);
ZEND_API int zend_declare_property_bool(zend_class_entry *ce, char *name, int name_length, long value, int access_type TSRMLS_DC); ZEND_API int zend_declare_property_bool(zend_class_entry *ce, char *name, int name_length, long value, int access_type TSRMLS_DC);
ZEND_API int zend_declare_property_long(zend_class_entry *ce, char *name, int name_length, long value, int access_type TSRMLS_DC); ZEND_API int zend_declare_property_long(zend_class_entry *ce, char *name, int name_length, long value, int access_type TSRMLS_DC);
@ -301,13 +301,13 @@ ZEND_API int zend_declare_property_stringl(zend_class_entry *ce, char *name, int
ZEND_API int zend_u_declare_property(zend_class_entry *ce, zend_uchar type, zstr name, int name_length, zval *property, int access_type TSRMLS_DC); ZEND_API int zend_u_declare_property(zend_class_entry *ce, zend_uchar type, zstr name, int name_length, zval *property, int access_type TSRMLS_DC);
ZEND_API int zend_u_declare_property_ex(zend_class_entry *ce, zend_uchar type, zstr name, int name_length, zval *property, int access_type, zstr doc_comment, int doc_comment_len TSRMLS_DC); ZEND_API int zend_u_declare_property_ex(zend_class_entry *ce, zend_uchar type, zstr name, int name_length, zval *property, int access_type, zstr doc_comment, int doc_comment_len TSRMLS_DC);
ZEND_API int zend_declare_class_constant(zend_class_entry *ce, char *name, size_t name_length, zval *value TSRMLS_DC); ZEND_API int zend_declare_class_constant(zend_class_entry *ce, const char *name, size_t name_length, zval *value TSRMLS_DC);
ZEND_API int zend_declare_class_constant_null(zend_class_entry *ce, char *name, size_t name_length TSRMLS_DC); ZEND_API int zend_declare_class_constant_null(zend_class_entry *ce, const char *name, size_t name_length TSRMLS_DC);
ZEND_API int zend_declare_class_constant_long(zend_class_entry *ce, char *name, size_t name_length, long value TSRMLS_DC); ZEND_API int zend_declare_class_constant_long(zend_class_entry *ce, const char *name, size_t name_length, long value TSRMLS_DC);
ZEND_API int zend_declare_class_constant_bool(zend_class_entry *ce, char *name, size_t name_length, zend_bool value TSRMLS_DC); ZEND_API int zend_declare_class_constant_bool(zend_class_entry *ce, const char *name, size_t name_length, zend_bool value TSRMLS_DC);
ZEND_API int zend_declare_class_constant_double(zend_class_entry *ce, char *name, size_t name_length, double value TSRMLS_DC); ZEND_API int zend_declare_class_constant_double(zend_class_entry *ce, const char *name, size_t name_length, double value TSRMLS_DC);
ZEND_API int zend_declare_class_constant_stringl(zend_class_entry *ce, char *name, size_t name_length, char *value, size_t value_length TSRMLS_DC); ZEND_API int zend_declare_class_constant_stringl(zend_class_entry *ce, const char *name, size_t name_length, const char *value, size_t value_length TSRMLS_DC);
ZEND_API int zend_declare_class_constant_string(zend_class_entry *ce, char *name, size_t name_length, char *value TSRMLS_DC); ZEND_API int zend_declare_class_constant_string(zend_class_entry *ce, const char *name, size_t name_length, const char *value TSRMLS_DC);
ZEND_API void zend_update_class_constants(zend_class_entry *class_type TSRMLS_DC); ZEND_API void zend_update_class_constants(zend_class_entry *class_type TSRMLS_DC);
ZEND_API void zend_update_property(zend_class_entry *scope, zval *object, char *name, int name_length, zval *value TSRMLS_DC); ZEND_API void zend_update_property(zend_class_entry *scope, zval *object, char *name, int name_length, zval *value TSRMLS_DC);
@ -316,12 +316,12 @@ ZEND_API void zend_update_property_null(zend_class_entry *scope, zval *object, c
ZEND_API void zend_update_property_bool(zend_class_entry *scope, zval *object, char *name, int name_length, long value TSRMLS_DC); ZEND_API void zend_update_property_bool(zend_class_entry *scope, zval *object, char *name, int name_length, long value TSRMLS_DC);
ZEND_API void zend_update_property_long(zend_class_entry *scope, zval *object, char *name, int name_length, long value TSRMLS_DC); ZEND_API void zend_update_property_long(zend_class_entry *scope, zval *object, char *name, int name_length, long value TSRMLS_DC);
ZEND_API void zend_update_property_double(zend_class_entry *scope, zval *object, char *name, int name_length, double value TSRMLS_DC); ZEND_API void zend_update_property_double(zend_class_entry *scope, zval *object, char *name, int name_length, double value TSRMLS_DC);
ZEND_API void zend_update_property_string(zend_class_entry *scope, zval *object, char *name, int name_length, char *value TSRMLS_DC); ZEND_API void zend_update_property_string(zend_class_entry *scope, zval *object, char *name, int name_length, const char *value TSRMLS_DC);
ZEND_API void zend_update_property_stringl(zend_class_entry *scope, zval *object, char *name, int name_length, char *value, int value_length TSRMLS_DC); ZEND_API void zend_update_property_stringl(zend_class_entry *scope, zval *object, char *name, int name_length, const char *value, int value_length TSRMLS_DC);
ZEND_API void zend_update_property_ascii_string(zend_class_entry *scope, zval *object, char *name, int name_length, char *value TSRMLS_DC); ZEND_API void zend_update_property_ascii_string(zend_class_entry *scope, zval *object, char *name, int name_length, const char *value TSRMLS_DC);
ZEND_API void zend_update_property_ascii_stringl(zend_class_entry *scope, zval *object, char *name, int name_length, char *value, int value_length TSRMLS_DC); ZEND_API void zend_update_property_ascii_stringl(zend_class_entry *scope, zval *object, char *name, int name_length, const char *value, int value_length TSRMLS_DC);
ZEND_API void zend_update_property_rt_string(zend_class_entry *scope, zval *object, char *name, int name_length, char *value TSRMLS_DC); ZEND_API void zend_update_property_rt_string(zend_class_entry *scope, zval *object, char *name, int name_length, const char *value TSRMLS_DC);
ZEND_API void zend_update_property_rt_stringl(zend_class_entry *scope, zval *object, char *name, int name_length, char *value, int value_length TSRMLS_DC); ZEND_API void zend_update_property_rt_stringl(zend_class_entry *scope, zval *object, char *name, int name_length, const char *value, int value_length TSRMLS_DC);
ZEND_API void zend_update_property_unicode(zend_class_entry *scope, zval *object, char *name, int name_length, UChar *value TSRMLS_DC); ZEND_API void zend_update_property_unicode(zend_class_entry *scope, zval *object, char *name, int name_length, UChar *value TSRMLS_DC);
ZEND_API void zend_update_property_unicodel(zend_class_entry *scope, zval *object, char *name, int name_length, UChar *value, int value_length TSRMLS_DC); ZEND_API void zend_update_property_unicodel(zend_class_entry *scope, zval *object, char *name, int name_length, UChar *value, int value_length TSRMLS_DC);
@ -345,12 +345,12 @@ ZEND_API int zend_update_static_property_null(zend_class_entry *scope, char *nam
ZEND_API int zend_update_static_property_bool(zend_class_entry *scope, char *name, int name_length, long value TSRMLS_DC); ZEND_API int zend_update_static_property_bool(zend_class_entry *scope, char *name, int name_length, long value TSRMLS_DC);
ZEND_API int zend_update_static_property_long(zend_class_entry *scope, char *name, int name_length, long value TSRMLS_DC); ZEND_API int zend_update_static_property_long(zend_class_entry *scope, char *name, int name_length, long value TSRMLS_DC);
ZEND_API int zend_update_static_property_double(zend_class_entry *scope, char *name, int name_length, double value TSRMLS_DC); ZEND_API int zend_update_static_property_double(zend_class_entry *scope, char *name, int name_length, double value TSRMLS_DC);
ZEND_API int zend_update_static_property_string(zend_class_entry *scope, char *name, int name_length, char *value TSRMLS_DC); ZEND_API int zend_update_static_property_string(zend_class_entry *scope, char *name, int name_length, const char *value TSRMLS_DC);
ZEND_API int zend_update_static_property_stringl(zend_class_entry *scope, char *name, int name_length, char *value, int value_length TSRMLS_DC); ZEND_API int zend_update_static_property_stringl(zend_class_entry *scope, char *name, int name_length, const char *value, int value_length TSRMLS_DC);
ZEND_API int zend_update_static_property_ascii_string(zend_class_entry *scope, char *name, int name_length, char *value TSRMLS_DC); ZEND_API int zend_update_static_property_ascii_string(zend_class_entry *scope, char *name, int name_length, const char *value TSRMLS_DC);
ZEND_API int zend_update_static_property_ascii_stringl(zend_class_entry *scope, char *name, int name_length, char *value, int value_length TSRMLS_DC); ZEND_API int zend_update_static_property_ascii_stringl(zend_class_entry *scope, char *name, int name_length, const char *value, int value_length TSRMLS_DC);
ZEND_API int zend_update_static_property_rt_string(zend_class_entry *scope, char *name, int name_length, char *value TSRMLS_DC); ZEND_API int zend_update_static_property_rt_string(zend_class_entry *scope, char *name, int name_length, const char *value TSRMLS_DC);
ZEND_API int zend_update_static_property_rt_stringl(zend_class_entry *scope, char *name, int name_length, char *value, int value_length TSRMLS_DC); ZEND_API int zend_update_static_property_rt_stringl(zend_class_entry *scope, char *name, int name_length, const char *value, int value_length TSRMLS_DC);
ZEND_API int zend_update_static_property_unicode(zend_class_entry *scope, char *name, int name_length, UChar *value TSRMLS_DC); ZEND_API int zend_update_static_property_unicode(zend_class_entry *scope, char *name, int name_length, UChar *value TSRMLS_DC);
ZEND_API int zend_update_static_property_unicodel(zend_class_entry *scope, char *name, int name_length, UChar *value, int value_length TSRMLS_DC); ZEND_API int zend_update_static_property_unicodel(zend_class_entry *scope, char *name, int name_length, UChar *value, int value_length TSRMLS_DC);
@ -359,8 +359,8 @@ ZEND_API zval *zend_u_read_property(zend_class_entry *scope, zval *object, zend_
ZEND_API zval *zend_read_static_property(zend_class_entry *scope, char *name, int name_length, zend_bool silent TSRMLS_DC); ZEND_API zval *zend_read_static_property(zend_class_entry *scope, char *name, int name_length, zend_bool silent TSRMLS_DC);
ZEND_API zend_class_entry *zend_get_class_entry(zval *zobject TSRMLS_DC); ZEND_API zend_class_entry *zend_get_class_entry(const zval *zobject TSRMLS_DC);
ZEND_API int zend_get_object_classname(zval *object, zstr *class_name, zend_uint *class_name_len TSRMLS_DC); ZEND_API int zend_get_object_classname(const zval *object, zstr *class_name, zend_uint *class_name_len TSRMLS_DC);
ZEND_API zend_uchar zend_get_unified_string_type(int num_args TSRMLS_DC, ...); ZEND_API zend_uchar zend_get_unified_string_type(int num_args TSRMLS_DC, ...);
ZEND_API char *zend_get_type_by_const(int type); ZEND_API char *zend_get_type_by_const(int type);
@ -1515,22 +1515,22 @@ ZEND_API int add_get_index_stringl(zval *arg, ulong idx, const char *str, uint l
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);
ZEND_API int add_property_long_ex(zval *arg, char *key, uint key_len, long l TSRMLS_DC); ZEND_API int add_property_long_ex(zval *arg, const char *key, uint key_len, long l TSRMLS_DC);
ZEND_API int add_property_null_ex(zval *arg, char *key, uint key_len TSRMLS_DC); ZEND_API int add_property_null_ex(zval *arg, const char *key, uint key_len TSRMLS_DC);
ZEND_API int add_property_bool_ex(zval *arg, char *key, uint key_len, int b TSRMLS_DC); ZEND_API int add_property_bool_ex(zval *arg, const char *key, uint key_len, int b TSRMLS_DC);
ZEND_API int add_property_resource_ex(zval *arg, char *key, uint key_len, long r TSRMLS_DC); ZEND_API int add_property_resource_ex(zval *arg, const char *key, uint key_len, long r TSRMLS_DC);
ZEND_API int add_property_double_ex(zval *arg, char *key, uint key_len, double d TSRMLS_DC); ZEND_API int add_property_double_ex(zval *arg, const char *key, uint key_len, double d TSRMLS_DC);
ZEND_API int add_property_string_ex(zval *arg, char *key, uint key_len, char *str, int duplicate TSRMLS_DC); ZEND_API int add_property_string_ex(zval *arg, const char *key, uint key_len, char *str, int duplicate TSRMLS_DC);
ZEND_API int add_property_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, int duplicate TSRMLS_DC); ZEND_API int add_property_stringl_ex(zval *arg, const char *key, uint key_len, char *str, uint length, int duplicate TSRMLS_DC);
ZEND_API int add_property_zval_ex(zval *arg, char *key, uint key_len, zval *value TSRMLS_DC); ZEND_API int add_property_zval_ex(zval *arg, const char *key, uint key_len, zval *value TSRMLS_DC);
ZEND_API int add_property_ascii_string_ex(zval *arg, char *key, uint key_len, char *str, int duplicate TSRMLS_DC); ZEND_API int add_property_ascii_string_ex(zval *arg, const char *key, uint key_len, char *str, int duplicate TSRMLS_DC);
ZEND_API int add_property_ascii_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, int duplicate TSRMLS_DC); ZEND_API int add_property_ascii_stringl_ex(zval *arg, const char *key, uint key_len, char *str, uint length, int duplicate TSRMLS_DC);
ZEND_API int add_property_rt_string_ex(zval *arg, char *key, uint key_len, char *str, int duplicate TSRMLS_DC); ZEND_API int add_property_rt_string_ex(zval *arg, const char *key, uint key_len, char *str, int duplicate TSRMLS_DC);
ZEND_API int add_property_rt_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, int duplicate TSRMLS_DC); ZEND_API int add_property_rt_stringl_ex(zval *arg, const char *key, uint key_len, char *str, uint length, int duplicate TSRMLS_DC);
ZEND_API int add_property_unicode_ex(zval *arg, char *key, uint key_len, UChar *str, int duplicate TSRMLS_DC); ZEND_API int add_property_unicode_ex(zval *arg, const char *key, uint key_len, UChar *str, int duplicate TSRMLS_DC);
ZEND_API int add_property_unicodel_ex(zval *arg, char *key, uint key_len, UChar *str, uint length, int duplicate TSRMLS_DC); ZEND_API int add_property_unicodel_ex(zval *arg, const char *key, uint key_len, UChar *str, uint length, int duplicate TSRMLS_DC);
ZEND_API int add_property_utf8_string_ex(zval *arg, char *key, uint key_len, char *str, int duplicate TSRMLS_DC); ZEND_API int add_property_utf8_string_ex(zval *arg, const char *key, uint key_len, char *str, int duplicate TSRMLS_DC);
ZEND_API int add_property_utf8_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, int duplicate TSRMLS_DC); ZEND_API int add_property_utf8_stringl_ex(zval *arg, const char *key, uint key_len, char *str, uint length, int duplicate TSRMLS_DC);
ZEND_API int add_property_zstr_ex(zval *arg, char *key, uint key_len, zend_uchar type, zstr str, int duplicate TSRMLS_DC); ZEND_API int add_property_zstr_ex(zval *arg, char *key, uint key_len, zend_uchar type, zstr str, int duplicate TSRMLS_DC);
ZEND_API int add_property_zstrl_ex(zval *arg, char *key, uint key_len, zend_uchar type, zstr str, uint length, int duplicate TSRMLS_DC); ZEND_API int add_property_zstrl_ex(zval *arg, char *key, uint key_len, zend_uchar type, zstr str, uint length, int duplicate TSRMLS_DC);
@ -1615,7 +1615,7 @@ ZEND_API int zend_fcall_info_call(zend_fcall_info *fci, zend_fcall_info_cache *f
ZEND_API int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TSRMLS_DC); ZEND_API int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TSRMLS_DC);
ZEND_API int zend_set_hash_symbol(zval *symbol, char *name, int name_length, zend_bool is_ref, int num_symbol_tables, ...); ZEND_API int zend_set_hash_symbol(zval *symbol, const char *name, int name_length, zend_bool is_ref, int num_symbol_tables, ...);
ZEND_API int zend_delete_global_variable(char *name, int name_len TSRMLS_DC); ZEND_API int zend_delete_global_variable(char *name, int name_len TSRMLS_DC);
ZEND_API int zend_u_delete_global_variable(zend_uchar type, zstr name, int name_len TSRMLS_DC); ZEND_API int zend_u_delete_global_variable(zend_uchar type, zstr name, int name_len TSRMLS_DC);

View File

@ -80,7 +80,7 @@ static void zend_destroy_property_info_internal(zend_property_info *property_inf
} }
/* }}} */ /* }}} */
static void build_runtime_defined_function_key(zval *result, zend_uchar type, zstr name, int name_length TSRMLS_DC) /* {{{ */ static void build_runtime_defined_function_key(zval *result, zend_uchar type, const zstr name, int name_length TSRMLS_DC) /* {{{ */
{ {
char char_pos_buf[32]; char char_pos_buf[32];
uint char_pos_len; uint char_pos_len;
@ -126,7 +126,7 @@ int zend_auto_global_arm(zend_auto_global *auto_global TSRMLS_DC) /* {{{ */
} }
/* }}} */ /* }}} */
int zend_auto_global_disable_jit(char *varname, zend_uint varname_length TSRMLS_DC) /* {{{ */ int zend_auto_global_disable_jit(const char *varname, zend_uint varname_length TSRMLS_DC) /* {{{ */
{ {
zend_auto_global *auto_global; zend_auto_global *auto_global;
@ -208,7 +208,7 @@ void shutdown_compiler(TSRMLS_D) /* {{{ */
} }
/* }}} */ /* }}} */
ZEND_API char *zend_set_compiled_filename(char *new_compiled_filename TSRMLS_DC) /* {{{ */ ZEND_API char *zend_set_compiled_filename(const char *new_compiled_filename TSRMLS_DC) /* {{{ */
{ {
char **pp, *p; char **pp, *p;
int length = strlen(new_compiled_filename); int length = strlen(new_compiled_filename);
@ -309,7 +309,7 @@ static int lookup_cv(zend_op_array *op_array, zend_uchar type, zstr name, int na
} }
/* }}} */ /* }}} */
void zend_do_binary_op(zend_uchar op, znode *result, znode *op1, znode *op2 TSRMLS_DC) /* {{{ */ void zend_do_binary_op(zend_uchar op, znode *result, const znode *op1, const znode *op2 TSRMLS_DC) /* {{{ */
{ {
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
@ -322,7 +322,7 @@ void zend_do_binary_op(zend_uchar op, znode *result, znode *op1, znode *op2 TSRM
} }
/* }}} */ /* }}} */
void zend_do_unary_op(zend_uchar op, znode *result, znode *op1 TSRMLS_DC) /* {{{ */ void zend_do_unary_op(zend_uchar op, znode *result, const znode *op1 TSRMLS_DC) /* {{{ */
{ {
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
@ -337,7 +337,7 @@ void zend_do_unary_op(zend_uchar op, znode *result, znode *op1 TSRMLS_DC) /* {{{
#define MAKE_NOP(opline) { opline->opcode = ZEND_NOP; memset(&opline->result,0,sizeof(znode)); memset(&opline->op1,0,sizeof(znode)); memset(&opline->op2,0,sizeof(znode)); opline->result.op_type=opline->op1.op_type=opline->op2.op_type=IS_UNUSED; } #define MAKE_NOP(opline) { opline->opcode = ZEND_NOP; memset(&opline->result,0,sizeof(znode)); memset(&opline->op1,0,sizeof(znode)); memset(&opline->op2,0,sizeof(znode)); opline->result.op_type=opline->op1.op_type=opline->op2.op_type=IS_UNUSED; }
static void zend_do_op_data(zend_op *data_op, znode *value TSRMLS_DC) /* {{{ */ static void zend_do_op_data(zend_op *data_op, const znode *value TSRMLS_DC) /* {{{ */
{ {
data_op->opcode = ZEND_OP_DATA; data_op->opcode = ZEND_OP_DATA;
data_op->op1 = *value; data_op->op1 = *value;
@ -345,7 +345,7 @@ static void zend_do_op_data(zend_op *data_op, znode *value TSRMLS_DC) /* {{{ */
} }
/* }}} */ /* }}} */
void zend_do_binary_assign_op(zend_uchar op, znode *result, znode *op1, znode *op2 TSRMLS_DC) /* {{{ */ void zend_do_binary_assign_op(zend_uchar op, znode *result, const znode *op1, const znode *op2 TSRMLS_DC) /* {{{ */
{ {
int last_op_number = get_next_op_number(CG(active_op_array)); int last_op_number = get_next_op_number(CG(active_op_array));
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
@ -512,7 +512,7 @@ void fetch_array_begin(znode *result, znode *varname, znode *first_dim TSRMLS_DC
} }
/* }}} */ /* }}} */
void fetch_array_dim(znode *result, znode *parent, znode *dim TSRMLS_DC) /* {{{ */ void fetch_array_dim(znode *result, const znode *parent, const znode *dim TSRMLS_DC) /* {{{ */
{ {
zend_op opline; zend_op opline;
zend_llist *fetch_list_ptr; zend_llist *fetch_list_ptr;
@ -532,13 +532,13 @@ void fetch_array_dim(znode *result, znode *parent, znode *dim TSRMLS_DC) /* {{{
} }
/* }}} */ /* }}} */
void fetch_string_offset(znode *result, znode *parent, znode *offset TSRMLS_DC) /* {{{ */ void fetch_string_offset(znode *result, const znode *parent, const znode *offset TSRMLS_DC) /* {{{ */
{ {
fetch_array_dim(result, parent, offset TSRMLS_CC); fetch_array_dim(result, parent, offset TSRMLS_CC);
} }
/* }}} */ /* }}} */
void zend_do_print(znode *result, znode *arg TSRMLS_DC) /* {{{ */ void zend_do_print(znode *result, const znode *arg TSRMLS_DC) /* {{{ */
{ {
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
@ -551,7 +551,7 @@ void zend_do_print(znode *result, znode *arg TSRMLS_DC) /* {{{ */
} }
/* }}} */ /* }}} */
void zend_do_echo(znode *arg, zend_bool inline_html TSRMLS_DC) /* {{{ */ void zend_do_echo(const znode *arg, zend_bool inline_html TSRMLS_DC) /* {{{ */
{ {
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
@ -562,7 +562,7 @@ void zend_do_echo(znode *arg, zend_bool inline_html TSRMLS_DC) /* {{{ */
} }
/* }}} */ /* }}} */
void zend_do_abstract_method(znode *function_name, znode *modifiers, znode *body TSRMLS_DC) /* {{{ */ void zend_do_abstract_method(const znode *function_name, znode *modifiers, const znode *body TSRMLS_DC) /* {{{ */
{ {
char *method_type; char *method_type;
@ -595,7 +595,7 @@ void zend_do_abstract_method(znode *function_name, znode *modifiers, znode *body
} }
/* }}} */ /* }}} */
static zend_bool opline_is_fetch_this(zend_op *opline TSRMLS_DC) /* {{{ */ static zend_bool opline_is_fetch_this(const zend_op *opline TSRMLS_DC) /* {{{ */
{ {
if ((opline->opcode == ZEND_FETCH_W) && (opline->op1.op_type == IS_CONST) if ((opline->opcode == ZEND_FETCH_W) && (opline->op1.op_type == IS_CONST)
&& (Z_TYPE(opline->op1.u.constant) == IS_STRING || && (Z_TYPE(opline->op1.u.constant) == IS_STRING ||
@ -609,7 +609,7 @@ static zend_bool opline_is_fetch_this(zend_op *opline TSRMLS_DC) /* {{{ */
} }
/* }}} */ /* }}} */
void zend_do_assign(znode *result, znode *variable, znode *value TSRMLS_DC) /* {{{ */ void zend_do_assign(znode *result, znode *variable, const znode *value TSRMLS_DC) /* {{{ */
{ {
int last_op_number; int last_op_number;
zend_op *opline; zend_op *opline;
@ -706,7 +706,7 @@ void zend_do_assign(znode *result, znode *variable, znode *value TSRMLS_DC) /* {
} }
/* }}} */ /* }}} */
static inline zend_bool zend_is_function_or_method_call(znode *variable) /* {{{ */ static inline zend_bool zend_is_function_or_method_call(const znode *variable) /* {{{ */
{ {
zend_uint type = variable->u.EA.type; zend_uint type = variable->u.EA.type;
@ -714,7 +714,7 @@ static inline zend_bool zend_is_function_or_method_call(znode *variable) /* {{{
} }
/* }}} */ /* }}} */
void zend_do_assign_ref(znode *result, znode *lvar, znode *rvar TSRMLS_DC) /* {{{ */ void zend_do_assign_ref(znode *result, const znode *lvar, const znode *rvar TSRMLS_DC) /* {{{ */
{ {
zend_op *opline; zend_op *opline;
@ -783,7 +783,7 @@ static inline void do_end_loop(int cont_addr, int has_loop_var TSRMLS_DC) /* {{{
} }
/* }}} */ /* }}} */
void zend_do_while_cond(znode *expr, znode *close_bracket_token TSRMLS_DC) /* {{{ */ void zend_do_while_cond(const znode *expr, znode *close_bracket_token TSRMLS_DC) /* {{{ */
{ {
int while_cond_op_number = get_next_op_number(CG(active_op_array)); int while_cond_op_number = get_next_op_number(CG(active_op_array));
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
@ -798,7 +798,7 @@ void zend_do_while_cond(znode *expr, znode *close_bracket_token TSRMLS_DC) /* {{
} }
/* }}} */ /* }}} */
void zend_do_while_end(znode *while_token, znode *close_bracket_token TSRMLS_DC) /* {{{ */ void zend_do_while_end(const znode *while_token, const znode *close_bracket_token TSRMLS_DC) /* {{{ */
{ {
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
@ -817,7 +817,7 @@ void zend_do_while_end(znode *while_token, znode *close_bracket_token TSRMLS_DC)
} }
/* }}} */ /* }}} */
void zend_do_for_cond(znode *expr, znode *second_semicolon_token TSRMLS_DC) /* {{{ */ void zend_do_for_cond(const znode *expr, znode *second_semicolon_token TSRMLS_DC) /* {{{ */
{ {
int for_cond_op_number = get_next_op_number(CG(active_op_array)); int for_cond_op_number = get_next_op_number(CG(active_op_array));
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
@ -829,7 +829,7 @@ void zend_do_for_cond(znode *expr, znode *second_semicolon_token TSRMLS_DC) /* {
} }
/* }}} */ /* }}} */
void zend_do_for_before_statement(znode *cond_start, znode *second_semicolon_token TSRMLS_DC) /* {{{ */ void zend_do_for_before_statement(const znode *cond_start, const znode *second_semicolon_token TSRMLS_DC) /* {{{ */
{ {
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
@ -845,7 +845,7 @@ void zend_do_for_before_statement(znode *cond_start, znode *second_semicolon_tok
} }
/* }}} */ /* }}} */
void zend_do_for_end(znode *second_semicolon_token TSRMLS_DC) /* {{{ */ void zend_do_for_end(const znode *second_semicolon_token TSRMLS_DC) /* {{{ */
{ {
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
@ -861,7 +861,7 @@ void zend_do_for_end(znode *second_semicolon_token TSRMLS_DC) /* {{{ */
} }
/* }}} */ /* }}} */
void zend_do_pre_incdec(znode *result, znode *op1, zend_uchar op TSRMLS_DC) /* {{{ */ void zend_do_pre_incdec(znode *result, const znode *op1, zend_uchar op TSRMLS_DC) /* {{{ */
{ {
int last_op_number = get_next_op_number(CG(active_op_array)); int last_op_number = get_next_op_number(CG(active_op_array));
zend_op *opline; zend_op *opline;
@ -890,7 +890,7 @@ void zend_do_pre_incdec(znode *result, znode *op1, zend_uchar op TSRMLS_DC) /* {
} }
/* }}} */ /* }}} */
void zend_do_post_incdec(znode *result, znode *op1, zend_uchar op TSRMLS_DC) /* {{{ */ void zend_do_post_incdec(znode *result, const znode *op1, zend_uchar op TSRMLS_DC) /* {{{ */
{ {
int last_op_number = get_next_op_number(CG(active_op_array)); int last_op_number = get_next_op_number(CG(active_op_array));
zend_op *opline; zend_op *opline;
@ -917,7 +917,7 @@ void zend_do_post_incdec(znode *result, znode *op1, zend_uchar op TSRMLS_DC) /*
} }
/* }}} */ /* }}} */
void zend_do_if_cond(znode *cond, znode *closing_bracket_token TSRMLS_DC) /* {{{ */ void zend_do_if_cond(const znode *cond, znode *closing_bracket_token TSRMLS_DC) /* {{{ */
{ {
int if_cond_op_number = get_next_op_number(CG(active_op_array)); int if_cond_op_number = get_next_op_number(CG(active_op_array));
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
@ -930,7 +930,7 @@ void zend_do_if_cond(znode *cond, znode *closing_bracket_token TSRMLS_DC) /* {{{
} }
/* }}} */ /* }}} */
void zend_do_if_after_statement(znode *closing_bracket_token, unsigned char initialize TSRMLS_DC) /* {{{ */ void zend_do_if_after_statement(const znode *closing_bracket_token, unsigned char initialize TSRMLS_DC) /* {{{ */
{ {
int if_end_op_number = get_next_op_number(CG(active_op_array)); int if_end_op_number = get_next_op_number(CG(active_op_array));
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
@ -969,7 +969,7 @@ void zend_do_if_end(TSRMLS_D) /* {{{ */
} }
/* }}} */ /* }}} */
void zend_check_writable_variable(znode *variable) /* {{{ */ void zend_check_writable_variable(const znode *variable) /* {{{ */
{ {
zend_uint type = variable->u.EA.type; zend_uint type = variable->u.EA.type;
@ -1078,7 +1078,7 @@ void zend_do_end_variable_parse(znode *variable, int type, int arg_offset TSRMLS
} }
/* }}} */ /* }}} */
void zend_do_add_string(znode *result, znode *op1, znode *op2 TSRMLS_DC) /* {{{ */ void zend_do_add_string(znode *result, const znode *op1, znode *op2 TSRMLS_DC) /* {{{ */
{ {
zend_op *opline; zend_op *opline;
@ -1112,7 +1112,7 @@ void zend_do_add_string(znode *result, znode *op1, znode *op2 TSRMLS_DC) /* {{{
} }
/* }}} */ /* }}} */
void zend_do_add_variable(znode *result, znode *op1, znode *op2 TSRMLS_DC) /* {{{ */ void zend_do_add_variable(znode *result, const znode *op1, const znode *op2 TSRMLS_DC) /* {{{ */
{ {
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
@ -1180,7 +1180,7 @@ void zend_do_free(znode *op1 TSRMLS_DC) /* {{{ */
} }
/* }}} */ /* }}} */
int zend_do_verify_access_types(znode *current_access_type, znode *new_modifier) /* {{{ */ int zend_do_verify_access_types(const znode *current_access_type, const znode *new_modifier) /* {{{ */
{ {
if ((Z_LVAL(current_access_type->u.constant) & ZEND_ACC_PPP_MASK) if ((Z_LVAL(current_access_type->u.constant) & ZEND_ACC_PPP_MASK)
&& (Z_LVAL(new_modifier->u.constant) & ZEND_ACC_PPP_MASK)) { && (Z_LVAL(new_modifier->u.constant) & ZEND_ACC_PPP_MASK)) {
@ -1489,7 +1489,7 @@ void zend_do_handle_exception(TSRMLS_D) /* {{{ */
} }
/* }}} */ /* }}} */
void zend_do_end_function_declaration(znode *function_token TSRMLS_DC) /* {{{ */ void zend_do_end_function_declaration(const znode *function_token TSRMLS_DC) /* {{{ */
{ {
unsigned int lcname_len; unsigned int lcname_len;
zstr lcname; zstr lcname;
@ -1541,7 +1541,7 @@ void zend_do_end_function_declaration(znode *function_token TSRMLS_DC) /* {{{ */
} }
/* }}} */ /* }}} */
void zend_do_receive_arg(zend_uchar op, znode *var, znode *offset, znode *initialization, znode *class_type, znode *varname, zend_uchar pass_by_reference TSRMLS_DC) /* {{{ */ void zend_do_receive_arg(zend_uchar op, const znode *var, const znode *offset, const znode *initialization, znode *class_type, const znode *varname, zend_uchar pass_by_reference TSRMLS_DC) /* {{{ */
{ {
zend_op *opline; zend_op *opline;
zend_arg_info *cur_arg_info; zend_arg_info *cur_arg_info;
@ -1725,7 +1725,7 @@ void zend_do_begin_method_call(znode *left_bracket TSRMLS_DC) /* {{{ */
} }
/* }}} */ /* }}} */
void zend_do_clone(znode *result, znode *expr TSRMLS_DC) /* {{{ */ void zend_do_clone(znode *result, const znode *expr TSRMLS_DC) /* {{{ */
{ {
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
@ -2080,7 +2080,7 @@ int zend_do_begin_class_member_function_call(znode *class_name, znode *method_na
} }
/* }}} */ /* }}} */
void zend_do_end_function_call(znode *function_name, znode *result, znode *argument_list, int is_method, int is_dynamic_fcall TSRMLS_DC) /* {{{ */ void zend_do_end_function_call(znode *function_name, znode *result, const znode *argument_list, int is_method, int is_dynamic_fcall TSRMLS_DC) /* {{{ */
{ {
zend_op *opline; zend_op *opline;
@ -2210,7 +2210,7 @@ void zend_do_pass_param(znode *param, zend_uchar op, int offset TSRMLS_DC) /* {{
} }
/* }}} */ /* }}} */
static int generate_free_switch_expr(zend_switch_entry *switch_entry TSRMLS_DC) /* {{{ */ static int generate_free_switch_expr(const zend_switch_entry *switch_entry TSRMLS_DC) /* {{{ */
{ {
zend_op *opline; zend_op *opline;
@ -2228,7 +2228,7 @@ static int generate_free_switch_expr(zend_switch_entry *switch_entry TSRMLS_DC)
} }
/* }}} */ /* }}} */
static int generate_free_foreach_copy(zend_op *foreach_copy TSRMLS_DC) /* {{{ */ static int generate_free_foreach_copy(const zend_op *foreach_copy TSRMLS_DC) /* {{{ */
{ {
zend_op *opline; zend_op *opline;
@ -2333,7 +2333,7 @@ void zend_do_first_catch(znode *open_parentheses TSRMLS_DC) /* {{{ */
} }
/* }}} */ /* }}} */
void zend_initialize_try_catch_element(znode *try_token TSRMLS_DC) /* {{{ */ void zend_initialize_try_catch_element(const znode *try_token TSRMLS_DC) /* {{{ */
{ {
int jmp_op_number = get_next_op_number(CG(active_op_array)); int jmp_op_number = get_next_op_number(CG(active_op_array));
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
@ -2354,7 +2354,7 @@ void zend_initialize_try_catch_element(znode *try_token TSRMLS_DC) /* {{{ */
} }
/* }}} */ /* }}} */
void zend_do_mark_last_catch(znode *first_catch, znode *last_additional_catch TSRMLS_DC) /* {{{ */ void zend_do_mark_last_catch(const znode *first_catch, const znode *last_additional_catch TSRMLS_DC) /* {{{ */
{ {
CG(active_op_array)->last--; CG(active_op_array)->last--;
zend_do_if_end(TSRMLS_C); zend_do_if_end(TSRMLS_C);
@ -2376,7 +2376,7 @@ void zend_do_try(znode *try_token TSRMLS_DC) /* {{{ */
} }
/* }}} */ /* }}} */
void zend_do_begin_catch(znode *try_token, znode *class_name, znode *catch_var, znode *first_catch TSRMLS_DC) /* {{{ */ void zend_do_begin_catch(znode *try_token, znode *class_name, const znode *catch_var, znode *first_catch TSRMLS_DC) /* {{{ */
{ {
long catch_op_number; long catch_op_number;
zend_op *opline; zend_op *opline;
@ -2409,7 +2409,7 @@ void zend_do_begin_catch(znode *try_token, znode *class_name, znode *catch_var,
} }
/* }}} */ /* }}} */
void zend_do_end_catch(znode *try_token TSRMLS_DC) /* {{{ */ void zend_do_end_catch(const znode *try_token TSRMLS_DC) /* {{{ */
{ {
int jmp_op_number = get_next_op_number(CG(active_op_array)); int jmp_op_number = get_next_op_number(CG(active_op_array));
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
@ -2427,7 +2427,7 @@ void zend_do_end_catch(znode *try_token TSRMLS_DC) /* {{{ */
} }
/* }}} */ /* }}} */
void zend_do_throw(znode *expr TSRMLS_DC) /* {{{ */ void zend_do_throw(const znode *expr TSRMLS_DC) /* {{{ */
{ {
zend_op *opline; zend_op *opline;
@ -2581,7 +2581,7 @@ static void do_inherit_method(zend_function *function) /* {{{ */
} }
/* }}} */ /* }}} */
static zend_bool zend_do_perform_implementation_check(zend_function *fe, zend_function *proto TSRMLS_DC) /* {{{ */ static zend_bool zend_do_perform_implementation_check(const zend_function *fe, const zend_function *proto TSRMLS_DC) /* {{{ */
{ {
zend_uint i; zend_uint i;
@ -2656,7 +2656,7 @@ static zend_bool zend_do_perform_implementation_check(zend_function *fe, zend_fu
} }
/* }}} */ /* }}} */
static zend_bool do_inherit_method_check(HashTable *child_function_table, zend_function *parent, zend_hash_key *hash_key, zend_class_entry *child_ce) /* {{{ */ static zend_bool do_inherit_method_check(HashTable *child_function_table, zend_function *parent, const zend_hash_key *hash_key, zend_class_entry *child_ce) /* {{{ */
{ {
zend_uint child_flags; zend_uint child_flags;
zend_uint parent_flags = parent->common.fn_flags; zend_uint parent_flags = parent->common.fn_flags;
@ -2736,7 +2736,7 @@ static zend_bool do_inherit_method_check(HashTable *child_function_table, zend_f
} }
/* }}} */ /* }}} */
static zend_bool do_inherit_property_access_check(HashTable *target_ht, zend_property_info *parent_info, zend_hash_key *hash_key, zend_class_entry *ce) /* {{{ */ static zend_bool do_inherit_property_access_check(HashTable *target_ht, zend_property_info *parent_info, const zend_hash_key *hash_key, zend_class_entry *ce) /* {{{ */
{ {
zend_property_info *child_info; zend_property_info *child_info;
zend_class_entry *parent_ce = ce->parent; zend_class_entry *parent_ce = ce->parent;
@ -2826,7 +2826,7 @@ static inline void do_implement_interface(zend_class_entry *ce, zend_class_entry
} }
/* }}} */ /* }}} */
ZEND_API void zend_do_inherit_interfaces(zend_class_entry *ce, zend_class_entry *iface TSRMLS_DC) /* {{{ */ ZEND_API void zend_do_inherit_interfaces(zend_class_entry *ce, const zend_class_entry *iface TSRMLS_DC) /* {{{ */
{ {
/* expects interface to be contained in ce's interface list already */ /* expects interface to be contained in ce's interface list already */
zend_uint i, ce_num, if_num = iface->num_interfaces; zend_uint i, ce_num, if_num = iface->num_interfaces;
@ -2863,7 +2863,7 @@ ZEND_API void zend_do_inherit_interfaces(zend_class_entry *ce, zend_class_entry
} }
/* }}} */ /* }}} */
static int inherit_static_prop(zval **p TSRMLS_DC, int num_args, va_list args, zend_hash_key *key) /* {{{ */ static int inherit_static_prop(zval **p TSRMLS_DC, int num_args, va_list args, const zend_hash_key *key) /* {{{ */
{ {
HashTable *target = va_arg(args, HashTable*); HashTable *target = va_arg(args, HashTable*);
@ -2915,7 +2915,7 @@ ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent
} }
/* }}} */ /* }}} */
static zend_bool do_inherit_constant_check(HashTable *child_constants_table, zval **parent_constant, zend_hash_key *hash_key, zend_class_entry *iface) /* {{{ */ static zend_bool do_inherit_constant_check(HashTable *child_constants_table, const zval **parent_constant, const zend_hash_key *hash_key, const zend_class_entry *iface) /* {{{ */
{ {
zval **old_constant; zval **old_constant;
@ -3002,7 +3002,7 @@ ZEND_API int do_bind_function(zend_op *opline, HashTable *function_table, zend_b
} }
/* }}} */ /* }}} */
ZEND_API zend_class_entry *do_bind_class(zend_op *opline, HashTable *class_table, zend_bool compile_time TSRMLS_DC) /* {{{ */ ZEND_API zend_class_entry *do_bind_class(const zend_op *opline, HashTable *class_table, zend_bool compile_time TSRMLS_DC) /* {{{ */
{ {
zend_class_entry *ce, **pce; zend_class_entry *ce, **pce;
@ -3033,7 +3033,7 @@ ZEND_API zend_class_entry *do_bind_class(zend_op *opline, HashTable *class_table
} }
/* }}} */ /* }}} */
ZEND_API zend_class_entry *do_bind_inherited_class(zend_op *opline, HashTable *class_table, zend_class_entry *parent_ce, zend_bool compile_time TSRMLS_DC) /* {{{ */ ZEND_API zend_class_entry *do_bind_inherited_class(const zend_op *opline, HashTable *class_table, zend_class_entry *parent_ce, zend_bool compile_time TSRMLS_DC) /* {{{ */
{ {
zend_class_entry *ce, **pce; zend_class_entry *ce, **pce;
int found_ce; int found_ce;
@ -3147,7 +3147,7 @@ void zend_do_early_binding(TSRMLS_D) /* {{{ */
} }
/* }}} */ /* }}} */
ZEND_API void zend_do_delayed_early_binding(zend_op_array *op_array TSRMLS_DC) /* {{{ */ ZEND_API void zend_do_delayed_early_binding(const zend_op_array *op_array TSRMLS_DC) /* {{{ */
{ {
if (op_array->early_binding != -1) { if (op_array->early_binding != -1) {
zend_bool orig_in_compilation = CG(in_compilation); zend_bool orig_in_compilation = CG(in_compilation);
@ -3187,7 +3187,7 @@ void zend_do_boolean_or_begin(znode *expr1, znode *op_token TSRMLS_DC) /* {{{ */
} }
/* }}} */ /* }}} */
void zend_do_boolean_or_end(znode *result, znode *expr1, znode *expr2, znode *op_token TSRMLS_DC) /* {{{ */ void zend_do_boolean_or_end(znode *result, const znode *expr1, const znode *expr2, znode *op_token TSRMLS_DC) /* {{{ */
{ {
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
@ -3222,7 +3222,7 @@ void zend_do_boolean_and_begin(znode *expr1, znode *op_token TSRMLS_DC) /* {{{ *
} }
/* }}} */ /* }}} */
void zend_do_boolean_and_end(znode *result, znode *expr1, znode *expr2, znode *op_token TSRMLS_DC) /* {{{ */ void zend_do_boolean_and_end(znode *result, const znode *expr1, const znode *expr2, const znode *op_token TSRMLS_DC) /* {{{ */
{ {
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
@ -3243,7 +3243,7 @@ void zend_do_do_while_begin(TSRMLS_D) /* {{{ */
} }
/* }}} */ /* }}} */
void zend_do_do_while_end(znode *do_token, znode *expr_open_bracket, znode *expr TSRMLS_DC) /* {{{ */ void zend_do_do_while_end(const znode *do_token, const znode *expr_open_bracket, const znode *expr TSRMLS_DC) /* {{{ */
{ {
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
@ -3258,7 +3258,7 @@ void zend_do_do_while_end(znode *do_token, znode *expr_open_bracket, znode *expr
} }
/* }}} */ /* }}} */
void zend_do_brk_cont(zend_uchar op, znode *expr TSRMLS_DC) /* {{{ */ void zend_do_brk_cont(zend_uchar op, const znode *expr TSRMLS_DC) /* {{{ */
{ {
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
@ -3281,7 +3281,7 @@ void zend_do_brk_cont(zend_uchar op, znode *expr TSRMLS_DC) /* {{{ */
} }
/* }}} */ /* }}} */
void zend_do_switch_cond(znode *cond TSRMLS_DC) /* {{{ */ void zend_do_switch_cond(const znode *cond TSRMLS_DC) /* {{{ */
{ {
zend_switch_entry switch_entry; zend_switch_entry switch_entry;
@ -3296,7 +3296,7 @@ void zend_do_switch_cond(znode *cond TSRMLS_DC) /* {{{ */
} }
/* }}} */ /* }}} */
void zend_do_switch_end(znode *case_list TSRMLS_DC) /* {{{ */ void zend_do_switch_end(const znode *case_list TSRMLS_DC) /* {{{ */
{ {
zend_op *opline; zend_op *opline;
zend_switch_entry *switch_entry_ptr; zend_switch_entry *switch_entry_ptr;
@ -3339,7 +3339,7 @@ void zend_do_switch_end(znode *case_list TSRMLS_DC) /* {{{ */
} }
/* }}} */ /* }}} */
void zend_do_case_before_statement(znode *case_list, znode *case_token, znode *case_expr TSRMLS_DC) /* {{{ */ void zend_do_case_before_statement(const znode *case_list, znode *case_token, const znode *case_expr TSRMLS_DC) /* {{{ */
{ {
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
int next_op_number; int next_op_number;
@ -3376,7 +3376,7 @@ void zend_do_case_before_statement(znode *case_list, znode *case_token, znode *c
} }
/* }}} */ /* }}} */
void zend_do_case_after_statement(znode *result, znode *case_token TSRMLS_DC) /* {{{ */ void zend_do_case_after_statement(znode *result, const znode *case_token TSRMLS_DC) /* {{{ */
{ {
int next_op_number = get_next_op_number(CG(active_op_array)); int next_op_number = get_next_op_number(CG(active_op_array));
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
@ -3397,7 +3397,7 @@ void zend_do_case_after_statement(znode *result, znode *case_token TSRMLS_DC) /*
} }
/* }}} */ /* }}} */
void zend_do_default_before_statement(znode *case_list, znode *default_token TSRMLS_DC) /* {{{ */ void zend_do_default_before_statement(const znode *case_list, znode *default_token TSRMLS_DC) /* {{{ */
{ {
int next_op_number = get_next_op_number(CG(active_op_array)); int next_op_number = get_next_op_number(CG(active_op_array));
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
@ -3420,7 +3420,7 @@ void zend_do_default_before_statement(znode *case_list, znode *default_token TSR
} }
/* }}} */ /* }}} */
void zend_do_begin_class_declaration(znode *class_token, znode *class_name, znode *parent_class_name TSRMLS_DC) /* {{{ */ void zend_do_begin_class_declaration(const znode *class_token, znode *class_name, const znode *parent_class_name TSRMLS_DC) /* {{{ */
{ {
zend_op *opline; zend_op *opline;
int doing_inheritance = 0; int doing_inheritance = 0;
@ -3550,7 +3550,7 @@ static void do_verify_abstract_class(TSRMLS_D) /* {{{ */
} }
/* }}} */ /* }}} */
void zend_do_end_class_declaration(znode *class_token, znode *parent_token TSRMLS_DC) /* {{{ */ void zend_do_end_class_declaration(const znode *class_token, const znode *parent_token TSRMLS_DC) /* {{{ */
{ {
zend_class_entry *ce = CG(active_class_entry); zend_class_entry *ce = CG(active_class_entry);
@ -3621,7 +3621,7 @@ void zend_do_implements_interface(znode *interface_name TSRMLS_DC) /* {{{ */
} }
/* }}} */ /* }}} */
ZEND_API void zend_mangle_property_name(char **dest, int *dest_length, char *src1, int src1_length, char *src2, int src2_length, int internal) /* {{{ */ ZEND_API void zend_mangle_property_name(char **dest, int *dest_length, const char *src1, int src1_length, const char *src2, int src2_length, int internal) /* {{{ */
{ {
char *prop_name; char *prop_name;
int prop_name_length; int prop_name_length;
@ -3637,7 +3637,7 @@ ZEND_API void zend_mangle_property_name(char **dest, int *dest_length, char *src
} }
/* }}} */ /* }}} */
ZEND_API void zend_u_mangle_property_name(zstr *dest, int *dest_length, zend_uchar type, zstr src1, int src1_length, zstr src2, int src2_length, int internal) /* {{{ */ ZEND_API void zend_u_mangle_property_name(zstr *dest, int *dest_length, zend_uchar type, const zstr src1, int src1_length, const zstr src2, int src2_length, int internal) /* {{{ */
{ {
if (type == IS_UNICODE) { if (type == IS_UNICODE) {
UChar *prop_name; UChar *prop_name;
@ -3742,7 +3742,7 @@ ZEND_API int zend_u_unmangle_property_name(zend_uchar type, zstr mangled_propert
} }
/* }}} */ /* }}} */
void zend_do_declare_property(znode *var_name, znode *value, zend_uint access_type TSRMLS_DC) /* {{{ */ void zend_do_declare_property(const znode *var_name, const znode *value, zend_uint access_type TSRMLS_DC) /* {{{ */
{ {
zval *property; zval *property;
zend_property_info *existing_property_info; zend_property_info *existing_property_info;
@ -3788,7 +3788,7 @@ void zend_do_declare_property(znode *var_name, znode *value, zend_uint access_ty
} }
/* }}} */ /* }}} */
void zend_do_declare_class_constant(znode *var_name, znode *value TSRMLS_DC) /* {{{ */ void zend_do_declare_class_constant(znode *var_name, const znode *value TSRMLS_DC) /* {{{ */
{ {
zval *property; zval *property;
@ -3807,7 +3807,7 @@ void zend_do_declare_class_constant(znode *var_name, znode *value TSRMLS_DC) /*
} }
/* }}} */ /* }}} */
void zend_do_fetch_property(znode *result, znode *object, znode *property TSRMLS_DC) /* {{{ */ void zend_do_fetch_property(znode *result, znode *object, const znode *property TSRMLS_DC) /* {{{ */
{ {
zend_op opline; zend_op opline;
zend_llist *fetch_list_ptr; zend_llist *fetch_list_ptr;
@ -3916,7 +3916,7 @@ void zend_do_declare_implicit_property(TSRMLS_D) /* {{{ */
} }
/* }}} */ /* }}} */
void zend_do_push_object(znode *object TSRMLS_DC) /* {{{ */ void zend_do_push_object(const znode *object TSRMLS_DC) /* {{{ */
{ {
zend_stack_push(&CG(object_stack), object, sizeof(znode)); zend_stack_push(&CG(object_stack), object, sizeof(znode));
} }
@ -3951,7 +3951,7 @@ void zend_do_begin_new_object(znode *new_token, znode *class_type TSRMLS_DC) /*
} }
/* }}} */ /* }}} */
void zend_do_end_new_object(znode *result, znode *new_token, znode *argument_list TSRMLS_DC) /* {{{ */ void zend_do_end_new_object(znode *result, const znode *new_token, const znode *argument_list TSRMLS_DC) /* {{{ */
{ {
znode ctor_result; znode ctor_result;
@ -3963,7 +3963,7 @@ void zend_do_end_new_object(znode *result, znode *new_token, znode *argument_lis
} }
/* }}} */ /* }}} */
static zend_constant* zend_get_ct_const(zval *const_name, int mode TSRMLS_DC) /* {{{ */ static zend_constant* zend_get_ct_const(const zval *const_name, int mode TSRMLS_DC) /* {{{ */
{ {
zend_constant *c = NULL; zend_constant *c = NULL;
@ -4138,7 +4138,7 @@ void zend_do_fetch_constant(znode *result, znode *constant_container, znode *con
} }
/* }}} */ /* }}} */
void zend_do_shell_exec(znode *result, znode *cmd TSRMLS_DC) /* {{{ */ void zend_do_shell_exec(znode *result, const znode *cmd TSRMLS_DC) /* {{{ */
{ {
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
@ -4173,7 +4173,7 @@ void zend_do_shell_exec(znode *result, znode *cmd TSRMLS_DC) /* {{{ */
} }
/* }}} */ /* }}} */
void zend_do_init_array(znode *result, znode *expr, znode *offset, zend_bool is_ref TSRMLS_DC) /* {{{ */ void zend_do_init_array(znode *result, const znode *expr, const znode *offset, zend_bool is_ref TSRMLS_DC) /* {{{ */
{ {
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
@ -4196,7 +4196,7 @@ void zend_do_init_array(znode *result, znode *expr, znode *offset, zend_bool is_
} }
/* }}} */ /* }}} */
void zend_do_add_array_element(znode *result, znode *expr, znode *offset, zend_bool is_ref TSRMLS_DC) /* {{{ */ void zend_do_add_array_element(znode *result, const znode *expr, const znode *offset, zend_bool is_ref TSRMLS_DC) /* {{{ */
{ {
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
@ -4212,7 +4212,7 @@ void zend_do_add_array_element(znode *result, znode *expr, znode *offset, zend_b
} }
/* }}} */ /* }}} */
void zend_do_add_static_array_element(znode *result, znode *offset, znode *expr) /* {{{ */ void zend_do_add_static_array_element(znode *result, znode *offset, const znode *expr) /* {{{ */
{ {
zval *element; zval *element;
TSRMLS_FETCH(); TSRMLS_FETCH();
@ -4263,7 +4263,7 @@ void zend_do_add_static_array_element(znode *result, znode *offset, znode *expr)
} }
/* }}} */ /* }}} */
void zend_do_add_list_element(znode *element TSRMLS_DC) /* {{{ */ void zend_do_add_list_element(const znode *element TSRMLS_DC) /* {{{ */
{ {
list_llist_element lle; list_llist_element lle;
@ -4358,7 +4358,7 @@ void zend_do_list_end(znode *result, znode *expr TSRMLS_DC) /* {{{ */
} }
/* }}} */ /* }}} */
void zend_do_fetch_static_variable(znode *varname, znode *static_assignment, int fetch_type TSRMLS_DC) /* {{{ */ void zend_do_fetch_static_variable(znode *varname, const znode *static_assignment, int fetch_type TSRMLS_DC) /* {{{ */
{ {
zval *tmp; zval *tmp;
zend_op *opline; zend_op *opline;
@ -4434,7 +4434,7 @@ void zend_do_fetch_lexical_variable(znode *varname, zend_bool is_ref TSRMLS_DC)
} }
/* }}} */ /* }}} */
void zend_do_fetch_global_variable(znode *varname, znode *static_assignment, int fetch_type TSRMLS_DC) /* {{{ */ void zend_do_fetch_global_variable(znode *varname, const znode *static_assignment, int fetch_type TSRMLS_DC) /* {{{ */
{ {
zend_op *opline; zend_op *opline;
znode lval; znode lval;
@ -4467,7 +4467,7 @@ void zend_do_fetch_global_variable(znode *varname, znode *static_assignment, int
} }
/* }}} */ /* }}} */
void zend_do_cast(znode *result, znode *expr, int type TSRMLS_DC) /* {{{ */ void zend_do_cast(znode *result, const znode *expr, int type TSRMLS_DC) /* {{{ */
{ {
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
@ -4481,7 +4481,7 @@ void zend_do_cast(znode *result, znode *expr, int type TSRMLS_DC) /* {{{ */
} }
/* }}} */ /* }}} */
void zend_do_include_or_eval(int type, znode *result, znode *op1 TSRMLS_DC) /* {{{ */ void zend_do_include_or_eval(int type, znode *result, const znode *op1 TSRMLS_DC) /* {{{ */
{ {
zend_do_extended_fcall_begin(TSRMLS_C); zend_do_extended_fcall_begin(TSRMLS_C);
{ {
@ -4499,7 +4499,7 @@ void zend_do_include_or_eval(int type, znode *result, znode *op1 TSRMLS_DC) /* {
} }
/* }}} */ /* }}} */
void zend_do_indirect_references(znode *result, znode *num_references, znode *variable TSRMLS_DC) /* {{{ */ void zend_do_indirect_references(znode *result, const znode *num_references, znode *variable TSRMLS_DC) /* {{{ */
{ {
int i; int i;
@ -4514,7 +4514,7 @@ void zend_do_indirect_references(znode *result, znode *num_references, znode *va
} }
/* }}} */ /* }}} */
void zend_do_unset(znode *variable TSRMLS_DC) /* {{{ */ void zend_do_unset(const znode *variable TSRMLS_DC) /* {{{ */
{ {
zend_op *last_op; zend_op *last_op;
@ -4587,7 +4587,7 @@ void zend_do_isset_or_isempty(int type, znode *result, znode *variable TSRMLS_DC
} }
/* }}} */ /* }}} */
void zend_do_instanceof(znode *result, znode *expr, znode *class_znode, int type TSRMLS_DC) /* {{{ */ void zend_do_instanceof(znode *result, const znode *expr, const znode *class_znode, int type TSRMLS_DC) /* {{{ */
{ {
int last_op_number = get_next_op_number(CG(active_op_array)); int last_op_number = get_next_op_number(CG(active_op_array));
zend_op *opline; zend_op *opline;
@ -4687,7 +4687,7 @@ void zend_do_foreach_begin(znode *foreach_token, znode *open_brackets_token, zno
} }
/* }}} */ /* }}} */
void zend_do_foreach_cont(znode *foreach_token, znode *open_brackets_token, znode *as_token, znode *value, znode *key TSRMLS_DC) /* {{{ */ void zend_do_foreach_cont(znode *foreach_token, const znode *open_brackets_token, const znode *as_token, znode *value, znode *key TSRMLS_DC) /* {{{ */
{ {
zend_op *opline; zend_op *opline;
znode dummy, value_node; znode dummy, value_node;
@ -4766,7 +4766,7 @@ void zend_do_foreach_cont(znode *foreach_token, znode *open_brackets_token, znod
} }
/* }}} */ /* }}} */
void zend_do_foreach_end(znode *foreach_token, znode *as_token TSRMLS_DC) /* {{{ */ void zend_do_foreach_end(const znode *foreach_token, const znode *as_token TSRMLS_DC) /* {{{ */
{ {
zend_op *container_ptr; zend_op *container_ptr;
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
@ -4842,7 +4842,7 @@ void zend_do_declare_stmt(znode *var, znode *val TSRMLS_DC) /* {{{ */
} }
/* }}} */ /* }}} */
void zend_do_declare_end(znode *declare_token TSRMLS_DC) /* {{{ */ void zend_do_declare_end(const znode *declare_token TSRMLS_DC) /* {{{ */
{ {
zend_declarables *declarables; zend_declarables *declarables;
@ -4854,7 +4854,7 @@ void zend_do_declare_end(znode *declare_token TSRMLS_DC) /* {{{ */
} }
/* }}} */ /* }}} */
void zend_do_exit(znode *result, znode *message TSRMLS_DC) /* {{{ */ void zend_do_exit(znode *result, const znode *message TSRMLS_DC) /* {{{ */
{ {
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
@ -4881,7 +4881,7 @@ void zend_do_begin_silence(znode *strudel_token TSRMLS_DC) /* {{{ */
} }
/* }}} */ /* }}} */
void zend_do_end_silence(znode *strudel_token TSRMLS_DC) /* {{{ */ void zend_do_end_silence(const znode *strudel_token TSRMLS_DC) /* {{{ */
{ {
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
@ -4891,7 +4891,7 @@ void zend_do_end_silence(znode *strudel_token TSRMLS_DC) /* {{{ */
} }
/* }}} */ /* }}} */
void zend_do_jmp_set(znode *value, znode *jmp_token, znode *colon_token TSRMLS_DC) /* {{{ */ void zend_do_jmp_set(const znode *value, znode *jmp_token, znode *colon_token TSRMLS_DC) /* {{{ */
{ {
int op_number = get_next_op_number(CG(active_op_array)); int op_number = get_next_op_number(CG(active_op_array));
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
@ -4910,7 +4910,7 @@ void zend_do_jmp_set(znode *value, znode *jmp_token, znode *colon_token TSRMLS_D
} }
/* }}} */ /* }}} */
void zend_do_jmp_set_else(znode *result, znode *false_value, znode *jmp_token, znode *colon_token TSRMLS_DC) /* {{{ */ void zend_do_jmp_set_else(znode *result, const znode *false_value, const znode *jmp_token, const znode *colon_token TSRMLS_DC) /* {{{ */
{ {
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
@ -4928,7 +4928,7 @@ void zend_do_jmp_set_else(znode *result, znode *false_value, znode *jmp_token, z
} }
/* }}} */ /* }}} */
void zend_do_begin_qm_op(znode *cond, znode *qm_token TSRMLS_DC) /* {{{ */ void zend_do_begin_qm_op(const znode *cond, znode *qm_token TSRMLS_DC) /* {{{ */
{ {
int jmpz_op_number = get_next_op_number(CG(active_op_array)); int jmpz_op_number = get_next_op_number(CG(active_op_array));
zend_op *opline; zend_op *opline;
@ -4945,7 +4945,7 @@ void zend_do_begin_qm_op(znode *cond, znode *qm_token TSRMLS_DC) /* {{{ */
} }
/* }}} */ /* }}} */
void zend_do_qm_true(znode *true_value, znode *qm_token, znode *colon_token TSRMLS_DC) /* {{{ */ void zend_do_qm_true(const znode *true_value, znode *qm_token, znode *colon_token TSRMLS_DC) /* {{{ */
{ {
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
@ -4967,7 +4967,7 @@ void zend_do_qm_true(znode *true_value, znode *qm_token, znode *colon_token TSRM
} }
/* }}} */ /* }}} */
void zend_do_qm_false(znode *result, znode *false_value, znode *qm_token, znode *colon_token TSRMLS_DC) /* {{{ */ void zend_do_qm_false(znode *result, const znode *false_value, const znode *qm_token, const znode *colon_token TSRMLS_DC) /* {{{ */
{ {
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
@ -5074,13 +5074,13 @@ zend_bool zend_u_is_auto_global(zend_uchar type, zstr name, uint name_len TSRMLS
} }
/* }}} */ /* }}} */
zend_bool zend_is_auto_global(char *name, uint name_len TSRMLS_DC) /* {{{ */ zend_bool zend_is_auto_global(const char *name, uint name_len TSRMLS_DC) /* {{{ */
{ {
return zend_u_is_auto_global_ex(IS_STRING, ZSTR(name), name_len, 0, NULL TSRMLS_CC); return zend_u_is_auto_global_ex(IS_STRING, ZSTR(name), name_len, 0, NULL TSRMLS_CC);
} }
/* }}} */ /* }}} */
int zend_register_auto_global_ex(char *name, uint name_len, zend_auto_global_callback auto_global_callback, zend_bool runtime TSRMLS_DC) /* {{{ */ int zend_register_auto_global_ex(const char *name, uint name_len, zend_auto_global_callback auto_global_callback, zend_bool runtime TSRMLS_DC) /* {{{ */
{ {
zend_auto_global auto_global; zend_auto_global auto_global;
@ -5094,7 +5094,7 @@ int zend_register_auto_global_ex(char *name, uint name_len, zend_auto_global_cal
} }
/* }}} */ /* }}} */
int zend_register_auto_global(char *name, uint name_len, zend_auto_global_callback auto_global_callback TSRMLS_DC) /* {{{ */ int zend_register_auto_global(const char *name, uint name_len, zend_auto_global_callback auto_global_callback TSRMLS_DC) /* {{{ */
{ {
return zend_register_auto_global_ex(name, name_len, auto_global_callback, 0 TSRMLS_CC); return zend_register_auto_global_ex(name, name_len, auto_global_callback, 0 TSRMLS_CC);
} }
@ -5221,7 +5221,7 @@ int zend_get_class_fetch_type(zend_uchar type, zstr class_name, uint class_name_
} }
/* }}} */ /* }}} */
ZEND_API zstr zend_get_compiled_variable_name(zend_op_array *op_array, zend_uint var, int* name_len) /* {{{ */ ZEND_API zstr zend_get_compiled_variable_name(const zend_op_array *op_array, zend_uint var, int* name_len) /* {{{ */
{ {
if (name_len) { if (name_len) {
*name_len = op_array->vars[var].name_len; *name_len = op_array->vars[var].name_len;
@ -5324,7 +5324,7 @@ void zend_resolve_goto_label(zend_op_array *op_array, zend_op *opline, int pass2
} }
/* }}} */ /* }}} */
void zend_do_goto(znode *label TSRMLS_DC) /* {{{ */ void zend_do_goto(const znode *label TSRMLS_DC) /* {{{ */
{ {
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
@ -5382,7 +5382,7 @@ void zend_do_build_namespace_name(znode *result, znode *prefix, znode *name TSRM
} }
/* }}} */ /* }}} */
void zend_do_namespace(znode *name TSRMLS_DC) /* {{{ */ void zend_do_namespace(const znode *name TSRMLS_DC) /* {{{ */
{ {
unsigned int lcname_len; unsigned int lcname_len;
zstr lcname; zstr lcname;

View File

@ -355,7 +355,7 @@ ZEND_API int lex_scan(zval *zendlval TSRMLS_DC);
void startup_scanner(TSRMLS_D); void startup_scanner(TSRMLS_D);
void shutdown_scanner(TSRMLS_D); void shutdown_scanner(TSRMLS_D);
ZEND_API char *zend_set_compiled_filename(char *new_compiled_filename TSRMLS_DC); ZEND_API char *zend_set_compiled_filename(const char *new_compiled_filename TSRMLS_DC);
ZEND_API void zend_restore_compiled_filename(char *original_compiled_filename TSRMLS_DC); ZEND_API void zend_restore_compiled_filename(char *original_compiled_filename TSRMLS_DC);
ZEND_API char *zend_get_compiled_filename(TSRMLS_D); ZEND_API char *zend_get_compiled_filename(TSRMLS_D);
ZEND_API int zend_get_compiled_lineno(TSRMLS_D); ZEND_API int zend_get_compiled_lineno(TSRMLS_D);
@ -364,7 +364,7 @@ ZEND_API char *zend_set_compiled_script_encoding(char *new_script_enc TSRMLS_DC)
ZEND_API void zend_restore_compiled_script_encoding(char *original_script_enc TSRMLS_DC); ZEND_API void zend_restore_compiled_script_encoding(char *original_script_enc TSRMLS_DC);
ZEND_API char *zend_get_compiled_script_encoding(TSRMLS_D); ZEND_API char *zend_get_compiled_script_encoding(TSRMLS_D);
ZEND_API zstr zend_get_compiled_variable_name(zend_op_array *op_array, zend_uint var, int* name_len); ZEND_API zstr zend_get_compiled_variable_name(const zend_op_array *op_array, zend_uint var, int* name_len);
ZEND_API int zend_prepare_scanner_converters(const char *onetime_encoding, int run_time TSRMLS_DC); ZEND_API int zend_prepare_scanner_converters(const char *onetime_encoding, int run_time TSRMLS_DC);
ZEND_API int zend_convert_scanner_output(UConverter *conv, UChar **target, int *target_len, const char *source, int source_len, UErrorCode *status TSRMLS_DC); ZEND_API int zend_convert_scanner_output(UConverter *conv, UChar **target, int *target_len, const char *source, int source_len, UErrorCode *status TSRMLS_DC);
@ -377,66 +377,66 @@ int zend_get_zendleng(TSRMLS_D);
/* parser-driven code generators */ /* parser-driven code generators */
void zend_do_binary_op(zend_uchar op, znode *result, znode *op1, znode *op2 TSRMLS_DC); void zend_do_binary_op(zend_uchar op, znode *result, const znode *op1, const znode *op2 TSRMLS_DC);
void zend_do_unary_op(zend_uchar op, znode *result, znode *op1 TSRMLS_DC); void zend_do_unary_op(zend_uchar op, znode *result, const znode *op1 TSRMLS_DC);
void zend_do_binary_assign_op(zend_uchar op, znode *result, znode *op1, znode *op2 TSRMLS_DC); void zend_do_binary_assign_op(zend_uchar op, znode *result, const znode *op1, const znode *op2 TSRMLS_DC);
void zend_do_assign(znode *result, znode *variable, znode *value TSRMLS_DC); void zend_do_assign(znode *result, znode *variable, const znode *value TSRMLS_DC);
void zend_do_assign_ref(znode *result, znode *lvar, znode *rvar TSRMLS_DC); void zend_do_assign_ref(znode *result, const znode *lvar, const znode *rvar TSRMLS_DC);
void fetch_simple_variable(znode *result, znode *varname, int bp TSRMLS_DC); void fetch_simple_variable(znode *result, znode *varname, int bp TSRMLS_DC);
void fetch_simple_variable_ex(znode *result, znode *varname, int bp, zend_uchar op TSRMLS_DC); void fetch_simple_variable_ex(znode *result, znode *varname, int bp, zend_uchar op TSRMLS_DC);
void zend_do_indirect_references(znode *result, znode *num_references, znode *variable TSRMLS_DC); void zend_do_indirect_references(znode *result, const znode *num_references, znode *variable TSRMLS_DC);
void zend_do_fetch_static_variable(znode *varname, znode *static_assignment, int fetch_type TSRMLS_DC); void zend_do_fetch_static_variable(znode *varname, const znode *static_assignment, int fetch_type TSRMLS_DC);
void zend_do_fetch_global_variable(znode *varname, znode *static_assignment, int fetch_type TSRMLS_DC); void zend_do_fetch_global_variable(znode *varname, const znode *static_assignment, int fetch_type TSRMLS_DC);
void fetch_array_begin(znode *result, znode *varname, znode *first_dim TSRMLS_DC); void fetch_array_begin(znode *result, znode *varname, znode *first_dim TSRMLS_DC);
void fetch_array_dim(znode *result, znode *parent, znode *dim TSRMLS_DC); void fetch_array_dim(znode *result, const znode *parent, const znode *dim TSRMLS_DC);
void fetch_string_offset(znode *result, znode *parent, znode *offset TSRMLS_DC); void fetch_string_offset(znode *result, const znode *parent, const znode *offset TSRMLS_DC);
void zend_do_fetch_static_member(znode *result, znode *class_znode TSRMLS_DC); void zend_do_fetch_static_member(znode *result, znode *class_znode TSRMLS_DC);
void zend_do_print(znode *result, znode *arg TSRMLS_DC); void zend_do_print(znode *result, const znode *arg TSRMLS_DC);
void zend_do_echo(znode *arg, zend_bool inline_html TSRMLS_DC); void zend_do_echo(const znode *arg, zend_bool inline_html TSRMLS_DC);
typedef int (*unary_op_type)(zval *, zval *); typedef int (*unary_op_type)(zval *, zval *);
ZEND_API unary_op_type get_unary_op(int opcode); ZEND_API unary_op_type get_unary_op(int opcode);
ZEND_API void *get_binary_op(int opcode); ZEND_API void *get_binary_op(int opcode);
void zend_do_while_cond(znode *expr, znode *close_bracket_token TSRMLS_DC); void zend_do_while_cond(const znode *expr, znode *close_bracket_token TSRMLS_DC);
void zend_do_while_end(znode *while_token, znode *close_bracket_token TSRMLS_DC); void zend_do_while_end(const znode *while_token, const znode *close_bracket_token TSRMLS_DC);
void zend_do_do_while_begin(TSRMLS_D); void zend_do_do_while_begin(TSRMLS_D);
void zend_do_do_while_end(znode *do_token, znode *expr_open_bracket, znode *expr TSRMLS_DC); void zend_do_do_while_end(const znode *do_token, const znode *expr_open_bracket, const znode *expr TSRMLS_DC);
void zend_do_if_cond(znode *cond, znode *closing_bracket_token TSRMLS_DC); void zend_do_if_cond(const znode *cond, znode *closing_bracket_token TSRMLS_DC);
void zend_do_if_after_statement(znode *closing_bracket_token, unsigned char initialize TSRMLS_DC); void zend_do_if_after_statement(const znode *closing_bracket_token, unsigned char initialize TSRMLS_DC);
void zend_do_if_end(TSRMLS_D); void zend_do_if_end(TSRMLS_D);
void zend_do_for_cond(znode *expr, znode *second_semicolon_token TSRMLS_DC); void zend_do_for_cond(const znode *expr, znode *second_semicolon_token TSRMLS_DC);
void zend_do_for_before_statement(znode *cond_start, znode *second_semicolon_token TSRMLS_DC); void zend_do_for_before_statement(const znode *cond_start, const znode *second_semicolon_token TSRMLS_DC);
void zend_do_for_end(znode *second_semicolon_token TSRMLS_DC); void zend_do_for_end(const znode *second_semicolon_token TSRMLS_DC);
void zend_do_pre_incdec(znode *result, znode *op1, zend_uchar op TSRMLS_DC); void zend_do_pre_incdec(znode *result, const znode *op1, zend_uchar op TSRMLS_DC);
void zend_do_post_incdec(znode *result, znode *op1, zend_uchar op TSRMLS_DC); void zend_do_post_incdec(znode *result, const znode *op1, zend_uchar op TSRMLS_DC);
void zend_do_begin_variable_parse(TSRMLS_D); void zend_do_begin_variable_parse(TSRMLS_D);
void zend_do_end_variable_parse(znode *variable, int type, int arg_offset TSRMLS_DC); void zend_do_end_variable_parse(znode *variable, int type, int arg_offset TSRMLS_DC);
void zend_check_writable_variable(znode *variable); void zend_check_writable_variable(const znode *variable);
void zend_do_free(znode *op1 TSRMLS_DC); void zend_do_free(znode *op1 TSRMLS_DC);
void zend_do_add_string(znode *result, znode *op1, znode *op2 TSRMLS_DC); void zend_do_add_string(znode *result, const znode *op1, znode *op2 TSRMLS_DC);
void zend_do_add_variable(znode *result, znode *op1, znode *op2 TSRMLS_DC); void zend_do_add_variable(znode *result, const znode *op1, const znode *op2 TSRMLS_DC);
int zend_do_verify_access_types(znode *current_access_type, znode *new_modifier); int zend_do_verify_access_types(const znode *current_access_type, const znode *new_modifier);
void zend_do_begin_function_declaration(znode *function_token, znode *function_name, int is_method, int return_reference, znode *fn_flags_znode TSRMLS_DC); void zend_do_begin_function_declaration(znode *function_token, znode *function_name, int is_method, int return_reference, znode *fn_flags_znode TSRMLS_DC);
void zend_do_end_function_declaration(znode *function_token TSRMLS_DC); void zend_do_end_function_declaration(const znode *function_token TSRMLS_DC);
void zend_do_receive_arg(zend_uchar op, znode *var, znode *offset, znode *initialization, znode *class_type, znode *varname, zend_bool pass_by_reference TSRMLS_DC); void zend_do_receive_arg(zend_uchar op, const znode *var, const znode *offset, const znode *initialization, znode *class_type, const znode *varname, zend_bool pass_by_reference TSRMLS_DC);
int zend_do_begin_function_call(znode *function_name, zend_bool check_namespace TSRMLS_DC); int zend_do_begin_function_call(znode *function_name, zend_bool check_namespace TSRMLS_DC);
void zend_do_begin_method_call(znode *left_bracket TSRMLS_DC); void zend_do_begin_method_call(znode *left_bracket TSRMLS_DC);
void zend_do_clone(znode *result, znode *expr TSRMLS_DC); void zend_do_clone(znode *result, const znode *expr TSRMLS_DC);
void zend_do_begin_dynamic_function_call(znode *function_name, int prefix_len TSRMLS_DC); void zend_do_begin_dynamic_function_call(znode *function_name, int prefix_len TSRMLS_DC);
void zend_do_fetch_class(znode *result, znode *class_name TSRMLS_DC); void zend_do_fetch_class(znode *result, znode *class_name TSRMLS_DC);
void zend_do_build_full_name(znode *result, znode *prefix, znode *name TSRMLS_DC); void zend_do_build_full_name(znode *result, znode *prefix, znode *name TSRMLS_DC);
int zend_do_begin_class_member_function_call(znode *class_name, znode *method_name TSRMLS_DC); int zend_do_begin_class_member_function_call(znode *class_name, znode *method_name TSRMLS_DC);
void zend_do_end_function_call(znode *function_name, znode *result, znode *argument_list, int is_method, int is_dynamic_fcall TSRMLS_DC); void zend_do_end_function_call(znode *function_name, znode *result, const znode *argument_list, int is_method, int is_dynamic_fcall TSRMLS_DC);
void zend_do_return(znode *expr, int do_end_vparse TSRMLS_DC); void zend_do_return(znode *expr, int do_end_vparse TSRMLS_DC);
void zend_do_handle_exception(TSRMLS_D); void zend_do_handle_exception(TSRMLS_D);
@ -444,94 +444,94 @@ void zend_do_begin_lambda_function_declaration(znode *result, znode *function_to
void zend_do_fetch_lexical_variable(znode *varname, zend_bool is_ref TSRMLS_DC); void zend_do_fetch_lexical_variable(znode *varname, zend_bool is_ref TSRMLS_DC);
void zend_do_try(znode *try_token TSRMLS_DC); void zend_do_try(znode *try_token TSRMLS_DC);
void zend_do_begin_catch(znode *try_token, znode *catch_class, znode *catch_var, znode *first_catch TSRMLS_DC); void zend_do_begin_catch(znode *try_token, znode *catch_class, const znode *catch_var, znode *first_catch TSRMLS_DC);
void zend_do_end_catch(znode *try_token TSRMLS_DC); void zend_do_end_catch(const znode *try_token TSRMLS_DC);
void zend_do_throw(znode *expr TSRMLS_DC); void zend_do_throw(const znode *expr TSRMLS_DC);
ZEND_API int do_bind_function(zend_op *opline, HashTable *function_table, zend_bool compile_time); ZEND_API int do_bind_function(zend_op *opline, HashTable *function_table, zend_bool compile_time);
ZEND_API zend_class_entry *do_bind_class(zend_op *opline, HashTable *class_table, zend_bool compile_time TSRMLS_DC); ZEND_API zend_class_entry *do_bind_class(const zend_op *opline, HashTable *class_table, zend_bool compile_time TSRMLS_DC);
ZEND_API zend_class_entry *do_bind_inherited_class(zend_op *opline, HashTable *class_table, zend_class_entry *parent_ce, zend_bool compile_time TSRMLS_DC); ZEND_API zend_class_entry *do_bind_inherited_class(const zend_op *opline, HashTable *class_table, zend_class_entry *parent_ce, zend_bool compile_time TSRMLS_DC);
ZEND_API void zend_do_inherit_interfaces(zend_class_entry *ce, zend_class_entry *iface TSRMLS_DC); ZEND_API void zend_do_inherit_interfaces(zend_class_entry *ce, const zend_class_entry *iface TSRMLS_DC);
ZEND_API void zend_do_implement_interface(zend_class_entry *ce, zend_class_entry *iface TSRMLS_DC); ZEND_API void zend_do_implement_interface(zend_class_entry *ce, zend_class_entry *iface TSRMLS_DC);
void zend_do_implements_interface(znode *interface_znode TSRMLS_DC); void zend_do_implements_interface(znode *interface_znode TSRMLS_DC);
ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce TSRMLS_DC); ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce TSRMLS_DC);
void zend_do_early_binding(TSRMLS_D); void zend_do_early_binding(TSRMLS_D);
ZEND_API void zend_do_delayed_early_binding(zend_op_array *op_array TSRMLS_DC); ZEND_API void zend_do_delayed_early_binding(const zend_op_array *op_array TSRMLS_DC);
void zend_do_pass_param(znode *param, zend_uchar op, int offset TSRMLS_DC); void zend_do_pass_param(znode *param, zend_uchar op, int offset TSRMLS_DC);
void zend_do_boolean_or_begin(znode *expr1, znode *op_token TSRMLS_DC); void zend_do_boolean_or_begin(znode *expr1, znode *op_token TSRMLS_DC);
void zend_do_boolean_or_end(znode *result, znode *expr1, znode *expr2, znode *op_token TSRMLS_DC); void zend_do_boolean_or_end(znode *result, const znode *expr1, const znode *expr2, znode *op_token TSRMLS_DC);
void zend_do_boolean_and_begin(znode *expr1, znode *op_token TSRMLS_DC); void zend_do_boolean_and_begin(znode *expr1, znode *op_token TSRMLS_DC);
void zend_do_boolean_and_end(znode *result, znode *expr1, znode *expr2, znode *op_token TSRMLS_DC); void zend_do_boolean_and_end(znode *result, const znode *expr1, const znode *expr2, const znode *op_token TSRMLS_DC);
void zend_do_brk_cont(zend_uchar op, znode *expr TSRMLS_DC); void zend_do_brk_cont(zend_uchar op, const znode *expr TSRMLS_DC);
void zend_do_switch_cond(znode *cond TSRMLS_DC); void zend_do_switch_cond(const znode *cond TSRMLS_DC);
void zend_do_switch_end(znode *case_list TSRMLS_DC); void zend_do_switch_end(const znode *case_list TSRMLS_DC);
void zend_do_case_before_statement(znode *case_list, znode *case_token, znode *case_expr TSRMLS_DC); void zend_do_case_before_statement(const znode *case_list, znode *case_token, const znode *case_expr TSRMLS_DC);
void zend_do_case_after_statement(znode *result, znode *case_token TSRMLS_DC); void zend_do_case_after_statement(znode *result, const znode *case_token TSRMLS_DC);
void zend_do_default_before_statement(znode *case_list, znode *default_token TSRMLS_DC); void zend_do_default_before_statement(const znode *case_list, znode *default_token TSRMLS_DC);
void zend_do_begin_class_declaration(znode *class_token, znode *class_name, znode *parent_class_name TSRMLS_DC); void zend_do_begin_class_declaration(const znode *class_token, znode *class_name, const znode *parent_class_name TSRMLS_DC);
void zend_do_end_class_declaration(znode *class_token, znode *parent_token TSRMLS_DC); void zend_do_end_class_declaration(const znode *class_token, const znode *parent_token TSRMLS_DC);
void zend_do_declare_property(znode *var_name, znode *value, zend_uint access_type TSRMLS_DC); void zend_do_declare_property(const znode *var_name, const znode *value, zend_uint access_type TSRMLS_DC);
void zend_do_halt_compiler_register(TSRMLS_D); void zend_do_halt_compiler_register(TSRMLS_D);
void zend_do_declare_implicit_property(TSRMLS_D); void zend_do_declare_implicit_property(TSRMLS_D);
void zend_do_declare_class_constant(znode *var_name, znode *value TSRMLS_DC); void zend_do_declare_class_constant(znode *var_name, const znode *value TSRMLS_DC);
void zend_do_fetch_property(znode *result, znode *object, znode *property TSRMLS_DC); void zend_do_fetch_property(znode *result, znode *object, const znode *property TSRMLS_DC);
void zend_do_push_object(znode *object TSRMLS_DC); void zend_do_push_object(const znode *object TSRMLS_DC);
void zend_do_pop_object(znode *object TSRMLS_DC); void zend_do_pop_object(znode *object TSRMLS_DC);
void zend_do_begin_new_object(znode *new_token, znode *class_type TSRMLS_DC); void zend_do_begin_new_object(znode *new_token, znode *class_type TSRMLS_DC);
void zend_do_end_new_object(znode *result, znode *new_token, znode *argument_list TSRMLS_DC); void zend_do_end_new_object(znode *result, const znode *new_token, const znode *argument_list TSRMLS_DC);
void zend_do_fetch_constant(znode *result, znode *constant_container, znode *constant_name, int mode, zend_bool check_namespace TSRMLS_DC); void zend_do_fetch_constant(znode *result, znode *constant_container, znode *constant_name, int mode, zend_bool check_namespace TSRMLS_DC);
void zend_do_shell_exec(znode *result, znode *cmd TSRMLS_DC); void zend_do_shell_exec(znode *result, const znode *cmd TSRMLS_DC);
void zend_do_init_array(znode *result, znode *expr, znode *offset, zend_bool is_ref TSRMLS_DC); void zend_do_init_array(znode *result, const znode *expr, const znode *offset, zend_bool is_ref TSRMLS_DC);
void zend_do_add_array_element(znode *result, znode *expr, znode *offset, zend_bool is_ref TSRMLS_DC); void zend_do_add_array_element(znode *result, const znode *expr, const znode *offset, zend_bool is_ref TSRMLS_DC);
void zend_do_add_static_array_element(znode *result, znode *offset, znode *expr); void zend_do_add_static_array_element(znode *result, znode *offset, const znode *expr);
void zend_do_list_init(TSRMLS_D); void zend_do_list_init(TSRMLS_D);
void zend_do_list_end(znode *result, znode *expr TSRMLS_DC); void zend_do_list_end(znode *result, znode *expr TSRMLS_DC);
void zend_do_add_list_element(znode *element TSRMLS_DC); void zend_do_add_list_element(const znode *element TSRMLS_DC);
void zend_do_new_list_begin(TSRMLS_D); void zend_do_new_list_begin(TSRMLS_D);
void zend_do_new_list_end(TSRMLS_D); void zend_do_new_list_end(TSRMLS_D);
void zend_do_cast(znode *result, znode *expr, int type TSRMLS_DC); void zend_do_cast(znode *result, const znode *expr, int type TSRMLS_DC);
void zend_do_include_or_eval(int type, znode *result, znode *op1 TSRMLS_DC); void zend_do_include_or_eval(int type, znode *result, const znode *op1 TSRMLS_DC);
void zend_do_unset(znode *variable TSRMLS_DC); void zend_do_unset(const znode *variable TSRMLS_DC);
void zend_do_isset_or_isempty(int type, znode *result, znode *variable TSRMLS_DC); void zend_do_isset_or_isempty(int type, znode *result, znode *variable TSRMLS_DC);
void zend_do_instanceof(znode *result, znode *expr, znode *class_znode, int type TSRMLS_DC); void zend_do_instanceof(znode *result, const znode *expr, const znode *class_znode, int type TSRMLS_DC);
void zend_do_foreach_begin(znode *foreach_token, znode *open_brackets_token, znode *array, znode *as_token, int variable TSRMLS_DC); void zend_do_foreach_begin(znode *foreach_token, znode *open_brackets_token, znode *array, znode *as_token, int variable TSRMLS_DC);
void zend_do_foreach_cont(znode *foreach_token, znode *open_brackets_token, znode *as_token, znode *value, znode *key TSRMLS_DC); void zend_do_foreach_cont(znode *foreach_token, const znode *open_brackets_token, const znode *as_token, znode *value, znode *key TSRMLS_DC);
void zend_do_foreach_end(znode *foreach_token, znode *as_token TSRMLS_DC); void zend_do_foreach_end(const znode *foreach_token, const znode *as_token TSRMLS_DC);
void zend_do_declare_begin(TSRMLS_D); void zend_do_declare_begin(TSRMLS_D);
void zend_do_declare_stmt(znode *var, znode *val TSRMLS_DC); void zend_do_declare_stmt(znode *var, znode *val TSRMLS_DC);
void zend_do_declare_end(znode *declare_token TSRMLS_DC); void zend_do_declare_end(const znode *declare_token TSRMLS_DC);
void zend_do_exit(znode *result, znode *message TSRMLS_DC); void zend_do_exit(znode *result, const znode *message TSRMLS_DC);
void zend_do_begin_silence(znode *strudel_token TSRMLS_DC); void zend_do_begin_silence(znode *strudel_token TSRMLS_DC);
void zend_do_end_silence(znode *strudel_token TSRMLS_DC); void zend_do_end_silence(const znode *strudel_token TSRMLS_DC);
void zend_do_jmp_set(znode *value, znode *jmp_token, znode *colon_token TSRMLS_DC); void zend_do_jmp_set(const znode *value, znode *jmp_token, znode *colon_token TSRMLS_DC);
void zend_do_jmp_set_else(znode *result, znode *false_value, znode *jmp_token, znode *colon_token TSRMLS_DC); void zend_do_jmp_set_else(znode *result, const znode *false_value, const znode *jmp_token, const znode *colon_token TSRMLS_DC);
void zend_do_begin_qm_op(znode *cond, znode *qm_token TSRMLS_DC); void zend_do_begin_qm_op(const znode *cond, znode *qm_token TSRMLS_DC);
void zend_do_qm_true(znode *true_value, znode *qm_token, znode *colon_token TSRMLS_DC); void zend_do_qm_true(const znode *true_value, znode *qm_token, znode *colon_token TSRMLS_DC);
void zend_do_qm_false(znode *result, znode *false_value, znode *qm_token, znode *colon_token TSRMLS_DC); void zend_do_qm_false(znode *result, const znode *false_value, const znode *qm_token, const znode *colon_token TSRMLS_DC);
void zend_do_extended_info(TSRMLS_D); void zend_do_extended_info(TSRMLS_D);
void zend_do_extended_fcall_begin(TSRMLS_D); void zend_do_extended_fcall_begin(TSRMLS_D);
@ -539,11 +539,11 @@ void zend_do_extended_fcall_end(TSRMLS_D);
void zend_do_ticks(TSRMLS_D); void zend_do_ticks(TSRMLS_D);
void zend_do_abstract_method(znode *function_name, znode *modifiers, znode *body TSRMLS_DC); void zend_do_abstract_method(const znode *function_name, znode *modifiers, const znode *body TSRMLS_DC);
void zend_do_declare_constant(znode *name, znode *value TSRMLS_DC); void zend_do_declare_constant(znode *name, znode *value TSRMLS_DC);
void zend_do_build_namespace_name(znode *result, znode *prefix, znode *name TSRMLS_DC); void zend_do_build_namespace_name(znode *result, znode *prefix, znode *name TSRMLS_DC);
void zend_do_namespace(znode *name TSRMLS_DC); void zend_do_namespace(const znode *name TSRMLS_DC);
void zend_do_use(znode *name, znode *new_name, int is_global TSRMLS_DC); void zend_do_use(znode *name, znode *new_name, int is_global TSRMLS_DC);
void zend_do_end_compilation(TSRMLS_D); void zend_do_end_compilation(TSRMLS_D);
@ -552,7 +552,7 @@ ZEND_API void function_add_ref(zend_function *function TSRMLS_DC);
void zend_do_normalization(znode *result, znode *str TSRMLS_DC); void zend_do_normalization(znode *result, znode *str TSRMLS_DC);
void zend_do_label(znode *label TSRMLS_DC); void zend_do_label(znode *label TSRMLS_DC);
void zend_do_goto(znode *label TSRMLS_DC); void zend_do_goto(const znode *label TSRMLS_DC);
void zend_resolve_goto_label(zend_op_array *op_array, zend_op *opline, int pass2 TSRMLS_DC); void zend_resolve_goto_label(zend_op_array *op_array, zend_op *opline, int pass2 TSRMLS_DC);
void zend_release_labels(TSRMLS_D); void zend_release_labels(TSRMLS_D);
@ -579,10 +579,10 @@ ZEND_API void zend_u_function_dtor(zend_function *function);
ZEND_API void destroy_zend_class(zend_class_entry **pce); ZEND_API void destroy_zend_class(zend_class_entry **pce);
void zend_class_add_ref(zend_class_entry **ce); void zend_class_add_ref(zend_class_entry **ce);
ZEND_API void zend_mangle_property_name(char **dest, int *dest_length, char *src1, int src1_length, char *src2, int src2_length, int internal); ZEND_API void zend_mangle_property_name(char **dest, int *dest_length, const char *src1, int src1_length, const char *src2, int src2_length, int internal);
ZEND_API int zend_unmangle_property_name(char *mangled_property, int len, char **class_name, char **prop_name); ZEND_API int zend_unmangle_property_name(char *mangled_property, int len, char **class_name, char **prop_name);
ZEND_API void zend_u_mangle_property_name(zstr *dest, int *dest_length, zend_uchar type, zstr src1, int src1_length, zstr src2, int src2_length, int internal); ZEND_API void zend_u_mangle_property_name(zstr *dest, int *dest_length, zend_uchar type, const zstr src1, int src1_length, const zstr src2, int src2_length, int internal);
ZEND_API int zend_u_unmangle_property_name(zend_uchar type, zstr mangled_property, int len, zstr *class_name, zstr *prop_name); ZEND_API int zend_u_unmangle_property_name(zend_uchar type, zstr mangled_property, int len, zstr *class_name, zstr *prop_name);
@ -598,10 +598,10 @@ void print_op_array(zend_op_array *op_array, int optimizations);
int pass_two(zend_op_array *op_array TSRMLS_DC); int pass_two(zend_op_array *op_array TSRMLS_DC);
zend_brk_cont_element *get_next_brk_cont_element(zend_op_array *op_array); zend_brk_cont_element *get_next_brk_cont_element(zend_op_array *op_array);
void zend_do_first_catch(znode *open_parentheses TSRMLS_DC); void zend_do_first_catch(znode *open_parentheses TSRMLS_DC);
void zend_initialize_try_catch_element(znode *try_token TSRMLS_DC); void zend_initialize_try_catch_element(const znode *try_token TSRMLS_DC);
void zend_do_mark_last_catch(znode *first_catch, znode *last_additional_catch TSRMLS_DC); void zend_do_mark_last_catch(const znode *first_catch, const znode *last_additional_catch TSRMLS_DC);
ZEND_API zend_bool zend_is_compiling(TSRMLS_D); ZEND_API zend_bool zend_is_compiling(TSRMLS_D);
ZEND_API char *zend_make_compiled_string_description(char *name TSRMLS_DC); ZEND_API char *zend_make_compiled_string_description(const char *name TSRMLS_DC);
ZEND_API void zend_initialize_class_data(zend_class_entry *ce, zend_bool nullify_handlers TSRMLS_DC); ZEND_API void zend_initialize_class_data(zend_class_entry *ce, zend_bool nullify_handlers TSRMLS_DC);
int zend_get_class_fetch_type(zend_uchar type, zstr class_name, uint class_name_len); int zend_get_class_fetch_type(zend_uchar type, zstr class_name, uint class_name_len);
@ -616,12 +616,12 @@ typedef struct _zend_auto_global {
} zend_auto_global; } zend_auto_global;
void zend_auto_global_dtor(zend_auto_global *auto_global); void zend_auto_global_dtor(zend_auto_global *auto_global);
ZEND_API int zend_register_auto_global(char *name, uint name_len, zend_auto_global_callback auto_global_callback TSRMLS_DC); ZEND_API int zend_register_auto_global(const char *name, uint name_len, zend_auto_global_callback auto_global_callback TSRMLS_DC);
ZEND_API int zend_register_auto_global_ex(char *name, uint name_len, zend_auto_global_callback auto_global_callback, zend_bool runtime TSRMLS_DC); ZEND_API int zend_register_auto_global_ex(const char *name, uint name_len, zend_auto_global_callback auto_global_callback, zend_bool runtime TSRMLS_DC);
ZEND_API zend_bool zend_is_auto_global(char *name, uint name_len TSRMLS_DC); ZEND_API zend_bool zend_is_auto_global(const char *name, uint name_len TSRMLS_DC);
ZEND_API zend_bool zend_u_is_auto_global(zend_uchar type, zstr name, uint name_len TSRMLS_DC); ZEND_API zend_bool zend_u_is_auto_global(zend_uchar type, zstr name, uint name_len TSRMLS_DC);
ZEND_API zend_bool zend_u_is_auto_global_ex(zend_uchar type, zstr name, uint name_len, zend_bool runtime, zend_auto_global **ret TSRMLS_DC); ZEND_API zend_bool zend_u_is_auto_global_ex(zend_uchar type, zstr name, uint name_len, zend_bool runtime, zend_auto_global **ret TSRMLS_DC);
ZEND_API int zend_auto_global_disable_jit(char *varname, zend_uint varname_length TSRMLS_DC); ZEND_API int zend_auto_global_disable_jit(const char *varname, zend_uint varname_length TSRMLS_DC);
ZEND_API size_t zend_dirname(char *path, size_t len); ZEND_API size_t zend_dirname(char *path, size_t len);
ZEND_API size_t zend_u_dirname(UChar *path, size_t len); ZEND_API size_t zend_u_dirname(UChar *path, size_t len);

View File

@ -57,19 +57,19 @@ void zend_copy_constants(HashTable *target, HashTable *source) /* {{{ */
} }
/* }}} */ /* }}} */
static int clean_non_persistent_constant(zend_constant *c TSRMLS_DC) /* {{{ */ static int clean_non_persistent_constant(const zend_constant *c TSRMLS_DC) /* {{{ */
{ {
return (c->flags & CONST_PERSISTENT) ? ZEND_HASH_APPLY_STOP : ZEND_HASH_APPLY_REMOVE; return (c->flags & CONST_PERSISTENT) ? ZEND_HASH_APPLY_STOP : ZEND_HASH_APPLY_REMOVE;
} }
/* }}} */ /* }}} */
static int clean_non_persistent_constant_full(zend_constant *c TSRMLS_DC) /* {{{ */ static int clean_non_persistent_constant_full(const zend_constant *c TSRMLS_DC) /* {{{ */
{ {
return (c->flags & CONST_PERSISTENT) ? 0 : 1; return (c->flags & CONST_PERSISTENT) ? 0 : 1;
} }
/* }}} */ /* }}} */
static int clean_module_constant(zend_constant *c, int *module_number TSRMLS_DC) /* {{{ */ static int clean_module_constant(const zend_constant *c, int *module_number TSRMLS_DC) /* {{{ */
{ {
if (c->module_number == *module_number) { if (c->module_number == *module_number) {
return 1; return 1;
@ -188,7 +188,7 @@ void clean_non_persistent_constants(TSRMLS_D) /* {{{ */
} }
/* }}} */ /* }}} */
ZEND_API void zend_register_long_constant(char *name, uint name_len, long lval, int flags, int module_number TSRMLS_DC) /* {{{ */ ZEND_API void zend_register_long_constant(const char *name, uint name_len, long lval, int flags, int module_number TSRMLS_DC) /* {{{ */
{ {
zend_constant c; zend_constant c;
@ -208,7 +208,7 @@ ZEND_API void zend_register_long_constant(char *name, uint name_len, long lval,
} }
/* }}} */ /* }}} */
ZEND_API void zend_register_double_constant(char *name, uint name_len, double dval, int flags, int module_number TSRMLS_DC) /* {{{ */ ZEND_API void zend_register_double_constant(const char *name, uint name_len, double dval, int flags, int module_number TSRMLS_DC) /* {{{ */
{ {
zend_constant c; zend_constant c;
@ -228,7 +228,7 @@ ZEND_API void zend_register_double_constant(char *name, uint name_len, double dv
} }
/* }}} */ /* }}} */
ZEND_API void zend_register_stringl_constant(char *name, uint name_len, char *strval, uint strlen, int flags, int module_number TSRMLS_DC) /* {{{ */ ZEND_API void zend_register_stringl_constant(const char *name, uint name_len, char *strval, uint strlen, int flags, int module_number TSRMLS_DC) /* {{{ */
{ {
zend_constant c; zend_constant c;
@ -260,7 +260,7 @@ ZEND_API void zend_register_stringl_constant(char *name, uint name_len, char *st
} }
/* }}} */ /* }}} */
ZEND_API void zend_register_string_constant(char *name, uint name_len, char *strval, int flags, int module_number TSRMLS_DC) /* {{{ */ ZEND_API void zend_register_string_constant(const char *name, uint name_len, char *strval, int flags, int module_number TSRMLS_DC) /* {{{ */
{ {
zend_register_stringl_constant(name, name_len, strval, strlen(strval), flags, module_number TSRMLS_CC); zend_register_stringl_constant(name, name_len, strval, strlen(strval), flags, module_number TSRMLS_CC);
} }
@ -483,7 +483,7 @@ ZEND_API int zend_u_get_constant_ex(zend_uchar type, zstr name, uint name_len, z
} }
/* }}} */ /* }}} */
ZEND_API int zend_get_constant(char *name, uint name_len, zval *result TSRMLS_DC) /* {{{ */ ZEND_API int zend_get_constant(const char *name, uint name_len, zval *result TSRMLS_DC) /* {{{ */
{ {
return zend_u_get_constant_ex(IS_STRING, ZSTR(name), name_len, result, NULL, 0 TSRMLS_CC); return zend_u_get_constant_ex(IS_STRING, ZSTR(name), name_len, result, NULL, 0 TSRMLS_CC);
} }

View File

@ -60,13 +60,13 @@ int zend_startup_constants(TSRMLS_D);
int zend_shutdown_constants(TSRMLS_D); int zend_shutdown_constants(TSRMLS_D);
void zend_register_standard_constants(TSRMLS_D); void zend_register_standard_constants(TSRMLS_D);
void clean_non_persistent_constants(TSRMLS_D); void clean_non_persistent_constants(TSRMLS_D);
ZEND_API int zend_get_constant(char *name, uint name_len, zval *result TSRMLS_DC); ZEND_API int zend_get_constant(const char *name, uint name_len, zval *result TSRMLS_DC);
ZEND_API int zend_u_get_constant(zend_uchar type, zstr name, uint name_len, zval *result TSRMLS_DC); ZEND_API int zend_u_get_constant(zend_uchar type, zstr name, uint name_len, zval *result TSRMLS_DC);
ZEND_API int zend_u_get_constant_ex(zend_uchar type, zstr name, uint name_len, zval *result, zend_class_entry *scope, ulong flags TSRMLS_DC); ZEND_API int zend_u_get_constant_ex(zend_uchar type, zstr name, uint name_len, zval *result, zend_class_entry *scope, ulong flags TSRMLS_DC);
ZEND_API void zend_register_long_constant(char *name, uint name_len, long lval, int flags, int module_number TSRMLS_DC); ZEND_API void zend_register_long_constant(const char *name, uint name_len, long lval, int flags, int module_number TSRMLS_DC);
ZEND_API void zend_register_double_constant(char *name, uint name_len, double dval, int flags, int module_number TSRMLS_DC); ZEND_API void zend_register_double_constant(const char *name, uint name_len, double dval, int flags, int module_number TSRMLS_DC);
ZEND_API void zend_register_string_constant(char *name, uint name_len, char *strval, int flags, int module_number TSRMLS_DC); ZEND_API void zend_register_string_constant(const char *name, uint name_len, char *strval, int flags, int module_number TSRMLS_DC);
ZEND_API void zend_register_stringl_constant(char *name, uint name_len, char *strval, uint strlen, int flags, int module_number TSRMLS_DC); ZEND_API void zend_register_stringl_constant(const char *name, uint name_len, char *strval, uint strlen, int flags, int module_number TSRMLS_DC);
ZEND_API int zend_register_constant(zend_constant *c TSRMLS_DC); ZEND_API int zend_register_constant(zend_constant *c TSRMLS_DC);
ZEND_API int zend_u_register_constant(zend_uchar type, zend_constant *c TSRMLS_DC); ZEND_API int zend_u_register_constant(zend_uchar type, zend_constant *c TSRMLS_DC);
void zend_copy_constants(HashTable *target, HashTable *sourc); void zend_copy_constants(HashTable *target, HashTable *sourc);

View File

@ -55,9 +55,9 @@ typedef int (*incdec_t)(zval *);
#define get_obj_zval_ptr_ptr(node, Ts, should_free, type) _get_obj_zval_ptr_ptr(node, Ts, should_free, type TSRMLS_CC) #define get_obj_zval_ptr_ptr(node, Ts, should_free, type) _get_obj_zval_ptr_ptr(node, Ts, should_free, type TSRMLS_CC)
/* Prototypes */ /* Prototypes */
static void zend_extension_statement_handler(zend_extension *extension, zend_op_array *op_array TSRMLS_DC); static void zend_extension_statement_handler(const zend_extension *extension, zend_op_array *op_array TSRMLS_DC);
static void zend_extension_fcall_begin_handler(zend_extension *extension, zend_op_array *op_array TSRMLS_DC); static void zend_extension_fcall_begin_handler(const zend_extension *extension, zend_op_array *op_array TSRMLS_DC);
static void zend_extension_fcall_end_handler(zend_extension *extension, zend_op_array *op_array TSRMLS_DC); static void zend_extension_fcall_end_handler(const zend_extension *extension, zend_op_array *op_array TSRMLS_DC);
#define RETURN_VALUE_USED(opline) (!((opline)->result.u.EA.type & EXT_TYPE_UNUSED)) #define RETURN_VALUE_USED(opline) (!((opline)->result.u.EA.type & EXT_TYPE_UNUSED))
@ -172,19 +172,19 @@ static inline void zend_pzval_unlock_free_func(zval *z) /* {{{ */
#define DECODE_CTOR(ce) \ #define DECODE_CTOR(ce) \
((zend_class_entry*)(((zend_uintptr_t)(ce)) & ~(CTOR_CALL_BIT|CTOR_USED_BIT))) ((zend_class_entry*)(((zend_uintptr_t)(ce)) & ~(CTOR_CALL_BIT|CTOR_USED_BIT)))
ZEND_API zval** zend_get_compiled_variable_value(zend_execute_data *execute_data_ptr, zend_uint var) /* {{{ */ ZEND_API zval** zend_get_compiled_variable_value(const zend_execute_data *execute_data_ptr, zend_uint var) /* {{{ */
{ {
return execute_data_ptr->CVs[var]; return execute_data_ptr->CVs[var];
} }
/* }}} */ /* }}} */
static inline zval *_get_zval_ptr_tmp(znode *node, temp_variable *Ts, zend_free_op *should_free TSRMLS_DC) /* {{{ */ static inline zval *_get_zval_ptr_tmp(const znode *node, const temp_variable *Ts, zend_free_op *should_free TSRMLS_DC) /* {{{ */
{ {
return should_free->var = &T(node->u.var).tmp_var; return should_free->var = &T(node->u.var).tmp_var;
} }
/* }}} */ /* }}} */
static inline zval *_get_zval_ptr_var(znode *node, temp_variable *Ts, zend_free_op *should_free TSRMLS_DC) /* {{{ */ static inline zval *_get_zval_ptr_var(const znode *node, const temp_variable *Ts, zend_free_op *should_free TSRMLS_DC) /* {{{ */
{ {
if (T(node->u.var).var.ptr) { if (T(node->u.var).var.ptr) {
PZVAL_UNLOCK(T(node->u.var).var.ptr, should_free); PZVAL_UNLOCK(T(node->u.var).var.ptr, should_free);
@ -234,7 +234,7 @@ static inline zval *_get_zval_ptr_var(znode *node, temp_variable *Ts, zend_free_
} }
/* }}} */ /* }}} */
static inline zval *_get_zval_ptr_cv(znode *node, temp_variable *Ts, int type TSRMLS_DC) /* {{{ */ static inline zval *_get_zval_ptr_cv(const znode *node, const temp_variable *Ts, int type TSRMLS_DC) /* {{{ */
{ {
zval ***ptr = &CV_OF(node->u.var); zval ***ptr = &CV_OF(node->u.var);
@ -271,7 +271,7 @@ static inline zval *_get_zval_ptr_cv(znode *node, temp_variable *Ts, int type TS
} }
/* }}} */ /* }}} */
static inline zval *_get_zval_ptr(znode *node, temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC) /* {{{ */ static inline zval *_get_zval_ptr(znode *node, const temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC) /* {{{ */
{ {
/* should_free->is_var = 0; */ /* should_free->is_var = 0; */
switch (node->op_type) { switch (node->op_type) {
@ -300,7 +300,7 @@ static inline zval *_get_zval_ptr(znode *node, temp_variable *Ts, zend_free_op *
} }
/* }}} */ /* }}} */
static inline zval **_get_zval_ptr_ptr_var(znode *node, temp_variable *Ts, zend_free_op *should_free TSRMLS_DC) /* {{{ */ static inline zval **_get_zval_ptr_ptr_var(const znode *node, const temp_variable *Ts, zend_free_op *should_free TSRMLS_DC) /* {{{ */
{ {
zval** ptr_ptr = T(node->u.var).var.ptr_ptr; zval** ptr_ptr = T(node->u.var).var.ptr_ptr;
@ -314,7 +314,7 @@ static inline zval **_get_zval_ptr_ptr_var(znode *node, temp_variable *Ts, zend_
} }
/* }}} */ /* }}} */
static inline zval **_get_zval_ptr_ptr_cv(znode *node, temp_variable *Ts, int type TSRMLS_DC) /* {{{ */ static inline zval **_get_zval_ptr_ptr_cv(const znode *node, const temp_variable *Ts, int type TSRMLS_DC) /* {{{ */
{ {
zval ***ptr = &CV_OF(node->u.var); zval ***ptr = &CV_OF(node->u.var);
@ -351,7 +351,7 @@ static inline zval **_get_zval_ptr_ptr_cv(znode *node, temp_variable *Ts, int ty
} }
/* }}} */ /* }}} */
static inline zval **_get_zval_ptr_ptr(znode *node, temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC) /* {{{ */ static inline zval **_get_zval_ptr_ptr(const znode *node, const temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC) /* {{{ */
{ {
if (node->op_type == IS_CV) { if (node->op_type == IS_CV) {
should_free->var = 0; should_free->var = 0;
@ -376,7 +376,7 @@ static inline zval *_get_obj_zval_ptr_unused(TSRMLS_D) /* {{{ */
} }
/* }}} */ /* }}} */
static inline zval **_get_obj_zval_ptr_ptr(znode *op, temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC) /* {{{ */ static inline zval **_get_obj_zval_ptr_ptr(const znode *op, const temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC) /* {{{ */
{ {
if (op->op_type == IS_UNUSED) { if (op->op_type == IS_UNUSED) {
if (EXPECTED(EG(This) != NULL)) { if (EXPECTED(EG(This) != NULL)) {
@ -403,7 +403,7 @@ static inline zval **_get_obj_zval_ptr_ptr_unused(TSRMLS_D) /* {{{ */
} }
/* }}} */ /* }}} */
static inline zval *_get_obj_zval_ptr(znode *op, temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC) /* {{{ */ static inline zval *_get_obj_zval_ptr(znode *op, const temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC) /* {{{ */
{ {
if (op->op_type == IS_UNUSED) { if (op->op_type == IS_UNUSED) {
if (EXPECTED(EG(This) != NULL)) { if (EXPECTED(EG(This) != NULL)) {
@ -506,7 +506,7 @@ static inline char * zend_verify_arg_class_kind(zend_arg_info *cur_arg_info, ulo
} }
/* }}} */ /* }}} */
static inline int zend_verify_arg_error(zend_function *zf, zend_uint arg_num, zend_arg_info *cur_arg_info, char *need_msg, zstr need_kind, char *given_msg, zstr given_kind TSRMLS_DC) /* {{{ */ static inline int zend_verify_arg_error(const zend_function *zf, zend_uint arg_num, const zend_arg_info *cur_arg_info, char *need_msg, zstr need_kind, const char *given_msg, zstr given_kind TSRMLS_DC) /* {{{ */
{ {
zend_execute_data *ptr = EG(current_execute_data)->prev_execute_data; zend_execute_data *ptr = EG(current_execute_data)->prev_execute_data;
zstr fname = zf->common.function_name; zstr fname = zf->common.function_name;
@ -570,7 +570,7 @@ static inline int zend_verify_arg_type(zend_function *zf, zend_uint arg_num, zva
} }
/* }}} */ /* }}} */
static inline void zend_assign_to_object(znode *result, zval **object_ptr, zval *property_name, znode *value_op, temp_variable *Ts, int opcode TSRMLS_DC) /* {{{ */ static inline void zend_assign_to_object(znode *result, zval **object_ptr, zval *property_name, znode *value_op, const temp_variable *Ts, int opcode TSRMLS_DC) /* {{{ */
{ {
zval *object; zval *object;
zend_free_op free_value; zend_free_op free_value;
@ -661,7 +661,7 @@ static inline void zend_assign_to_object(znode *result, zval **object_ptr, zval
} }
/* }}} */ /* }}} */
static inline int zend_assign_to_string_offset(temp_variable *T, zval *value, int value_type TSRMLS_DC) /* {{{ */ static inline int zend_assign_to_string_offset(const temp_variable *T, const zval *value, int value_type TSRMLS_DC) /* {{{ */
{ {
if (UG(unicode) && Z_TYPE_P(T->str_offset.str) == IS_STRING && Z_TYPE_P(value) != IS_STRING) { if (UG(unicode) && Z_TYPE_P(T->str_offset.str) == IS_STRING && Z_TYPE_P(value) != IS_STRING) {
convert_to_unicode(T->str_offset.str); convert_to_unicode(T->str_offset.str);
@ -828,7 +828,7 @@ static inline zval* zend_assign_to_variable(zval **variable_ptr_ptr, zval *value
/* }}} */ /* }}} */
/* Utility Functions for Extensions */ /* Utility Functions for Extensions */
static void zend_extension_statement_handler(zend_extension *extension, zend_op_array *op_array TSRMLS_DC) /* {{{ */ static void zend_extension_statement_handler(const zend_extension *extension, zend_op_array *op_array TSRMLS_DC) /* {{{ */
{ {
if (extension->statement_handler) { if (extension->statement_handler) {
extension->statement_handler(op_array); extension->statement_handler(op_array);
@ -836,7 +836,7 @@ static void zend_extension_statement_handler(zend_extension *extension, zend_op_
} }
/* }}} */ /* }}} */
static void zend_extension_fcall_begin_handler(zend_extension *extension, zend_op_array *op_array TSRMLS_DC) /* {{{ */ static void zend_extension_fcall_begin_handler(const zend_extension *extension, zend_op_array *op_array TSRMLS_DC) /* {{{ */
{ {
if (extension->fcall_begin_handler) { if (extension->fcall_begin_handler) {
extension->fcall_begin_handler(op_array); extension->fcall_begin_handler(op_array);
@ -844,7 +844,7 @@ static void zend_extension_fcall_begin_handler(zend_extension *extension, zend_o
} }
/* }}} */ /* }}} */
static void zend_extension_fcall_end_handler(zend_extension *extension, zend_op_array *op_array TSRMLS_DC) /* {{{ */ static void zend_extension_fcall_end_handler(const zend_extension *extension, zend_op_array *op_array TSRMLS_DC) /* {{{ */
{ {
if (extension->fcall_end_handler) { if (extension->fcall_end_handler) {
extension->fcall_end_handler(op_array); extension->fcall_end_handler(op_array);
@ -852,7 +852,7 @@ static void zend_extension_fcall_end_handler(zend_extension *extension, zend_op_
} }
/* }}} */ /* }}} */
static inline HashTable *zend_get_target_symbol_table(zend_op *opline, temp_variable *Ts, int type, zval *variable TSRMLS_DC) /* {{{ */ static inline HashTable *zend_get_target_symbol_table(const zend_op *opline, const temp_variable *Ts, int type, const zval *variable TSRMLS_DC) /* {{{ */
{ {
switch (opline->op2.u.EA.type) { switch (opline->op2.u.EA.type) {
case ZEND_FETCH_LOCAL: case ZEND_FETCH_LOCAL:
@ -879,7 +879,7 @@ static inline HashTable *zend_get_target_symbol_table(zend_op *opline, temp_vari
} }
/* }}} */ /* }}} */
static inline zval **zend_fetch_dimension_address_inner(HashTable *ht, zval *dim, int type TSRMLS_DC) /* {{{ */ static inline zval **zend_fetch_dimension_address_inner(HashTable *ht, const zval *dim, int type TSRMLS_DC) /* {{{ */
{ {
zval **retval; zval **retval;
zstr offset_key; zstr offset_key;
@ -1325,7 +1325,7 @@ static void zend_fetch_property_address(temp_variable *result, zval **container_
} }
/* }}} */ /* }}} */
static inline zend_brk_cont_element* zend_brk_cont(int nest_levels, int array_offset, zend_op_array *op_array, temp_variable *Ts TSRMLS_DC) /* {{{ */ static inline zend_brk_cont_element* zend_brk_cont(int nest_levels, int array_offset, const zend_op_array *op_array, const temp_variable *Ts TSRMLS_DC) /* {{{ */
{ {
int original_nest_levels; int original_nest_levels;
zend_brk_cont_element *jmp_to; zend_brk_cont_element *jmp_to;
@ -1433,12 +1433,12 @@ ZEND_API user_opcode_handler_t zend_get_user_opcode_handler(zend_uchar opcode) /
} }
/* }}} */ /* }}} */
ZEND_API zval *zend_get_zval_ptr(znode *node, temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC) { /* {{{ */ ZEND_API zval *zend_get_zval_ptr(znode *node, const temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC) { /* {{{ */
return get_zval_ptr(node, Ts, should_free, type); return get_zval_ptr(node, Ts, should_free, type);
} }
/* }}} */ /* }}} */
ZEND_API zval **zend_get_zval_ptr_ptr(znode *node, temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC) { /* {{{ */ ZEND_API zval **zend_get_zval_ptr_ptr(const znode *node, const temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC) { /* {{{ */
return get_zval_ptr_ptr(node, Ts, should_free, type); return get_zval_ptr_ptr(node, Ts, should_free, type);
} }
/* }}} */ /* }}} */

View File

@ -341,7 +341,7 @@ void zend_shutdown_timeout_thread(void);
*/ */
#define Z_OBJ_CLASS_NAME_P(zval) ((zval) && Z_TYPE_P(zval) == IS_OBJECT && Z_OBJ_HT_P(zval)->get_class_entry != NULL && Z_OBJ_HT_P(zval)->get_class_entry(zval TSRMLS_CC) ? Z_OBJ_HT_P(zval)->get_class_entry(zval TSRMLS_CC)->name : EMPTY_ZSTR) #define Z_OBJ_CLASS_NAME_P(zval) ((zval) && Z_TYPE_P(zval) == IS_OBJECT && Z_OBJ_HT_P(zval)->get_class_entry != NULL && Z_OBJ_HT_P(zval)->get_class_entry(zval TSRMLS_CC) ? Z_OBJ_HT_P(zval)->get_class_entry(zval TSRMLS_CC)->name : EMPTY_ZSTR)
ZEND_API zval** zend_get_compiled_variable_value(zend_execute_data *execute_data_ptr, zend_uint var); ZEND_API zval** zend_get_compiled_variable_value(const zend_execute_data *execute_data_ptr, zend_uint var);
void init_unicode_strings(void); void init_unicode_strings(void);
@ -360,8 +360,8 @@ typedef struct _zend_free_op {
/* int is_var; */ /* int is_var; */
} zend_free_op; } zend_free_op;
ZEND_API zval *zend_get_zval_ptr(znode *node, temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC); ZEND_API zval *zend_get_zval_ptr(znode *node, const temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC);
ZEND_API zval **zend_get_zval_ptr_ptr(znode *node, temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC); ZEND_API zval **zend_get_zval_ptr_ptr(const znode *node, const temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC);
ZEND_API int zend_do_fcall(ZEND_OPCODE_HANDLER_ARGS); ZEND_API int zend_do_fcall(ZEND_OPCODE_HANDLER_ARGS);

View File

@ -24,7 +24,7 @@
ZEND_API zend_llist zend_extensions; ZEND_API zend_llist zend_extensions;
static int last_resource_number; static int last_resource_number;
int zend_load_extension(char *path) /* {{{ */ int zend_load_extension(const char *path) /* {{{ */
{ {
#if ZEND_EXTENSIONS_SUPPORT #if ZEND_EXTENSIONS_SUPPORT
DL_HANDLE handle; DL_HANDLE handle;
@ -179,7 +179,7 @@ void zend_extension_dtor(zend_extension *extension) /* {{{ */
} }
/* }}} */ /* }}} */
static void zend_extension_message_dispatcher(zend_extension *extension, int num_args, va_list args TSRMLS_DC) /* {{{ */ static void zend_extension_message_dispatcher(const zend_extension *extension, int num_args, va_list args TSRMLS_DC) /* {{{ */
{ {
int message; int message;
void *arg; void *arg;
@ -212,7 +212,7 @@ ZEND_API int zend_get_resource_handle(zend_extension *extension) /* {{{ */
} }
/* }}} */ /* }}} */
ZEND_API zend_extension *zend_get_extension(char *extension_name) /* {{{ */ ZEND_API zend_extension *zend_get_extension(const char *extension_name) /* {{{ */
{ {
zend_llist_element *element; zend_llist_element *element;

View File

@ -110,15 +110,15 @@ END_EXTERN_C()
ZEND_API extern zend_llist zend_extensions; ZEND_API extern zend_llist zend_extensions;
void zend_extension_dtor(zend_extension *extension); void zend_extension_dtor(zend_extension *extension);
void zend_append_version_info(zend_extension *extension); void zend_append_version_info(const zend_extension *extension);
int zend_startup_extensions_mechanism(void); int zend_startup_extensions_mechanism(void);
int zend_startup_extensions(void); int zend_startup_extensions(void);
void zend_shutdown_extensions(TSRMLS_D); void zend_shutdown_extensions(TSRMLS_D);
BEGIN_EXTERN_C() BEGIN_EXTERN_C()
ZEND_API int zend_load_extension(char *path); ZEND_API int zend_load_extension(const char *path);
ZEND_API int zend_register_extension(zend_extension *new_extension, DL_HANDLE handle); ZEND_API int zend_register_extension(zend_extension *new_extension, DL_HANDLE handle);
ZEND_API zend_extension *zend_get_extension(char *extension_name); ZEND_API zend_extension *zend_get_extension(const char *extension_name);
END_EXTERN_C() END_EXTERN_C()
#endif /* ZEND_EXTENSIONS_H */ #endif /* ZEND_EXTENSIONS_H */

View File

@ -72,7 +72,7 @@
#define HT_DESTROYED 2 #define HT_DESTROYED 2
#define HT_CLEANING 3 #define HT_CLEANING 3
static void _zend_is_inconsistent(HashTable *ht, char *file, int line) /* {{{ */ static void _zend_is_inconsistent(const HashTable *ht, const char *file, int line) /* {{{ */
{ {
if (ht->inconsistent==HT_OK) { if (ht->inconsistent==HT_OK) {
return; return;
@ -1125,7 +1125,7 @@ ZEND_API ulong zend_get_hash_value(const char *arKey, uint nKeyLength) /* {{{ */
* data is returned in pData. The reason is that there's no reason * data is returned in pData. The reason is that there's no reason
* someone using the hash table might not want to have NULL data * someone using the hash table might not want to have NULL data
*/ */
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(const HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength, void **pData) /* {{{ */
{ {
ulong h; ulong h;
uint nIndex; uint nIndex;
@ -1158,13 +1158,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, const char *arKey, uint nKeyLength, void **pData) /* {{{ */ ZEND_API int zend_hash_find(const 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, const char *arKey, uint nKeyLength, void **pData) /* {{{ */ ZEND_API int zend_ascii_hash_find(const HashTable *ht, const char *arKey, uint nKeyLength, void **pData) /* {{{ */
{ {
TSRMLS_FETCH(); TSRMLS_FETCH();
@ -1182,7 +1182,7 @@ ZEND_API int zend_ascii_hash_find(HashTable *ht, const char *arKey, uint nKeyLen
} }
/* }}} */ /* }}} */
ZEND_API int zend_rt_hash_find(HashTable *ht, const char *arKey, uint nKeyLength, void **pData) /* {{{ */ ZEND_API int zend_rt_hash_find(const HashTable *ht, const char *arKey, uint nKeyLength, void **pData) /* {{{ */
{ {
TSRMLS_FETCH(); TSRMLS_FETCH();
@ -1207,7 +1207,7 @@ string_key:
} }
/* }}} */ /* }}} */
ZEND_API int zend_utf8_hash_find(HashTable *ht, const char *arKey, uint nKeyLength, void **pData) /* {{{ */ ZEND_API int zend_utf8_hash_find(const HashTable *ht, const char *arKey, uint nKeyLength, void **pData) /* {{{ */
{ {
TSRMLS_FETCH(); TSRMLS_FETCH();
@ -1232,7 +1232,7 @@ string_key:
} }
/* }}} */ /* }}} */
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(const HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength, ulong h, void **pData) /* {{{ */
{ {
uint nIndex; uint nIndex;
Bucket *p; Bucket *p;
@ -1270,13 +1270,13 @@ ZEND_API int zend_u_hash_quick_find(HashTable *ht, zend_uchar type, zstr arKey,
} }
/* }}} */ /* }}} */
ZEND_API int zend_hash_quick_find(HashTable *ht, const char *arKey, uint nKeyLength, ulong h, void **pData) /* {{{ */ ZEND_API int zend_hash_quick_find(const HashTable *ht, 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);
} }
/* }}} */ /* }}} */
ZEND_API int zend_u_hash_exists(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength) /* {{{ */ ZEND_API int zend_u_hash_exists(const HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength) /* {{{ */
{ {
ulong h; ulong h;
uint nIndex; uint nIndex;
@ -1308,7 +1308,7 @@ ZEND_API int zend_u_hash_exists(HashTable *ht, zend_uchar type, zstr arKey, uint
} }
/* }}} */ /* }}} */
ZEND_API int zend_hash_exists(HashTable *ht, const char *arKey, uint nKeyLength) /* {{{ */ ZEND_API int zend_hash_exists(const 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);
} }
@ -1382,7 +1382,7 @@ string_key:
} }
/* }}} */ /* }}} */
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(const HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength, ulong h) /* {{{ */
{ {
uint nIndex; uint nIndex;
Bucket *p; Bucket *p;
@ -1419,13 +1419,13 @@ ZEND_API int zend_u_hash_quick_exists(HashTable *ht, zend_uchar type, zstr arKey
} }
/* }}} */ /* }}} */
ZEND_API int zend_hash_quick_exists(HashTable *ht, const char *arKey, uint nKeyLength, ulong h) /* {{{ */ ZEND_API int zend_hash_quick_exists(const 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);
} }
/* }}} */ /* }}} */
ZEND_API int zend_hash_index_find(HashTable *ht, ulong h, void **pData) /* {{{ */ ZEND_API int zend_hash_index_find(const HashTable *ht, ulong h, void **pData) /* {{{ */
{ {
uint nIndex; uint nIndex;
Bucket *p; Bucket *p;
@ -1446,7 +1446,7 @@ ZEND_API int zend_hash_index_find(HashTable *ht, ulong h, void **pData) /* {{{ *
} }
/* }}} */ /* }}} */
ZEND_API int zend_hash_index_exists(HashTable *ht, ulong h) /* {{{ */ ZEND_API int zend_hash_index_exists(const HashTable *ht, ulong h) /* {{{ */
{ {
uint nIndex; uint nIndex;
Bucket *p; Bucket *p;
@ -1466,7 +1466,7 @@ ZEND_API int zend_hash_index_exists(HashTable *ht, ulong h) /* {{{ */
} }
/* }}} */ /* }}} */
ZEND_API int zend_hash_num_elements(HashTable *ht) /* {{{ */ ZEND_API int zend_hash_num_elements(const HashTable *ht) /* {{{ */
{ {
IS_CONSISTENT(ht); IS_CONSISTENT(ht);
@ -1474,7 +1474,7 @@ ZEND_API int zend_hash_num_elements(HashTable *ht) /* {{{ */
} }
/* }}} */ /* }}} */
ZEND_API int zend_hash_get_pointer(HashTable *ht, HashPointer *ptr) /* {{{ */ ZEND_API int zend_hash_get_pointer(const HashTable *ht, HashPointer *ptr) /* {{{ */
{ {
ptr->pos = ht->pInternalPointer; ptr->pos = ht->pInternalPointer;
if (ht->pInternalPointer) { if (ht->pInternalPointer) {
@ -1563,7 +1563,7 @@ ZEND_API int zend_hash_move_backwards_ex(HashTable *ht, HashPosition *pos) /* {{
/* }}} */ /* }}} */
/* This function should be made binary safe */ /* This function should be made binary safe */
ZEND_API int zend_hash_get_current_key_ex(HashTable *ht, zstr *str_index, uint *str_length, ulong *num_index, zend_bool duplicate, HashPosition *pos) /* {{{ */ ZEND_API int zend_hash_get_current_key_ex(const HashTable *ht, zstr *str_index, uint *str_length, ulong *num_index, zend_bool duplicate, HashPosition *pos) /* {{{ */
{ {
Bucket *p; Bucket *p;
@ -1966,7 +1966,7 @@ ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t co
} }
/* }}} */ /* }}} */
ZEND_API int zend_hash_minmax(HashTable *ht, compare_func_t compar, int flag, void **pData TSRMLS_DC) /* {{{ */ ZEND_API int zend_hash_minmax(const HashTable *ht, compare_func_t compar, int flag, void **pData TSRMLS_DC) /* {{{ */
{ {
Bucket *p, *res; Bucket *p, *res;
@ -1994,7 +1994,7 @@ ZEND_API int zend_hash_minmax(HashTable *ht, compare_func_t compar, int flag, vo
} }
/* }}} */ /* }}} */
ZEND_API ulong zend_hash_next_free_element(HashTable *ht) /* {{{ */ ZEND_API ulong zend_hash_next_free_element(const HashTable *ht) /* {{{ */
{ {
IS_CONSISTENT(ht); IS_CONSISTENT(ht);
@ -2236,7 +2236,7 @@ ZEND_API void zend_hash_to_unicode(HashTable *ht, apply_func_t apply_func TSRMLS
/* }}} */ /* }}} */
#if ZEND_DEBUG #if ZEND_DEBUG
void zend_hash_display_pListTail(HashTable *ht) /* {{{ */ void zend_hash_display_pListTail(const HashTable *ht) /* {{{ */
{ {
Bucket *p; Bucket *p;
@ -2252,7 +2252,7 @@ void zend_hash_display_pListTail(HashTable *ht) /* {{{ */
} }
/* }}} */ /* }}} */
void zend_hash_display(HashTable *ht) /* {{{ */ void zend_hash_display(const HashTable *ht) /* {{{ */
{ {
Bucket *p; Bucket *p;
uint i; uint i;

View File

@ -212,25 +212,25 @@ 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, const char *arKey, uint nKeyLength, void **pData); ZEND_API int zend_hash_find(const HashTable *ht, const 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_ascii_hash_find(const HashTable *ht, const 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_rt_hash_find(const HashTable *ht, const 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_utf8_hash_find(const 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(const HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength, void **pData);
ZEND_API int zend_hash_quick_find(HashTable *ht, const char *arKey, uint nKeyLength, ulong h, void **pData); ZEND_API int zend_hash_quick_find(const HashTable *ht, 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(const 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(const HashTable *ht, ulong h, void **pData);
/* Misc */ /* Misc */
ZEND_API int zend_hash_exists(HashTable *ht, const char *arKey, uint nKeyLength); ZEND_API int zend_hash_exists(const HashTable *ht, const char *arKey, uint nKeyLength);
ZEND_API int zend_ascii_hash_exists(HashTable *ht, const 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, const 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, const 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(const HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength);
ZEND_API int zend_hash_quick_exists(HashTable *ht, const char *arKey, uint nKeyLength, ulong h); ZEND_API int zend_hash_quick_exists(const 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(const 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(const HashTable *ht, ulong h);
ZEND_API ulong zend_hash_next_free_element(HashTable *ht); ZEND_API ulong zend_hash_next_free_element(const HashTable *ht);
/* traversing */ /* traversing */
@ -238,7 +238,7 @@ ZEND_API ulong zend_hash_next_free_element(HashTable *ht);
(zend_hash_get_current_key_type_ex(ht, pos) == HASH_KEY_NON_EXISTANT ? FAILURE : SUCCESS) (zend_hash_get_current_key_type_ex(ht, pos) == HASH_KEY_NON_EXISTANT ? FAILURE : SUCCESS)
ZEND_API int zend_hash_move_forward_ex(HashTable *ht, HashPosition *pos); ZEND_API int zend_hash_move_forward_ex(HashTable *ht, HashPosition *pos);
ZEND_API int zend_hash_move_backwards_ex(HashTable *ht, HashPosition *pos); ZEND_API int zend_hash_move_backwards_ex(HashTable *ht, HashPosition *pos);
ZEND_API int zend_hash_get_current_key_ex(HashTable *ht, zstr *str_index, uint *str_length, ulong *num_index, zend_bool duplicate, HashPosition *pos); ZEND_API int zend_hash_get_current_key_ex(const HashTable *ht, zstr *str_index, uint *str_length, ulong *num_index, zend_bool duplicate, HashPosition *pos);
ZEND_API int zend_hash_get_current_key_type_ex(HashTable *ht, HashPosition *pos); ZEND_API int zend_hash_get_current_key_type_ex(HashTable *ht, HashPosition *pos);
ZEND_API int zend_hash_get_current_data_ex(HashTable *ht, void **pData, HashPosition *pos); ZEND_API int zend_hash_get_current_data_ex(HashTable *ht, void **pData, HashPosition *pos);
ZEND_API void zend_hash_internal_pointer_reset_ex(HashTable *ht, HashPosition *pos); ZEND_API void zend_hash_internal_pointer_reset_ex(HashTable *ht, HashPosition *pos);
@ -250,7 +250,7 @@ typedef struct _HashPointer {
ulong h; ulong h;
} HashPointer; } HashPointer;
ZEND_API int zend_hash_get_pointer(HashTable *ht, HashPointer *ptr); ZEND_API int zend_hash_get_pointer(const HashTable *ht, HashPointer *ptr);
ZEND_API int zend_hash_set_pointer(HashTable *ht, const HashPointer *ptr); ZEND_API int zend_hash_set_pointer(HashTable *ht, const HashPointer *ptr);
#define zend_hash_has_more_elements(ht) \ #define zend_hash_has_more_elements(ht) \
@ -278,12 +278,12 @@ ZEND_API void _zend_hash_merge(HashTable *target, HashTable *source, copy_ctor_f
ZEND_API void zend_hash_merge_ex(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, uint size, merge_checker_func_t pMergeSource, void *pParam); ZEND_API void zend_hash_merge_ex(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, uint size, merge_checker_func_t pMergeSource, void *pParam);
ZEND_API int zend_hash_sort(HashTable *ht, sort_func_t sort_func, compare_func_t compare_func, int renumber TSRMLS_DC); ZEND_API int zend_hash_sort(HashTable *ht, sort_func_t sort_func, compare_func_t compare_func, int renumber TSRMLS_DC);
ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t compar, zend_bool ordered TSRMLS_DC); ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t compar, zend_bool ordered TSRMLS_DC);
ZEND_API int zend_hash_minmax(HashTable *ht, compare_func_t compar, int flag, void **pData TSRMLS_DC); ZEND_API int zend_hash_minmax(const HashTable *ht, compare_func_t compar, int flag, void **pData TSRMLS_DC);
#define zend_hash_merge(target, source, pCopyConstructor, tmp, size, overwrite) \ #define zend_hash_merge(target, source, pCopyConstructor, tmp, size, overwrite) \
_zend_hash_merge(target, source, pCopyConstructor, tmp, size, overwrite ZEND_FILE_LINE_CC) _zend_hash_merge(target, source, pCopyConstructor, tmp, size, overwrite ZEND_FILE_LINE_CC)
ZEND_API int zend_hash_num_elements(HashTable *ht); ZEND_API int zend_hash_num_elements(const HashTable *ht);
ZEND_API int zend_hash_rehash(HashTable *ht); ZEND_API int zend_hash_rehash(HashTable *ht);
@ -357,8 +357,8 @@ ZEND_API ulong zend_u_hash_func(zend_uchar type, zstr arKey, uint nKeyLength);
#if ZEND_DEBUG #if ZEND_DEBUG
/* debug */ /* debug */
void zend_hash_display_pListTail(HashTable *ht); void zend_hash_display_pListTail(const HashTable *ht);
void zend_hash_display(HashTable *ht); void zend_hash_display(const HashTable *ht);
#endif #endif
END_EXTERN_C() END_EXTERN_C()

View File

@ -122,7 +122,7 @@ extern ZEND_API HashTable module_registry;
void module_destructor(zend_module_entry *module); void module_destructor(zend_module_entry *module);
int module_registry_cleanup(zend_module_entry *module TSRMLS_DC); int module_registry_cleanup(zend_module_entry *module TSRMLS_DC);
int module_registry_request_startup(zend_module_entry *module TSRMLS_DC); int module_registry_request_startup(zend_module_entry *module TSRMLS_DC);
int module_registry_unload_temp(zend_module_entry *module TSRMLS_DC); int module_registry_unload_temp(const zend_module_entry *module TSRMLS_DC);
#define ZEND_MODULE_DTOR (void (*)(void *)) module_destructor #define ZEND_MODULE_DTOR (void (*)(void *)) module_destructor
#endif #endif

View File

@ -1190,7 +1190,7 @@ static int zend_std_has_property(zval *object, zval *member, int has_set_exists
} }
/* }}} */ /* }}} */
zend_class_entry *zend_std_object_get_class(zval *object TSRMLS_DC) /* {{{ */ zend_class_entry *zend_std_object_get_class(const zval *object TSRMLS_DC) /* {{{ */
{ {
zend_object *zobj; zend_object *zobj;
zobj = Z_OBJ_P(object); zobj = Z_OBJ_P(object);
@ -1199,7 +1199,7 @@ zend_class_entry *zend_std_object_get_class(zval *object TSRMLS_DC) /* {{{ */
} }
/* }}} */ /* }}} */
int zend_std_object_get_class_name(zval *object, zstr *class_name, zend_uint *class_name_len, int parent TSRMLS_DC) /* {{{ */ int zend_std_object_get_class_name(const zval *object, zstr *class_name, zend_uint *class_name_len, int parent TSRMLS_DC) /* {{{ */
{ {
zend_object *zobj; zend_object *zobj;
zend_class_entry *ce; zend_class_entry *ce;

View File

@ -96,8 +96,8 @@ typedef void (*zend_object_del_ref_t)(zval *object TSRMLS_DC);
typedef void (*zend_object_delete_obj_t)(zval *object TSRMLS_DC); typedef void (*zend_object_delete_obj_t)(zval *object TSRMLS_DC);
typedef zend_object_value (*zend_object_clone_obj_t)(zval *object TSRMLS_DC); typedef zend_object_value (*zend_object_clone_obj_t)(zval *object TSRMLS_DC);
typedef zend_class_entry *(*zend_object_get_class_entry_t)(zval *object TSRMLS_DC); typedef zend_class_entry *(*zend_object_get_class_entry_t)(const zval *object TSRMLS_DC);
typedef int (*zend_object_get_class_name_t)(zval *object, zstr *class_name, zend_uint *class_name_len, int parent TSRMLS_DC); typedef int (*zend_object_get_class_name_t)(const zval *object, zstr *class_name, zend_uint *class_name_len, int parent TSRMLS_DC);
typedef int (*zend_object_compare_t)(zval *object1, zval *object2 TSRMLS_DC); typedef int (*zend_object_compare_t)(zval *object1, zval *object2 TSRMLS_DC);
/* Cast an object to some other type /* Cast an object to some other type

View File

@ -131,7 +131,7 @@ ZEND_API zend_object_value zend_objects_new(zend_object **object, zend_class_ent
} }
/* }}} */ /* }}} */
ZEND_API zend_object *zend_objects_get_address(zval *zobject TSRMLS_DC) /* {{{ */ ZEND_API zend_object *zend_objects_get_address(const zval *zobject TSRMLS_DC) /* {{{ */
{ {
return (zend_object *)zend_object_store_get_object(zobject TSRMLS_CC); return (zend_object *)zend_object_store_get_object(zobject TSRMLS_CC);
} }

View File

@ -29,7 +29,7 @@ ZEND_API void zend_object_std_init(zend_object *object, zend_class_entry *ce TSR
ZEND_API void zend_object_std_dtor(zend_object *object TSRMLS_DC); ZEND_API void zend_object_std_dtor(zend_object *object TSRMLS_DC);
ZEND_API zend_object_value zend_objects_new(zend_object **object, zend_class_entry *class_type TSRMLS_DC); ZEND_API zend_object_value zend_objects_new(zend_object **object, zend_class_entry *class_type TSRMLS_DC);
ZEND_API void zend_objects_destroy_object(zend_object *object, zend_object_handle handle TSRMLS_DC); ZEND_API void zend_objects_destroy_object(zend_object *object, zend_object_handle handle TSRMLS_DC);
ZEND_API zend_object *zend_objects_get_address(zval *object TSRMLS_DC); ZEND_API zend_object *zend_objects_get_address(const zval *object TSRMLS_DC);
ZEND_API void zend_objects_clone_members(zend_object *new_object, zend_object_value new_obj_val, zend_object *old_object, zend_object_handle handle TSRMLS_DC); ZEND_API void zend_objects_clone_members(zend_object *new_object, zend_object_value new_obj_val, zend_object *old_object, zend_object_handle handle TSRMLS_DC);
ZEND_API zend_object_value zend_objects_clone_obj(zval *object TSRMLS_DC); ZEND_API zend_object_value zend_objects_clone_obj(zval *object TSRMLS_DC);
ZEND_API void zend_objects_free_object_storage(zend_object *object TSRMLS_DC); ZEND_API void zend_objects_free_object_storage(zend_object *object TSRMLS_DC);

View File

@ -273,7 +273,7 @@ ZEND_API zend_object_value zend_objects_store_clone_obj(zval *zobject TSRMLS_DC)
} }
/* }}} */ /* }}} */
ZEND_API void *zend_object_store_get_object(zval *zobject TSRMLS_DC) /* {{{ */ ZEND_API void *zend_object_store_get_object(const zval *zobject TSRMLS_DC) /* {{{ */
{ {
zend_object_handle handle = Z_OBJ_HANDLE_P(zobject); zend_object_handle handle = Z_OBJ_HANDLE_P(zobject);

View File

@ -70,7 +70,7 @@ ZEND_API void zend_objects_store_del_ref_by_handle(zend_object_handle handle TSR
ZEND_API zend_uint zend_objects_store_get_refcount(zval *object TSRMLS_DC); ZEND_API zend_uint zend_objects_store_get_refcount(zval *object TSRMLS_DC);
ZEND_API int zend_objects_is_destructor_called(zend_object_handle handle TSRMLS_DC); ZEND_API int zend_objects_is_destructor_called(zend_object_handle handle TSRMLS_DC);
ZEND_API zend_object_value zend_objects_store_clone_obj(zval *object TSRMLS_DC); ZEND_API zend_object_value zend_objects_store_clone_obj(zval *object TSRMLS_DC);
ZEND_API void *zend_object_store_get_object(zval *object TSRMLS_DC); ZEND_API void *zend_object_store_get_object(const zval *object TSRMLS_DC);
ZEND_API void *zend_object_store_get_object_by_handle(zend_object_handle handle TSRMLS_DC); ZEND_API void *zend_object_store_get_object_by_handle(zend_object_handle handle TSRMLS_DC);
/* See comment in zend_objects_API.c before you use this */ /* See comment in zend_objects_API.c before you use this */
ZEND_API void zend_object_store_set_object(zval *zobject, void *object TSRMLS_DC); ZEND_API void zend_object_store_set_object(zval *zobject, void *object TSRMLS_DC);

View File

@ -1742,7 +1742,7 @@ ZEND_API int shift_right_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
/* }}} */ /* }}} */
/* must support result==op1 */ /* must support result==op1 */
ZEND_API int add_char_to_string(zval *result, zval *op1, zval *op2) /* {{{ */ ZEND_API int add_char_to_string(zval *result, const zval *op1, const zval *op2) /* {{{ */
{ {
if (Z_TYPE_P(op1) == IS_UNICODE) { if (Z_TYPE_P(op1) == IS_UNICODE) {
UChar32 codepoint = (UChar32) Z_LVAL_P(op2); UChar32 codepoint = (UChar32) Z_LVAL_P(op2);
@ -1771,7 +1771,7 @@ ZEND_API int add_char_to_string(zval *result, zval *op1, zval *op2) /* {{{ */
/* }}} */ /* }}} */
/* must support result==op1 */ /* must support result==op1 */
ZEND_API int add_string_to_string(zval *result, zval *op1, zval *op2) /* {{{ */ ZEND_API int add_string_to_string(zval *result, const zval *op1, const zval *op2) /* {{{ */
{ {
assert(Z_TYPE_P(op1) == Z_TYPE_P(op2)); assert(Z_TYPE_P(op1) == Z_TYPE_P(op2));
@ -2276,7 +2276,7 @@ ZEND_API int is_smaller_or_equal_function(zval *result, zval *op1, zval *op2 TSR
} }
/* }}} */ /* }}} */
ZEND_API zend_bool instanceof_function_ex(zend_class_entry *instance_ce, zend_class_entry *ce, zend_bool interfaces_only TSRMLS_DC) /* {{{ */ ZEND_API zend_bool instanceof_function_ex(const zend_class_entry *instance_ce, const zend_class_entry *ce, zend_bool interfaces_only TSRMLS_DC) /* {{{ */
{ {
zend_uint i; zend_uint i;
@ -2298,7 +2298,7 @@ ZEND_API zend_bool instanceof_function_ex(zend_class_entry *instance_ce, zend_cl
} }
/* }}} */ /* }}} */
ZEND_API zend_bool instanceof_function(zend_class_entry *instance_ce, zend_class_entry *ce TSRMLS_DC) /* {{{ */ ZEND_API zend_bool instanceof_function(const zend_class_entry *instance_ce, const zend_class_entry *ce TSRMLS_DC) /* {{{ */
{ {
return instanceof_function_ex(instance_ce, ce, 0 TSRMLS_CC); return instanceof_function_ex(instance_ce, ce, 0 TSRMLS_CC);
} }

View File

@ -71,8 +71,8 @@ ZEND_API int is_not_equal_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
ZEND_API int is_smaller_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); ZEND_API int is_smaller_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
ZEND_API int is_smaller_or_equal_function(zval *result, zval *op1, zval *op2 TSRMLS_DC); ZEND_API int is_smaller_or_equal_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
ZEND_API zend_bool instanceof_function_ex(zend_class_entry *instance_ce, zend_class_entry *ce, zend_bool interfaces_only TSRMLS_DC); ZEND_API zend_bool instanceof_function_ex(const zend_class_entry *instance_ce, const zend_class_entry *ce, zend_bool interfaces_only TSRMLS_DC);
ZEND_API zend_bool instanceof_function(zend_class_entry *instance_ce, zend_class_entry *ce TSRMLS_DC); ZEND_API zend_bool instanceof_function(const zend_class_entry *instance_ce, const zend_class_entry *ce TSRMLS_DC);
ZEND_API long zend_u_strtol(const UChar *nptr, UChar **endptr, int base); ZEND_API long zend_u_strtol(const UChar *nptr, UChar **endptr, int base);
ZEND_API unsigned long zend_u_strtoul(const UChar *nptr, UChar **endptr, int base); ZEND_API unsigned long zend_u_strtoul(const UChar *nptr, UChar **endptr, int base);
ZEND_API double zend_u_strtod(const UChar *nptr, UChar **endptr); ZEND_API double zend_u_strtod(const UChar *nptr, UChar **endptr);
@ -293,8 +293,8 @@ ZEND_API int convert_to_object(zval *op);
ZEND_API void multi_convert_to_long_ex(int argc, ...); ZEND_API void multi_convert_to_long_ex(int argc, ...);
ZEND_API void multi_convert_to_double_ex(int argc, ...); ZEND_API void multi_convert_to_double_ex(int argc, ...);
ZEND_API void multi_convert_to_string_ex(int argc, ...); ZEND_API void multi_convert_to_string_ex(int argc, ...);
ZEND_API int add_char_to_string(zval *result, zval *op1, zval *op2); ZEND_API int add_char_to_string(zval *result, const zval *op1, const zval *op2);
ZEND_API int add_string_to_string(zval *result, zval *op1, zval *op2); ZEND_API int add_string_to_string(zval *result, const zval *op1, const zval *op2);
#define convert_to_string(op) _convert_to_string((op) ZEND_FILE_LINE_CC) #define convert_to_string(op) _convert_to_string((op) ZEND_FILE_LINE_CC)
#define convert_to_string_with_converter(op, conv) _convert_to_string_with_converter((op), (conv) TSRMLS_CC ZEND_FILE_LINE_CC) #define convert_to_string_with_converter(op, conv) _convert_to_string_with_converter((op), (conv) TSRMLS_CC ZEND_FILE_LINE_CC)
#define convert_to_unicode(op) _convert_to_unicode((op) TSRMLS_CC ZEND_FILE_LINE_CC) #define convert_to_unicode(op) _convert_to_unicode((op) TSRMLS_CC ZEND_FILE_LINE_CC)

View File

@ -35,7 +35,7 @@ ZEND_API int zend_stack_init(zend_stack *stack) /* {{{ */
} }
/* }}} */ /* }}} */
ZEND_API int zend_stack_push(zend_stack *stack, void *element, int size) /* {{{ */ ZEND_API int zend_stack_push(zend_stack *stack, const void *element, int size) /* {{{ */
{ {
if (stack->top >= stack->max) { /* we need to allocate more memory */ if (stack->top >= stack->max) { /* we need to allocate more memory */
stack->elements = (void **) erealloc(stack->elements, stack->elements = (void **) erealloc(stack->elements,
@ -50,7 +50,7 @@ ZEND_API int zend_stack_push(zend_stack *stack, void *element, int size) /* {{{
} }
/* }}} */ /* }}} */
ZEND_API int zend_stack_top(zend_stack *stack, void **element) /* {{{ */ ZEND_API int zend_stack_top(const zend_stack *stack, void **element) /* {{{ */
{ {
if (stack->top > 0) { if (stack->top > 0) {
*element = stack->elements[stack->top - 1]; *element = stack->elements[stack->top - 1];
@ -71,7 +71,7 @@ ZEND_API int zend_stack_del_top(zend_stack *stack) /* {{{ */
} }
/* }}} */ /* }}} */
ZEND_API int zend_stack_int_top(zend_stack *stack) /* {{{ */ ZEND_API int zend_stack_int_top(const zend_stack *stack) /* {{{ */
{ {
int *e; int *e;
@ -83,7 +83,7 @@ ZEND_API int zend_stack_int_top(zend_stack *stack) /* {{{ */
} }
/* }}} */ /* }}} */
ZEND_API int zend_stack_is_empty(zend_stack *stack) /* {{{ */ ZEND_API int zend_stack_is_empty(const zend_stack *stack) /* {{{ */
{ {
if (stack->top == 0) { if (stack->top == 0) {
return 1; return 1;
@ -109,13 +109,13 @@ ZEND_API int zend_stack_destroy(zend_stack *stack) /* {{{ */
} }
/* }}} */ /* }}} */
ZEND_API void **zend_stack_base(zend_stack *stack) /* {{{ */ ZEND_API void **zend_stack_base(const zend_stack *stack) /* {{{ */
{ {
return stack->elements; return stack->elements;
} }
/* }}} */ /* }}} */
ZEND_API int zend_stack_count(zend_stack *stack) /* {{{ */ ZEND_API int zend_stack_count(const zend_stack *stack) /* {{{ */
{ {
return stack->top; return stack->top;
} }

View File

@ -32,14 +32,14 @@ typedef struct _zend_stack {
BEGIN_EXTERN_C() BEGIN_EXTERN_C()
ZEND_API int zend_stack_init(zend_stack *stack); ZEND_API int zend_stack_init(zend_stack *stack);
ZEND_API int zend_stack_push(zend_stack *stack, void *element, int size); ZEND_API int zend_stack_push(zend_stack *stack, const void *element, int size);
ZEND_API int zend_stack_top(zend_stack *stack, void **element); ZEND_API int zend_stack_top(const zend_stack *stack, void **element);
ZEND_API int zend_stack_del_top(zend_stack *stack); ZEND_API int zend_stack_del_top(zend_stack *stack);
ZEND_API int zend_stack_int_top(zend_stack *stack); ZEND_API int zend_stack_int_top(const zend_stack *stack);
ZEND_API int zend_stack_is_empty(zend_stack *stack); ZEND_API int zend_stack_is_empty(const zend_stack *stack);
ZEND_API int zend_stack_destroy(zend_stack *stack); ZEND_API int zend_stack_destroy(zend_stack *stack);
ZEND_API void **zend_stack_base(zend_stack *stack); ZEND_API void **zend_stack_base(const zend_stack *stack);
ZEND_API int zend_stack_count(zend_stack *stack); ZEND_API int zend_stack_count(const zend_stack *stack);
ZEND_API void zend_stack_apply(zend_stack *stack, int type, int (*apply_function)(void *element)); ZEND_API void zend_stack_apply(zend_stack *stack, int type, int (*apply_function)(void *element));
ZEND_API void zend_stack_apply_with_argument(zend_stack *stack, int type, int (*apply_function)(void *element, void *arg), void *arg); ZEND_API void zend_stack_apply_with_argument(zend_stack *stack, int type, int (*apply_function)(void *element, void *arg), void *arg);
END_EXTERN_C() END_EXTERN_C()

View File

@ -2710,12 +2710,12 @@ static union _zend_function *row_get_ctor(zval *object TSRMLS_DC)
return (union _zend_function*)&ctor; return (union _zend_function*)&ctor;
} }
static zend_class_entry *row_get_ce(zval *object TSRMLS_DC) static zend_class_entry *row_get_ce(const zval *object TSRMLS_DC)
{ {
return pdo_dbstmt_ce; return pdo_dbstmt_ce;
} }
static int row_get_classname(zval *object, zstr *class_name, zend_uint *class_name_len, int parent TSRMLS_DC) static int row_get_classname(const zval *object, zstr *class_name, zend_uint *class_name_len, int parent TSRMLS_DC)
{ {
if (parent) { if (parent) {
return FAILURE; return FAILURE;

View File

@ -1356,12 +1356,12 @@ static zend_object_value sqlite_object_new_exception(zend_class_entry *class_typ
obj->u._type = _ptr; \ obj->u._type = _ptr; \
} }
static zend_class_entry *sqlite_get_ce_query(zval *object TSRMLS_DC) static zend_class_entry *sqlite_get_ce_query(const zval *object TSRMLS_DC)
{ {
return sqlite_ce_query; return sqlite_ce_query;
} }
static zend_class_entry *sqlite_get_ce_ub_query(zval *object TSRMLS_DC) static zend_class_entry *sqlite_get_ce_ub_query(const zval *object TSRMLS_DC)
{ {
return sqlite_ce_ub_query; return sqlite_ce_ub_query;
} }

View File

@ -1222,7 +1222,7 @@ static char *php_resolve_path_for_zend(const char *filename, int filename_len TS
/* {{{ php_get_configuration_directive_for_zend /* {{{ php_get_configuration_directive_for_zend
*/ */
static int php_get_configuration_directive_for_zend(char *name, uint name_length, zval *contents) static int php_get_configuration_directive_for_zend(const char *name, uint name_length, zval *contents)
{ {
zval *retval = cfg_get_entry(name, name_length); zval *retval = cfg_get_entry(name, name_length);

View File

@ -688,7 +688,7 @@ void php_ini_register_extensions(TSRMLS_D)
/* {{{ php_parse_user_ini_file /* {{{ php_parse_user_ini_file
*/ */
PHPAPI int php_parse_user_ini_file(char *dirname, char *ini_filename, HashTable *target_hash TSRMLS_DC) PHPAPI int php_parse_user_ini_file(const char *dirname, char *ini_filename, HashTable *target_hash TSRMLS_DC)
{ {
struct stat sb; struct stat sb;
char ini_file[MAXPATHLEN]; char ini_file[MAXPATHLEN];
@ -779,7 +779,7 @@ PHPAPI int php_ini_has_per_host_config(void)
/* {{{ php_ini_activate_per_host_config /* {{{ php_ini_activate_per_host_config
*/ */
PHPAPI void php_ini_activate_per_host_config(char *host, uint host_len TSRMLS_DC) PHPAPI void php_ini_activate_per_host_config(const char *host, uint host_len TSRMLS_DC)
{ {
zval *tmp; zval *tmp;
@ -794,7 +794,7 @@ PHPAPI void php_ini_activate_per_host_config(char *host, uint host_len TSRMLS_DC
/* {{{ cfg_get_entry /* {{{ cfg_get_entry
*/ */
PHPAPI zval *cfg_get_entry(char *name, uint name_length) PHPAPI zval *cfg_get_entry(const char *name, uint name_length)
{ {
zval *tmp; zval *tmp;
@ -808,7 +808,7 @@ PHPAPI zval *cfg_get_entry(char *name, uint name_length)
/* {{{ cfg_get_long /* {{{ cfg_get_long
*/ */
PHPAPI int cfg_get_long(char *varname, long *result) PHPAPI int cfg_get_long(const char *varname, long *result)
{ {
zval *tmp, var; zval *tmp, var;
@ -826,7 +826,7 @@ PHPAPI int cfg_get_long(char *varname, long *result)
/* {{{ cfg_get_double /* {{{ cfg_get_double
*/ */
PHPAPI int cfg_get_double(char *varname, double *result) PHPAPI int cfg_get_double(const char *varname, double *result)
{ {
zval *tmp, var; zval *tmp, var;
@ -844,7 +844,7 @@ PHPAPI int cfg_get_double(char *varname, double *result)
/* {{{ cfg_get_string /* {{{ cfg_get_string
*/ */
PHPAPI int cfg_get_string(char *varname, char **result) PHPAPI int cfg_get_string(const char *varname, char **result)
{ {
zval *tmp; zval *tmp;

View File

@ -28,16 +28,16 @@ PHPAPI void config_zval_dtor(zval *zvalue);
int php_init_config(TSRMLS_D); int php_init_config(TSRMLS_D);
int php_shutdown_config(void); int php_shutdown_config(void);
void php_ini_register_extensions(TSRMLS_D); void php_ini_register_extensions(TSRMLS_D);
PHPAPI zval *cfg_get_entry(char *name, uint name_length); PHPAPI zval *cfg_get_entry(const char *name, uint name_length);
PHPAPI int cfg_get_long(char *varname, long *result); PHPAPI int cfg_get_long(const char *varname, long *result);
PHPAPI int cfg_get_double(char *varname, double *result); PHPAPI int cfg_get_double(const char *varname, double *result);
PHPAPI int cfg_get_string(char *varname, char **result); PHPAPI int cfg_get_string(const char *varname, char **result);
PHPAPI int php_parse_user_ini_file(char *dirname, char *ini_filename, HashTable *target_hash TSRMLS_DC); PHPAPI int php_parse_user_ini_file(const char *dirname, char *ini_filename, HashTable *target_hash TSRMLS_DC);
PHPAPI void php_ini_activate_config(HashTable *source_hash, int modify_type, int stage TSRMLS_DC); PHPAPI void php_ini_activate_config(HashTable *source_hash, int modify_type, int stage TSRMLS_DC);
PHPAPI int php_ini_has_per_dir_config(void); PHPAPI int php_ini_has_per_dir_config(void);
PHPAPI int php_ini_has_per_host_config(void); PHPAPI int php_ini_has_per_host_config(void);
PHPAPI void php_ini_activate_per_dir_config(char *path, uint path_len TSRMLS_DC); PHPAPI void php_ini_activate_per_dir_config(char *path, uint path_len TSRMLS_DC);
PHPAPI void php_ini_activate_per_host_config(char *host, uint host_len TSRMLS_DC); PHPAPI void php_ini_activate_per_host_config(const char *host, uint host_len TSRMLS_DC);
PHPAPI HashTable* php_ini_get_configuration_hash(void); PHPAPI HashTable* php_ini_get_configuration_hash(void);
END_EXTERN_C() END_EXTERN_C()