cvs: php-src(PHP_5_3) /ext/pdo pdo_stmt.c /ext/phar phar.phar /main php_ini.c php_ini.h ZendEngine2 zend.c zend.h zend_API.c zend_API.h
zend_compile.c zend_compile.h zend_constants.c zend_constants.h zend_execute.c zend_execute.h zend_extensions.c zend_extensions.h zend_hash.c
zend_hash.h zend_modules.h zend_object_handlers.c zend_object_handlers.h zend_objects.c zend_objects.h zend_objects_API.c zend_objects_API.h
zend_operators.c zend_operators.h zend_stack.c zend_stack.h

From: Date: Tue, 12 Aug 2008 17:20:26 +0000
Subject: cvs: php-src(PHP_5_3) /ext/pdo pdo_stmt.c /ext/phar phar.phar /main php_ini.c php_ini.h ZendEngine2 zend.c zend.h zend_API.c zend_API.h
zend_compile.c zend_compile.h zend_constants.c zend_constants.h zend_execute.c zend_execute.h zend_extensions.c zend_extensions.h zend_hash.c
zend_hash.h zend_modules.h zend_object_handlers.c zend_object_handlers.h zend_objects.c zend_objects.h zend_objects_API.c zend_objects_API.h
zend_operators.c zend_operators.h zend_stack.c zend_stack.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-52265@lists.php.net to get a copy of this message
felipe Tue Aug 12 17:20:26 2008 UTC Modified files: (Branch: PHP_5_3) /ZendEngine2 zend.c zend.h zend_API.c zend_API.h zend_compile.c zend_compile.h zend_constants.c zend_constants.h zend_execute.c zend_execute.h zend_extensions.c zend_extensions.h zend_hash.c zend_hash.h zend_modules.h zend_object_handlers.c zend_object_handlers.h zend_objects.c zend_objects.h zend_objects_API.c zend_objects_API.h zend_operators.c zend_operators.h zend_stack.c zend_stack.h /php-src/ext/pdo pdo_stmt.c /php-src/ext/phar phar.phar /php-src/main php_ini.c php_ini.h Log: - MFH: Constness (Added const qualifier to several function parameters)

http://cvs.php.net/viewvc.cgi/ZendEngine2/zend.c?r1=1.308.2.12.2.35.2.20&r2=1.308.2.12.2.35.2.21&diff_format=u Index: ZendEngine2/zend.c diff -u ZendEngine2/zend.c:1.308.2.12.2.35.2.20 ZendEngine2/zend.c:1.308.2.12.2.35.2.21 --- ZendEngine2/zend.c:1.308.2.12.2.35.2.20 Mon Jul 21 09:40:59 2008 +++ ZendEngine2/zend.c Tue Aug 12 17:20:23 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend.c,v 1.308.2.12.2.35.2.20 2008/07/21 09:40:59 bjori Exp $ */ +/* $Id: zend.c,v 1.308.2.12.2.35.2.21 2008/08/12 17:20:23 felipe Exp $ */ #include "zend.h" #include "zend_extensions.h" @@ -63,7 +63,7 @@ void (*zend_on_timeout)(int seconds TSRMLS_DC); 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) /* {{{ */ { @@ -803,7 +803,7 @@ /* }}} */ /* this should be compatible with the standard zenderror */ -void zenderror(char *error) /* {{{ */ +void zenderror(const char *error) /* {{{ */ { zend_error(E_PARSE, "%s", error); } @@ -826,7 +826,7 @@ /* }}} */ END_EXTERN_C() -void zend_append_version_info(zend_extension *extension) /* {{{ */ +void zend_append_version_info(const zend_extension *extension) /* {{{ */ { char *new_info; uint new_info_length; @@ -958,7 +958,7 @@ /* }}} */ 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) { return zend_get_configuration_directive_p(name, name_length, contents); @@ -1148,7 +1148,7 @@ void zend_error_noreturn(int type, const char *format, ...) __attribute__ ((alias("zend_error"),noreturn)); #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 va_list args; @@ -1245,7 +1245,7 @@ #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; int cur_lineno; http://cvs.php.net/viewvc.cgi/ZendEngine2/zend.h?r1=1.293.2.11.2.9.2.26&r2=1.293.2.11.2.9.2.27&diff_format=u Index: ZendEngine2/zend.h diff -u ZendEngine2/zend.h:1.293.2.11.2.9.2.26 ZendEngine2/zend.h:1.293.2.11.2.9.2.27 --- ZendEngine2/zend.h:1.293.2.11.2.9.2.26 Mon Aug 11 17:19:19 2008 +++ ZendEngine2/zend.h Tue Aug 12 17:20:23 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend.h,v 1.293.2.11.2.9.2.26 2008/08/11 17:19:19 helly Exp $ */ +/* $Id: zend.h,v 1.293.2.11.2.9.2.27 2008/08/12 17:20:23 felipe Exp $ */ #ifndef ZEND_H #define ZEND_H @@ -473,7 +473,7 @@ void (*message_handler)(long message, void *data); void (*block_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 (*on_timeout)(int seconds TSRMLS_DC); int (*stream_open_function)(const char *filename, zend_file_handle *handle TSRMLS_DC); @@ -572,7 +572,7 @@ 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_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_ATTRIBUTE_FORMAT(printf, 2, 3); +ZEND_API void zend_output_debug_string(zend_bool trigger_break, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3); END_EXTERN_C() void zend_activate(TSRMLS_D); @@ -623,7 +623,7 @@ ZEND_API void zend_error(int type, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3); -void zenderror(char *error); +void zenderror(const char *error); /* The following #define is used for code duality in PHP for Engine 1 & 2 */ #define ZEND_STANDARD_CLASS_DEF_PTR zend_standard_class_def @@ -641,7 +641,7 @@ BEGIN_EXTERN_C() 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); END_EXTERN_C() /* Messages for applications of Zend */ http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_API.c?r1=1.296.2.27.2.34.2.49&r2=1.296.2.27.2.34.2.50&diff_format=u Index: ZendEngine2/zend_API.c diff -u ZendEngine2/zend_API.c:1.296.2.27.2.34.2.49 ZendEngine2/zend_API.c:1.296.2.27.2.34.2.50 --- ZendEngine2/zend_API.c:1.296.2.27.2.34.2.49 Mon Aug 11 17:19:19 2008 +++ ZendEngine2/zend_API.c Tue Aug 12 17:20:23 2008 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_API.c,v 1.296.2.27.2.34.2.49 2008/08/11 17:19:19 helly Exp $ */ +/* $Id: zend_API.c,v 1.296.2.27.2.34.2.50 2008/08/12 17:20:23 felipe Exp $ */ #include "zend.h" #include "zend_execute.h" @@ -219,13 +219,13 @@ } /* }}} */ -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)); } /* }}} */ -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) { return Z_OBJ_HT_P(zobject)->get_class_entry(zobject TSRMLS_CC); @@ -237,7 +237,7 @@ /* }}} */ /* returns 1 if you need to copy result, 0 if it's already a copy */ -ZEND_API int zend_get_object_classname(zval *object, char **class_name, zend_uint *class_name_len TSRMLS_DC) /* {{{ */ +ZEND_API int zend_get_object_classname(const zval *object, char **class_name, zend_uint *class_name_len TSRMLS_DC) /* {{{ */ { 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) { @@ -291,7 +291,7 @@ } /* }}} */ -static char *zend_parse_arg_impl(int arg_num, zval **arg, va_list *va, char **spec, char **error, int *severity TSRMLS_DC) /* {{{ */ +static char *zend_parse_arg_impl(int arg_num, zval **arg, const va_list *va, char **spec, char **error, int *severity TSRMLS_DC) /* {{{ */ { char *spec_walk = *spec; char c = *spec_walk++; @@ -617,7 +617,7 @@ } /* }}} */ -static int zend_parse_arg(int arg_num, zval **arg, va_list *va, char **spec, int quiet TSRMLS_DC) /* {{{ */ +static int zend_parse_arg(int arg_num, zval **arg, const va_list *va, char **spec, int quiet TSRMLS_DC) /* {{{ */ { char *expected_type = NULL, *error = NULL; int severity = E_WARNING; @@ -647,7 +647,7 @@ } /* }}} */ -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; int c, i; @@ -871,6 +871,7 @@ object = va_arg(va, zval **); ce = va_arg(va, zend_class_entry *); *object = this_ptr; + if (ce && !instanceof_function(Z_OBJCE_P(this_ptr), ce TSRMLS_CC)) { zend_error(E_CORE_ERROR, "%s::%s() must be derived from %s::%s", ce->name, get_active_function_name(TSRMLS_C), Z_OBJCE_P(this_ptr)->name, get_active_function_name(TSRMLS_C)); @@ -907,6 +908,7 @@ object = va_arg(va, zval **); ce = va_arg(va, zend_class_entry *); *object = this_ptr; + if (ce && !instanceof_function(Z_OBJCE_P(this_ptr), ce TSRMLS_CC)) { if (!quiet) { zend_error(E_CORE_ERROR, "%s::%s() must be derived from %s::%s", @@ -933,7 +935,7 @@ } /* }}} */ -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 ? */ if (hash_key->nKeyLength) { @@ -1396,7 +1398,7 @@ } /* }}} */ -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 *z_key; @@ -1414,7 +1416,7 @@ } /* }}} */ -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 *z_key; @@ -1432,7 +1434,7 @@ } /* }}} */ -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 *z_key; @@ -1450,7 +1452,7 @@ } /* }}} */ -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 *z_key; @@ -1468,7 +1470,7 @@ } /* }}} */ -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 *z_key; @@ -1486,7 +1488,7 @@ } /* }}} */ -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 *z_key; @@ -1504,7 +1506,7 @@ } /* }}} */ -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 *z_key; @@ -1522,7 +1524,7 @@ } /* }}} */ -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; @@ -1702,7 +1704,7 @@ } /* }}} */ -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) /* {{{ */ { char lcname[16]; int name_len; @@ -2043,7 +2045,7 @@ } /* }}} */ -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; @@ -2122,7 +2124,7 @@ } /* }}} */ -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; } @@ -2213,7 +2215,7 @@ } /* }}} */ -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); int ret; @@ -2227,7 +2229,7 @@ } /* }}} */ -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; va_list symbol_table_list; @@ -2304,7 +2306,7 @@ } /* }}} */ -static int zend_is_callable_check_class(char *name, int name_len, zend_fcall_info_cache *fcc, char **error TSRMLS_DC) /* {{{ */ +static int zend_is_callable_check_class(const char *name, int name_len, zend_fcall_info_cache *fcc, char **error TSRMLS_DC) /* {{{ */ { int ret = 0; zend_class_entry **pce; @@ -2962,7 +2964,7 @@ } /* }}} */ -ZEND_API int zend_declare_property_ex(zend_class_entry *ce, char *name, int name_length, zval *property, int access_type, char *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, char *doc_comment, int doc_comment_len TSRMLS_DC) /* {{{ */ { zend_property_info property_info; HashTable *target_symbol_table; @@ -3134,13 +3136,13 @@ } /* }}} */ -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_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; @@ -3155,7 +3157,7 @@ } /* }}} */ -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; @@ -3170,7 +3172,7 @@ } /* }}} */ -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; @@ -3185,7 +3187,7 @@ } /* }}} */ -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; @@ -3200,7 +3202,7 @@ } /* }}} */ -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; @@ -3216,7 +3218,7 @@ } /* }}} */ -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); } @@ -3294,7 +3296,7 @@ } /* }}} */ -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; @@ -3306,7 +3308,7 @@ } /* }}} */ -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; @@ -3401,7 +3403,7 @@ } /* }}} */ -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; @@ -3413,7 +3415,7 @@ } /* }}} */ -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; http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_API.h?r1=1.207.2.8.2.8.2.16&r2=1.207.2.8.2.8.2.17&diff_format=u Index: ZendEngine2/zend_API.h diff -u ZendEngine2/zend_API.h:1.207.2.8.2.8.2.16 ZendEngine2/zend_API.h:1.207.2.8.2.8.2.17 --- ZendEngine2/zend_API.h:1.207.2.8.2.8.2.16 Sat Aug 2 04:46:05 2008 +++ ZendEngine2/zend_API.h Tue Aug 12 17:20:24 2008 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_API.h,v 1.207.2.8.2.8.2.16 2008/08/02 04:46:05 felipe Exp $ */ +/* $Id: zend_API.h,v 1.207.2.8.2.8.2.17 2008/08/12 17:20:24 felipe Exp $ */ #ifndef ZEND_API_H #define ZEND_API_H @@ -237,7 +237,7 @@ #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_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_ex(int flags, int num_args TSRMLS_DC, zval *this_ptr, char *type_spec, ...); @@ -251,14 +251,14 @@ 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_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_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 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); #define zend_register_class_alias(name, ce) \ zend_register_class_alias_ex(name, sizeof(name)-1, ce TSRMLS_DC) @@ -281,9 +281,9 @@ ZEND_API zend_bool zend_is_callable(zval *callable, uint check_flags, char **callable_name TSRMLS_DC); ZEND_API zend_bool zend_make_callable(zval *callable, char **callable_name TSRMLS_DC); 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_ex(zend_class_entry *ce, char *name, int name_length, zval *property, int access_type, char *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, char *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_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); @@ -291,13 +291,13 @@ ZEND_API int zend_declare_property_string(zend_class_entry *ce, char *name, int name_length, char *value, int access_type TSRMLS_DC); ZEND_API int zend_declare_property_stringl(zend_class_entry *ce, char *name, int name_length, char *value, int value_len, int access_type 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_null(zend_class_entry *ce, 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_bool(zend_class_entry *ce, 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_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_string(zend_class_entry *ce, char *name, size_t name_length, char *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, const char *name, size_t name_length 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, const char *name, size_t name_length, zend_bool 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, 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, 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_property(zend_class_entry *scope, zval *object, char *name, int name_length, zval *value TSRMLS_DC); @@ -305,23 +305,23 @@ 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_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_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_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, const char *value, int value_length TSRMLS_DC); ZEND_API int zend_update_static_property(zend_class_entry *scope, char *name, int name_length, zval *value TSRMLS_DC); ZEND_API int zend_update_static_property_null(zend_class_entry *scope, char *name, int name_length 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_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_stringl(zend_class_entry *scope, char *name, int name_length, char *value, int value_length 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, const char *value, int value_length TSRMLS_DC); ZEND_API zval *zend_read_property(zend_class_entry *scope, zval *object, 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 int zend_get_object_classname(zval *object, char **class_name, zend_uint *class_name_len TSRMLS_DC); +ZEND_API zend_class_entry *zend_get_class_entry(const zval *zobject TSRMLS_DC); +ZEND_API int zend_get_object_classname(const zval *object, char **class_name, zend_uint *class_name_len TSRMLS_DC); ZEND_API char *zend_get_type_by_const(int type); #define getThis() (this_ptr) @@ -405,14 +405,14 @@ ZEND_API int add_get_index_string(zval *arg, ulong idx, const char *str, void **dest, int duplicate); ZEND_API int add_get_index_stringl(zval *arg, ulong idx, const char *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_null_ex(zval *arg, 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_resource_ex(zval *arg, 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_string_ex(zval *arg, 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_zval_ex(zval *arg, char *key, uint key_len, zval *value 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, const char *key, uint key_len 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, const char *key, uint key_len, long r 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, const char *key, uint key_len, char *str, 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, const char *key, uint key_len, zval *value TSRMLS_DC); #define add_property_long(__arg, __key, __n) add_property_long_ex(__arg, __key, strlen(__key)+1, __n TSRMLS_CC) #define add_property_null(__arg, __key) add_property_null_ex(__arg, __key, strlen(__key) + 1 TSRMLS_CC) @@ -486,7 +486,7 @@ 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); http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_compile.c?r1=1.647.2.27.2.41.2.81&r2=1.647.2.27.2.41.2.82&diff_format=u Index: ZendEngine2/zend_compile.c diff -u ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.81 ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.82 --- ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.81 Sun Aug 3 11:48:20 2008 +++ ZendEngine2/zend_compile.c Tue Aug 12 17:20:24 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.c,v 1.647.2.27.2.41.2.81 2008/08/03 11:48:20 jani Exp $ */ +/* $Id: zend_compile.c,v 1.647.2.27.2.41.2.82 2008/08/12 17:20:24 felipe Exp $ */ #include <zend_language_parser.h> #include "zend.h" @@ -69,7 +69,7 @@ free(property_info->name); } -static void build_runtime_defined_function_key(zval *result, char *name, int name_length TSRMLS_DC) +static void build_runtime_defined_function_key(zval *result, const char *name, int name_length TSRMLS_DC) { char char_pos_buf[32]; uint char_pos_len; @@ -104,7 +104,7 @@ } -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_auto_global *auto_global; @@ -195,7 +195,7 @@ } -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; int length = strlen(new_compiled_filename); @@ -267,7 +267,7 @@ } -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); @@ -280,7 +280,7 @@ } -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); @@ -295,14 +295,14 @@ #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->op1 = *value; SET_UNUSED(data_op->op2); } -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)); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); @@ -462,7 +462,7 @@ } -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_llist *fetch_list_ptr; @@ -482,7 +482,7 @@ } -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) { #ifdef ilia_0 zend_error(E_DEPRECATED, "Usage of {} to access string offsets is deprecated and will be removed in PHP 6"); @@ -491,7 +491,7 @@ } -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); @@ -504,7 +504,7 @@ } -void zend_do_echo(znode *arg TSRMLS_DC) +void zend_do_echo(const znode *arg TSRMLS_DC) { zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); @@ -513,7 +513,7 @@ SET_UNUSED(opline->op2); } -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; @@ -545,7 +545,7 @@ } } -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) && (opline->op1.u.constant.type == IS_STRING) @@ -557,7 +557,7 @@ } } -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; zend_op *opline; @@ -653,14 +653,14 @@ *result = opline->result; } -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; return ((type & ZEND_PARSED_METHOD_CALL) || (type == ZEND_PARSED_FUNCTION_CALL)); } -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; @@ -729,7 +729,7 @@ } -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)); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); @@ -744,7 +744,7 @@ } -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); @@ -763,7 +763,7 @@ } -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)); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); @@ -775,7 +775,7 @@ } -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); @@ -791,7 +791,7 @@ } -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); @@ -807,7 +807,7 @@ } -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)); zend_op *opline; @@ -836,7 +836,7 @@ } -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)); zend_op *opline; @@ -863,7 +863,7 @@ } -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)); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); @@ -876,7 +876,7 @@ } -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)); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); @@ -914,7 +914,7 @@ DEC_BPC(CG(active_op_array)); } -void zend_check_writable_variable(znode *variable) +void zend_check_writable_variable(const znode *variable) { zend_uint type = variable->u.EA.type; @@ -1022,7 +1022,7 @@ } -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; @@ -1055,7 +1055,7 @@ } -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); @@ -1116,7 +1116,7 @@ } -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) && (Z_LVAL(new_modifier->u.constant) & ZEND_ACC_PPP_MASK)) { @@ -1416,7 +1416,7 @@ } -void zend_do_end_function_declaration(znode *function_token TSRMLS_DC) +void zend_do_end_function_declaration(const znode *function_token TSRMLS_DC) { char lcname[16]; int name_len; @@ -1450,7 +1450,7 @@ } -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_arg_info *cur_arg_info; @@ -1612,7 +1612,7 @@ } -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); @@ -1872,7 +1872,7 @@ } /* }}} */ -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); @@ -2007,7 +2007,7 @@ } -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; @@ -2137,7 +2137,7 @@ } -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; @@ -2154,7 +2154,7 @@ return 0; } -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; @@ -2251,7 +2251,7 @@ } -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)); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); @@ -2272,7 +2272,7 @@ } -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--; zend_do_if_end(TSRMLS_C); @@ -2294,7 +2294,7 @@ } -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; zend_op *opline; @@ -2326,7 +2326,7 @@ try_token->u.opline_num = catch_op_number; } -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)); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); @@ -2343,7 +2343,7 @@ CG(active_op_array)->opcodes[try_token->u.opline_num].extended_value = get_next_op_number(CG(active_op_array)); } -void zend_do_throw(znode *expr TSRMLS_DC) +void zend_do_throw(const znode *expr TSRMLS_DC) { zend_op *opline; @@ -2484,7 +2484,7 @@ } -static zend_bool zend_do_perform_implementation_check(zend_function *fe, zend_function *proto) +static zend_bool zend_do_perform_implementation_check(const zend_function *fe, const zend_function *proto) { zend_uint i; @@ -2549,7 +2549,7 @@ } -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 parent_flags = parent->common.fn_flags; @@ -2629,7 +2629,7 @@ } -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_class_entry *parent_ce = ce->parent; @@ -2720,7 +2720,7 @@ } -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 */ zend_uint i, ce_num, if_num = iface->num_interfaces; @@ -2756,7 +2756,7 @@ } } -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*); @@ -2807,7 +2807,7 @@ } -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; @@ -2890,7 +2890,7 @@ } -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; @@ -2921,7 +2921,7 @@ } -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; int found_ce; @@ -3034,7 +3034,7 @@ MAKE_NOP(opline); } -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) { zend_bool orig_in_compilation = CG(in_compilation); @@ -3073,7 +3073,7 @@ } -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); @@ -3108,7 +3108,7 @@ } -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); @@ -3129,7 +3129,7 @@ } -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); @@ -3144,7 +3144,7 @@ } -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); @@ -3162,7 +3162,7 @@ } -void zend_do_switch_cond(znode *cond TSRMLS_DC) +void zend_do_switch_cond(const znode *cond TSRMLS_DC) { zend_switch_entry switch_entry; @@ -3178,7 +3178,7 @@ -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_switch_entry *switch_entry_ptr; @@ -3221,7 +3221,7 @@ } -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); int next_op_number; @@ -3258,7 +3258,7 @@ } -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)); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); @@ -3280,7 +3280,7 @@ -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)); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); @@ -3303,7 +3303,7 @@ } -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; int doing_inheritance = 0; @@ -3423,7 +3423,7 @@ } -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); @@ -3494,7 +3494,7 @@ } -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; int prop_name_length; @@ -3544,7 +3544,7 @@ return SUCCESS; } -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; zend_property_info *existing_property_info; @@ -3590,7 +3590,7 @@ } -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; @@ -3610,7 +3610,7 @@ -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_llist *fetch_list_ptr; @@ -3713,7 +3713,7 @@ } -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)); } @@ -3748,7 +3748,7 @@ } -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; @@ -3759,7 +3759,7 @@ *result = CG(active_op_array)->opcodes[new_token->u.opline_num].result; } -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; @@ -3919,7 +3919,7 @@ } -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); @@ -3955,7 +3955,7 @@ -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); @@ -3978,7 +3978,7 @@ } -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); @@ -3995,7 +3995,7 @@ -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; @@ -4036,7 +4036,7 @@ } -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; @@ -4140,7 +4140,7 @@ } } -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; zend_op *opline; @@ -4214,7 +4214,7 @@ zend_do_fetch_static_variable(varname, &value, is_ref ? ZEND_FETCH_STATIC : ZEND_FETCH_LEXICAL TSRMLS_CC); } -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; znode lval; @@ -4246,7 +4246,7 @@ } -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); @@ -4260,7 +4260,7 @@ } -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); { @@ -4278,7 +4278,7 @@ } -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; @@ -4292,7 +4292,7 @@ } -void zend_do_unset(znode *variable TSRMLS_DC) +void zend_do_unset(const znode *variable TSRMLS_DC) { zend_op *last_op; @@ -4364,7 +4364,7 @@ } -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)); zend_op *opline; @@ -4464,7 +4464,7 @@ } -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; znode dummy, value_node; @@ -4543,7 +4543,7 @@ } -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 *opline = get_next_op(CG(active_op_array) TSRMLS_CC); @@ -4639,7 +4639,7 @@ } -void zend_do_declare_end(znode *declare_token TSRMLS_DC) +void zend_do_declare_end(const znode *declare_token TSRMLS_DC) { zend_declarables *declarables; @@ -4651,7 +4651,7 @@ } -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); @@ -4677,7 +4677,7 @@ } -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); @@ -4687,7 +4687,7 @@ } -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)); zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); @@ -4706,7 +4706,7 @@ } -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); @@ -4724,7 +4724,7 @@ } -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)); zend_op *opline; @@ -4741,7 +4741,7 @@ } -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); @@ -4763,7 +4763,7 @@ } -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); @@ -4846,7 +4846,7 @@ } -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) { zend_auto_global *auto_global; @@ -4860,7 +4860,7 @@ } -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) { zend_auto_global auto_global; @@ -4992,7 +4992,7 @@ } } -ZEND_API char* zend_get_compiled_variable_name(zend_op_array *op_array, zend_uint var, int* name_len) +ZEND_API char* zend_get_compiled_variable_name(const zend_op_array *op_array, zend_uint var, int* name_len) { if (name_len) { *name_len = op_array->vars[var].name_len; @@ -5028,7 +5028,7 @@ } /* }}} */ -void zend_do_namespace(znode *name TSRMLS_DC) /* {{{ */ +void zend_do_namespace(const znode *name TSRMLS_DC) /* {{{ */ { char *lcname; http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_compile.h?r1=1.316.2.8.2.12.2.31&r2=1.316.2.8.2.12.2.32&diff_format=u Index: ZendEngine2/zend_compile.h diff -u ZendEngine2/zend_compile.h:1.316.2.8.2.12.2.31 ZendEngine2/zend_compile.h:1.316.2.8.2.12.2.32 --- ZendEngine2/zend_compile.h:1.316.2.8.2.12.2.31 Mon Jul 28 05:59:16 2008 +++ ZendEngine2/zend_compile.h Tue Aug 12 17:20:24 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.h,v 1.316.2.8.2.12.2.31 2008/07/28 05:59:16 moriyoshi Exp $ */ +/* $Id: zend_compile.h,v 1.316.2.8.2.12.2.32 2008/08/12 17:20:24 felipe Exp $ */ #ifndef ZEND_COMPILE_H #define ZEND_COMPILE_H @@ -353,14 +353,14 @@ void startup_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 char *zend_get_compiled_filename(TSRMLS_D); ZEND_API int zend_get_compiled_lineno(TSRMLS_D); ZEND_API size_t zend_get_scanned_file_offset(TSRMLS_D); void zend_resolve_class_name(znode *class_name, ulong *fetch_type, int check_ns_name TSRMLS_DC); -ZEND_API char* zend_get_compiled_variable_name(zend_op_array *op_array, zend_uint var, int* name_len); +ZEND_API char* zend_get_compiled_variable_name(const zend_op_array *op_array, zend_uint var, int* name_len); #ifdef ZTS const char *zend_get_zendtext(TSRMLS_D); @@ -369,66 +369,66 @@ /* parser-driven code generators */ -void zend_do_binary_op(zend_uchar op, znode *result, znode *op1, znode *op2 TSRMLS_DC); -void zend_do_unary_op(zend_uchar op, znode *result, znode *op1 TSRMLS_DC); -void zend_do_binary_assign_op(zend_uchar op, znode *result, znode *op1, znode *op2 TSRMLS_DC); -void zend_do_assign(znode *result, znode *variable, znode *value TSRMLS_DC); -void zend_do_assign_ref(znode *result, znode *lvar, znode *rvar 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, const znode *op1 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, const znode *value 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_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_fetch_static_variable(znode *varname, 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_indirect_references(znode *result, const znode *num_references, znode *variable 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, 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_dim(znode *result, znode *parent, znode *dim TSRMLS_DC); -void fetch_string_offset(znode *result, znode *parent, znode *offset TSRMLS_DC); +void fetch_array_dim(znode *result, const znode *parent, const znode *dim 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_print(znode *result, znode *arg TSRMLS_DC); -void zend_do_echo(znode *arg TSRMLS_DC); +void zend_do_print(znode *result, const znode *arg TSRMLS_DC); +void zend_do_echo(const znode *arg TSRMLS_DC); typedef int (*unary_op_type)(zval *, zval *); ZEND_API unary_op_type get_unary_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_end(znode *while_token, 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(const znode *while_token, const znode *close_bracket_token TSRMLS_DC); 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_after_statement(znode *closing_bracket_token, unsigned char initialize TSRMLS_DC); +void zend_do_if_cond(const znode *cond, znode *closing_bracket_token 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_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_end(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(const znode *cond_start, const 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_post_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, const znode *op1, zend_uchar op TSRMLS_DC); 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_check_writable_variable(znode *variable); +void zend_check_writable_variable(const znode *variable); 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_variable(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, 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_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_bool pass_by_reference TSRMLS_DC); +void zend_do_end_function_declaration(const znode *function_token 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); 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_fetch_class(znode *result, znode *class_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); -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_handle_exception(TSRMLS_D); @@ -436,94 +436,94 @@ 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_begin_catch(znode *try_token, znode *catch_class, znode *catch_var, znode *first_catch TSRMLS_DC); -void zend_do_end_catch(znode *try_token TSRMLS_DC); -void zend_do_throw(znode *expr 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(const znode *try_token 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 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_inherited_class(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 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(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, const 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); ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce TSRMLS_DC); 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_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_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_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_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_begin_class_declaration(znode *class_token, znode *class_name, znode *parent_class_name TSRMLS_DC); -void zend_do_end_class_declaration(znode *class_token, znode *parent_token TSRMLS_DC); -void zend_do_declare_property(znode *var_name, znode *value, zend_uint access_type TSRMLS_DC); +void zend_do_switch_cond(const znode *cond TSRMLS_DC); +void zend_do_switch_end(const znode *case_list 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, const znode *case_token TSRMLS_DC); +void zend_do_default_before_statement(const znode *case_list, znode *default_token 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(const znode *class_token, const znode *parent_token TSRMLS_DC); +void zend_do_declare_property(const znode *var_name, const znode *value, zend_uint access_type TSRMLS_DC); 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_halt_compiler_register(TSRMLS_D); -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_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_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_add_array_element(znode *result, znode *expr, znode *offset, zend_bool is_ref TSRMLS_DC); -void zend_do_add_static_array_element(znode *result, znode *offset, znode *expr); +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, const znode *expr, const znode *offset, zend_bool is_ref TSRMLS_DC); +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_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_end(TSRMLS_D); -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_cast(znode *result, const znode *expr, int type 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_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_cont(znode *foreach_token, znode *open_brackets_token, 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_cont(znode *foreach_token, const znode *open_brackets_token, const znode *as_token, znode *value, znode *key 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_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_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_else(znode *result, znode *false_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, 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_qm_true(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_begin_qm_op(const znode *cond, znode *qm_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, 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_fcall_begin(TSRMLS_D); @@ -531,16 +531,16 @@ 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_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_end_compilation(TSRMLS_D); 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_release_labels(TSRMLS_D); @@ -567,7 +567,7 @@ ZEND_API void destroy_zend_class(zend_class_entry **pce); 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 mangled_property_len, char **prop_name, char **class_name); #define ZEND_FUNCTION_DTOR (void (*)(void *)) zend_function_dtor @@ -581,10 +581,10 @@ int pass_two(zend_op_array *op_array TSRMLS_DC); 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_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_initialize_try_catch_element(const znode *try_token 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 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); int zend_get_class_fetch_type(const char *class_name, uint class_name_len); @@ -597,9 +597,9 @@ } zend_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 zend_bool zend_is_auto_global(char *name, uint name_len TSRMLS_DC); -ZEND_API int zend_auto_global_disable_jit(char *varname, zend_uint varname_length 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 zend_bool zend_is_auto_global(const char *name, uint name_len 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); int zendlex(znode *zendlval TSRMLS_DC); http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_constants.c?r1=1.71.2.5.2.7.2.11&r2=1.71.2.5.2.7.2.12&diff_format=u Index: ZendEngine2/zend_constants.c diff -u ZendEngine2/zend_constants.c:1.71.2.5.2.7.2.11 ZendEngine2/zend_constants.c:1.71.2.5.2.7.2.12 --- ZendEngine2/zend_constants.c:1.71.2.5.2.7.2.11 Mon Jul 28 14:12:19 2008 +++ ZendEngine2/zend_constants.c Tue Aug 12 17:20:24 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_constants.c,v 1.71.2.5.2.7.2.11 2008/07/28 14:12:19 dmitry Exp $ */ +/* $Id: zend_constants.c,v 1.71.2.5.2.7.2.12 2008/08/12 17:20:24 felipe Exp $ */ #include "zend.h" #include "zend_constants.h" @@ -53,19 +53,19 @@ } -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; } -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; } -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) { return 1; @@ -172,7 +172,7 @@ } -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; @@ -186,7 +186,7 @@ } -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; @@ -200,7 +200,7 @@ } -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; @@ -215,13 +215,13 @@ } -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_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_constant *c; int retval = 1; @@ -272,7 +272,7 @@ return retval; } -ZEND_API int zend_get_constant_ex(char *name, uint name_len, zval *result, zend_class_entry *scope, ulong flags TSRMLS_DC) +ZEND_API int zend_get_constant_ex(const char *name, uint name_len, zval *result, zend_class_entry *scope, ulong flags TSRMLS_DC) { zend_constant *c; int retval = 1; http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_constants.h?r1=1.31.2.2.2.3.2.3&r2=1.31.2.2.2.3.2.4&diff_format=u Index: ZendEngine2/zend_constants.h diff -u ZendEngine2/zend_constants.h:1.31.2.2.2.3.2.3 ZendEngine2/zend_constants.h:1.31.2.2.2.3.2.4 --- ZendEngine2/zend_constants.h:1.31.2.2.2.3.2.3 Mon May 12 07:11:55 2008 +++ ZendEngine2/zend_constants.h Tue Aug 12 17:20:24 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_constants.h,v 1.31.2.2.2.3.2.3 2008/05/12 07:11:55 dmitry Exp $ */ +/* $Id: zend_constants.h,v 1.31.2.2.2.3.2.4 2008/08/12 17:20:24 felipe Exp $ */ #ifndef ZEND_CONSTANTS_H #define ZEND_CONSTANTS_H @@ -60,12 +60,12 @@ int zend_shutdown_constants(TSRMLS_D); void zend_register_standard_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_ex(char *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_double_constant(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_stringl_constant(char *name, uint name_len, char *strval, uint strlen, int flags, int module_number TSRMLS_DC); +ZEND_API int zend_get_constant(const char *name, uint name_len, zval *result TSRMLS_DC); +ZEND_API int zend_get_constant_ex(const char *name, uint name_len, zval *result, zend_class_entry *scope, ulong flags 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(const char *name, uint name_len, double dval, 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(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); void zend_copy_constants(HashTable *target, HashTable *sourc); void copy_zend_constant(zend_constant *c); http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_execute.c?r1=1.716.2.12.2.24.2.34&r2=1.716.2.12.2.24.2.35&diff_format=u Index: ZendEngine2/zend_execute.c diff -u ZendEngine2/zend_execute.c:1.716.2.12.2.24.2.34 ZendEngine2/zend_execute.c:1.716.2.12.2.24.2.35 --- ZendEngine2/zend_execute.c:1.716.2.12.2.24.2.34 Sat Jul 26 17:59:54 2008 +++ ZendEngine2/zend_execute.c Tue Aug 12 17:20:24 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_execute.c,v 1.716.2.12.2.24.2.34 2008/07/26 17:59:54 dmitry Exp $ */ +/* $Id: zend_execute.c,v 1.716.2.12.2.24.2.35 2008/08/12 17:20:24 felipe Exp $ */ #define ZEND_INTENSIVE_DEBUGGING 0 @@ -54,9 +54,9 @@ #define get_obj_zval_ptr_ptr(node, Ts, should_free, type) _get_obj_zval_ptr_ptr(node, Ts, should_free, type TSRMLS_CC) /* Prototypes */ -static void zend_extension_statement_handler(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_end_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(const 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)) @@ -169,17 +169,17 @@ #define DECODE_CTOR(ce) \ ((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]; } -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; } -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) { zval *ptr = T(node->u.var).var.ptr; if (ptr) { @@ -211,7 +211,7 @@ } } -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); @@ -245,7 +245,7 @@ return **ptr; } -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; */ switch (node->op_type) { @@ -273,7 +273,7 @@ return NULL; } -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; @@ -286,7 +286,7 @@ return ptr_ptr; } -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); @@ -321,7 +321,7 @@ return *ptr; } -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) { should_free->var = 0; @@ -344,7 +344,7 @@ } } -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 (EXPECTED(EG(This) != NULL)) { @@ -369,7 +369,7 @@ } } -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 (EXPECTED(EG(This) != NULL)) { @@ -466,7 +466,7 @@ } } -static inline int zend_verify_arg_error(zend_function *zf, zend_uint arg_num, const zend_arg_info *cur_arg_info, const char *need_msg, const char *need_kind, char *given_msg, char *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, const char *need_msg, const char *need_kind, const char *given_msg, char *given_kind TSRMLS_DC) { zend_execute_data *ptr = EG(current_execute_data)->prev_execute_data; char *fname = zf->common.function_name; @@ -529,8 +529,8 @@ return 1; } +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) -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) { zval *object; zend_free_op free_value; @@ -619,7 +619,7 @@ FREE_OP_IF_VAR(free_value); } -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 (Z_TYPE_P(T->str_offset.str) == IS_STRING) { @@ -749,7 +749,7 @@ /* 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) { extension->statement_handler(op_array); @@ -757,7 +757,7 @@ } -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) { extension->fcall_begin_handler(op_array); @@ -765,7 +765,7 @@ } -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) { extension->fcall_end_handler(op_array); @@ -773,7 +773,7 @@ } -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) { case ZEND_FETCH_LOCAL: @@ -798,7 +798,7 @@ return NULL; } -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; char *offset_key; @@ -1210,7 +1210,7 @@ } } -static inline zend_brk_cont_element* zend_brk_cont(zval *nest_levels_zval, int array_offset, zend_op_array *op_array, temp_variable *Ts TSRMLS_DC) +static inline zend_brk_cont_element* zend_brk_cont(const zval *nest_levels_zval, int array_offset, const zend_op_array *op_array, const temp_variable *Ts TSRMLS_DC) { zval tmp; int nest_levels, original_nest_levels; @@ -1323,11 +1323,11 @@ return zend_user_opcode_handlers[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); } -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); } http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_execute.h?r1=1.84.2.4.2.8.2.10&r2=1.84.2.4.2.8.2.11&diff_format=u Index: ZendEngine2/zend_execute.h diff -u ZendEngine2/zend_execute.h:1.84.2.4.2.8.2.10 ZendEngine2/zend_execute.h:1.84.2.4.2.8.2.11 --- ZendEngine2/zend_execute.h:1.84.2.4.2.8.2.10 Wed Jun 11 13:18:39 2008 +++ ZendEngine2/zend_execute.h Tue Aug 12 17:20:24 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_execute.h,v 1.84.2.4.2.8.2.10 2008/06/11 13:18:39 dmitry Exp $ */ +/* $Id: zend_execute.h,v 1.84.2.4.2.8.2.11 2008/08/12 17:20:24 felipe Exp $ */ #ifndef ZEND_EXECUTE_H #define ZEND_EXECUTE_H @@ -323,7 +323,7 @@ */ #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 : "") -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); #define ZEND_USER_OPCODE_CONTINUE 0 /* execute next opcode */ #define ZEND_USER_OPCODE_RETURN 1 /* exit from executor (return from function) */ @@ -340,8 +340,8 @@ /* int is_var; */ } 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_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(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); http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_extensions.c?r1=1.48.2.1.2.3.2.1&r2=1.48.2.1.2.3.2.2&diff_format=u Index: ZendEngine2/zend_extensions.c diff -u ZendEngine2/zend_extensions.c:1.48.2.1.2.3.2.1 ZendEngine2/zend_extensions.c:1.48.2.1.2.3.2.2 --- ZendEngine2/zend_extensions.c:1.48.2.1.2.3.2.1 Mon Dec 31 07:17:04 2007 +++ ZendEngine2/zend_extensions.c Tue Aug 12 17:20:24 2008 @@ -17,14 +17,14 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_extensions.c,v 1.48.2.1.2.3.2.1 2007/12/31 07:17:04 sebastian Exp $ */ +/* $Id: zend_extensions.c,v 1.48.2.1.2.3.2.2 2008/08/12 17:20:24 felipe Exp $ */ #include "zend_extensions.h" ZEND_API zend_llist zend_extensions; static int last_resource_number; -int zend_load_extension(char *path) +int zend_load_extension(const char *path) { #if ZEND_EXTENSIONS_SUPPORT DL_HANDLE handle; @@ -178,7 +178,7 @@ } -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; void *arg; @@ -211,7 +211,7 @@ } -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; http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_extensions.h?r1=1.67.2.3.2.3.2.2&r2=1.67.2.3.2.3.2.3&diff_format=u Index: ZendEngine2/zend_extensions.h diff -u ZendEngine2/zend_extensions.h:1.67.2.3.2.3.2.2 ZendEngine2/zend_extensions.h:1.67.2.3.2.3.2.3 --- ZendEngine2/zend_extensions.h:1.67.2.3.2.3.2.2 Mon Dec 31 07:17:04 2007 +++ ZendEngine2/zend_extensions.h Tue Aug 12 17:20:24 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_extensions.h,v 1.67.2.3.2.3.2.2 2007/12/31 07:17:04 sebastian Exp $ */ +/* $Id: zend_extensions.h,v 1.67.2.3.2.3.2.3 2008/08/12 17:20:24 felipe Exp $ */ #ifndef ZEND_EXTENSIONS_H #define ZEND_EXTENSIONS_H @@ -110,15 +110,15 @@ ZEND_API extern zend_llist zend_extensions; 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(void); void zend_shutdown_extensions(TSRMLS_D); 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 zend_extension *zend_get_extension(char *extension_name); +ZEND_API zend_extension *zend_get_extension(const char *extension_name); END_EXTERN_C() #endif /* ZEND_EXTENSIONS_H */ http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_hash.c?r1=1.121.2.4.2.8.2.6&r2=1.121.2.4.2.8.2.7&diff_format=u Index: ZendEngine2/zend_hash.c diff -u ZendEngine2/zend_hash.c:1.121.2.4.2.8.2.6 ZendEngine2/zend_hash.c:1.121.2.4.2.8.2.7 --- ZendEngine2/zend_hash.c:1.121.2.4.2.8.2.6 Thu Aug 7 11:51:54 2008 +++ ZendEngine2/zend_hash.c Tue Aug 12 17:20:24 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_hash.c,v 1.121.2.4.2.8.2.6 2008/08/07 11:51:54 tony2001 Exp $ */ +/* $Id: zend_hash.c,v 1.121.2.4.2.8.2.7 2008/08/12 17:20:24 felipe Exp $ */ #include "zend.h" @@ -48,7 +48,7 @@ #define HT_DESTROYED 2 #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) { return; @@ -866,7 +866,7 @@ * 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 */ -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) { ulong h; uint nIndex; @@ -891,7 +891,7 @@ } -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, const char *arKey, uint nKeyLength, ulong h, void **pData) { uint nIndex; Bucket *p; @@ -918,7 +918,7 @@ } -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) { ulong h; uint nIndex; @@ -942,7 +942,7 @@ } -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) { uint nIndex; Bucket *p; @@ -969,7 +969,7 @@ } -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; Bucket *p; @@ -990,7 +990,7 @@ } -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; Bucket *p; @@ -1010,7 +1010,7 @@ } -ZEND_API int zend_hash_num_elements(HashTable *ht) +ZEND_API int zend_hash_num_elements(const HashTable *ht) { IS_CONSISTENT(ht); @@ -1018,7 +1018,7 @@ } -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; if (ht->pInternalPointer) { @@ -1104,7 +1104,7 @@ /* This function should be made binary safe */ -ZEND_API int zend_hash_get_current_key_ex(HashTable *ht, char **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, char **str_index, uint *str_length, ulong *num_index, zend_bool duplicate, HashPosition *pos) { Bucket *p; @@ -1480,7 +1480,7 @@ } -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; @@ -1507,7 +1507,7 @@ return SUCCESS; } -ZEND_API ulong zend_hash_next_free_element(HashTable *ht) +ZEND_API ulong zend_hash_next_free_element(const HashTable *ht) { IS_CONSISTENT(ht); @@ -1517,7 +1517,7 @@ #if ZEND_DEBUG -void zend_hash_display_pListTail(HashTable *ht) +void zend_hash_display_pListTail(const HashTable *ht) { Bucket *p; @@ -1528,7 +1528,7 @@ } } -void zend_hash_display(HashTable *ht) +void zend_hash_display(const HashTable *ht) { Bucket *p; uint i; http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_hash.h?r1=1.78.2.2.2.2.2.6&r2=1.78.2.2.2.2.2.7&diff_format=u Index: ZendEngine2/zend_hash.h diff -u ZendEngine2/zend_hash.h:1.78.2.2.2.2.2.6 ZendEngine2/zend_hash.h:1.78.2.2.2.2.2.7 --- ZendEngine2/zend_hash.h:1.78.2.2.2.2.2.6 Fri Aug 1 14:22:03 2008 +++ ZendEngine2/zend_hash.h Tue Aug 12 17:20:24 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_hash.h,v 1.78.2.2.2.2.2.6 2008/08/01 14:22:03 dmitry Exp $ */ +/* $Id: zend_hash.h,v 1.78.2.2.2.2.2.7 2008/08/12 17:20:24 felipe Exp $ */ #ifndef ZEND_HASH_H #define ZEND_HASH_H @@ -160,15 +160,15 @@ ZEND_API ulong zend_get_hash_value(const char *arKey, uint nKeyLength); /* Data retreival */ -ZEND_API int zend_hash_find(HashTable *ht, const char *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_index_find(HashTable *ht, ulong h, void **pData); +ZEND_API int zend_hash_find(const HashTable *ht, const char *arKey, uint nKeyLength, void **pData); +ZEND_API int zend_hash_quick_find(const HashTable *ht, const char *arKey, uint nKeyLength, ulong h, void **pData); +ZEND_API int zend_hash_index_find(const HashTable *ht, ulong h, void **pData); /* Misc */ -ZEND_API int zend_hash_exists(HashTable *ht, const char *arKey, uint nKeyLength); -ZEND_API int zend_hash_quick_exists(HashTable *ht, const char *arKey, uint nKeyLength, ulong h); -ZEND_API int zend_hash_index_exists(HashTable *ht, ulong h); -ZEND_API ulong zend_hash_next_free_element(HashTable *ht); +ZEND_API int zend_hash_exists(const HashTable *ht, const char *arKey, uint nKeyLength); +ZEND_API int zend_hash_quick_exists(const HashTable *ht, const char *arKey, uint nKeyLength, ulong h); +ZEND_API int zend_hash_index_exists(const HashTable *ht, ulong h); +ZEND_API ulong zend_hash_next_free_element(const HashTable *ht); /* traversing */ @@ -176,7 +176,7 @@ (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_backwards_ex(HashTable *ht, HashPosition *pos); -ZEND_API int zend_hash_get_current_key_ex(HashTable *ht, char **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, char **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_data_ex(HashTable *ht, void **pData, HashPosition *pos); ZEND_API void zend_hash_internal_pointer_reset_ex(HashTable *ht, HashPosition *pos); @@ -188,7 +188,7 @@ ulong h; } 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); #define zend_hash_has_more_elements(ht) \ @@ -216,12 +216,12 @@ 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_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) \ _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); @@ -292,8 +292,8 @@ #if ZEND_DEBUG /* debug */ -void zend_hash_display_pListTail(HashTable *ht); -void zend_hash_display(HashTable *ht); +void zend_hash_display_pListTail(const HashTable *ht); +void zend_hash_display(const HashTable *ht); #endif END_EXTERN_C() http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_modules.h?r1=1.67.2.3.2.4.2.5&r2=1.67.2.3.2.4.2.6&diff_format=u Index: ZendEngine2/zend_modules.h diff -u ZendEngine2/zend_modules.h:1.67.2.3.2.4.2.5 ZendEngine2/zend_modules.h:1.67.2.3.2.4.2.6 --- ZendEngine2/zend_modules.h:1.67.2.3.2.4.2.5 Mon Jul 7 14:22:02 2008 +++ ZendEngine2/zend_modules.h Tue Aug 12 17:20:24 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_modules.h,v 1.67.2.3.2.4.2.5 2008/07/07 14:22:02 felipe Exp $ */ +/* $Id: zend_modules.h,v 1.67.2.3.2.4.2.6 2008/08/12 17:20:24 felipe Exp $ */ #ifndef MODULES_H #define MODULES_H @@ -121,7 +121,7 @@ void module_destructor(zend_module_entry *module); int module_registry_cleanup(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 #endif http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_object_handlers.c?r1=1.135.2.6.2.22.2.18&r2=1.135.2.6.2.22.2.19&diff_format=u Index: ZendEngine2/zend_object_handlers.c diff -u ZendEngine2/zend_object_handlers.c:1.135.2.6.2.22.2.18 ZendEngine2/zend_object_handlers.c:1.135.2.6.2.22.2.19 --- ZendEngine2/zend_object_handlers.c:1.135.2.6.2.22.2.18 Sat Jul 26 13:14:00 2008 +++ ZendEngine2/zend_object_handlers.c Tue Aug 12 17:20:24 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_object_handlers.c,v 1.135.2.6.2.22.2.18 2008/07/26 13:14:00 dmitry Exp $ */ +/* $Id: zend_object_handlers.c,v 1.135.2.6.2.22.2.19 2008/08/12 17:20:24 felipe Exp $ */ #include "zend.h" #include "zend_globals.h" @@ -1161,7 +1161,7 @@ } /* }}} */ -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; zobj = Z_OBJ_P(object); @@ -1170,7 +1170,7 @@ } /* }}} */ -int zend_std_object_get_class_name(zval *object, char **class_name, zend_uint *class_name_len, int parent TSRMLS_DC) /* {{{ */ +int zend_std_object_get_class_name(const zval *object, char **class_name, zend_uint *class_name_len, int parent TSRMLS_DC) /* {{{ */ { zend_object *zobj; zend_class_entry *ce; http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_object_handlers.h?r1=1.47.2.2.2.5.2.3&r2=1.47.2.2.2.5.2.4&diff_format=u Index: ZendEngine2/zend_object_handlers.h diff -u ZendEngine2/zend_object_handlers.h:1.47.2.2.2.5.2.3 ZendEngine2/zend_object_handlers.h:1.47.2.2.2.5.2.4 --- ZendEngine2/zend_object_handlers.h:1.47.2.2.2.5.2.3 Mon Dec 31 07:17:04 2007 +++ ZendEngine2/zend_object_handlers.h Tue Aug 12 17:20:24 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_object_handlers.h,v 1.47.2.2.2.5.2.3 2007/12/31 07:17:04 sebastian Exp $ */ +/* $Id: zend_object_handlers.h,v 1.47.2.2.2.5.2.4 2008/08/12 17:20:24 felipe Exp $ */ #ifndef ZEND_OBJECT_HANDLERS_H #define ZEND_OBJECT_HANDLERS_H @@ -96,8 +96,8 @@ 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_class_entry *(*zend_object_get_class_entry_t)(zval *object TSRMLS_DC); -typedef int (*zend_object_get_class_name_t)(zval *object, char **class_name, zend_uint *class_name_len, int parent 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)(const zval *object, char **class_name, zend_uint *class_name_len, int parent TSRMLS_DC); typedef int (*zend_object_compare_t)(zval *object1, zval *object2 TSRMLS_DC); /* Cast an object to some other type http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_objects.c?r1=1.56.2.3.2.6.2.4&r2=1.56.2.3.2.6.2.5&diff_format=u Index: ZendEngine2/zend_objects.c diff -u ZendEngine2/zend_objects.c:1.56.2.3.2.6.2.4 ZendEngine2/zend_objects.c:1.56.2.3.2.6.2.5 --- ZendEngine2/zend_objects.c:1.56.2.3.2.6.2.4 Sun Jul 13 21:42:49 2008 +++ ZendEngine2/zend_objects.c Tue Aug 12 17:20:24 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_objects.c,v 1.56.2.3.2.6.2.4 2008/07/13 21:42:49 helly Exp $ */ +/* $Id: zend_objects.c,v 1.56.2.3.2.6.2.5 2008/08/12 17:20:24 felipe Exp $ */ #include "zend.h" #include "zend_globals.h" @@ -122,7 +122,7 @@ return retval; } -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); } http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_objects.h?r1=1.25.2.2.2.1.2.1&r2=1.25.2.2.2.1.2.2&diff_format=u Index: ZendEngine2/zend_objects.h diff -u ZendEngine2/zend_objects.h:1.25.2.2.2.1.2.1 ZendEngine2/zend_objects.h:1.25.2.2.2.1.2.2 --- ZendEngine2/zend_objects.h:1.25.2.2.2.1.2.1 Mon Dec 31 07:17:04 2007 +++ ZendEngine2/zend_objects.h Tue Aug 12 17:20:24 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_objects.h,v 1.25.2.2.2.1.2.1 2007/12/31 07:17:04 sebastian Exp $ */ +/* $Id: zend_objects.h,v 1.25.2.2.2.1.2.2 2008/08/12 17:20:24 felipe Exp $ */ #ifndef ZEND_OBJECTS_H #define ZEND_OBJECTS_H @@ -29,7 +29,7 @@ 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 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 zend_object_value zend_objects_clone_obj(zval *object TSRMLS_DC); ZEND_API void zend_objects_free_object_storage(zend_object *object TSRMLS_DC); http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_objects_API.c?r1=1.47.2.6.2.6.2.5&r2=1.47.2.6.2.6.2.6&diff_format=u Index: ZendEngine2/zend_objects_API.c diff -u ZendEngine2/zend_objects_API.c:1.47.2.6.2.6.2.5 ZendEngine2/zend_objects_API.c:1.47.2.6.2.6.2.6 --- ZendEngine2/zend_objects_API.c:1.47.2.6.2.6.2.5 Tue Feb 19 17:05:41 2008 +++ ZendEngine2/zend_objects_API.c Tue Aug 12 17:20:24 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_objects_API.c,v 1.47.2.6.2.6.2.5 2008/02/19 17:05:41 dmitry Exp $ */ +/* $Id: zend_objects_API.c,v 1.47.2.6.2.6.2.6 2008/08/12 17:20:24 felipe Exp $ */ #include "zend.h" #include "zend_globals.h" @@ -254,7 +254,7 @@ return retval; } -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); http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_objects_API.h?r1=1.20.2.1.2.4.2.2&r2=1.20.2.1.2.4.2.3&diff_format=u Index: ZendEngine2/zend_objects_API.h diff -u ZendEngine2/zend_objects_API.h:1.20.2.1.2.4.2.2 ZendEngine2/zend_objects_API.h:1.20.2.1.2.4.2.3 --- ZendEngine2/zend_objects_API.h:1.20.2.1.2.4.2.2 Tue Jan 22 09:27:47 2008 +++ ZendEngine2/zend_objects_API.h Tue Aug 12 17:20:24 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_objects_API.h,v 1.20.2.1.2.4.2.2 2008/01/22 09:27:47 dmitry Exp $ */ +/* $Id: zend_objects_API.h,v 1.20.2.1.2.4.2.3 2008/08/12 17:20:24 felipe Exp $ */ #ifndef ZEND_OBJECTS_API_H #define ZEND_OBJECTS_API_H @@ -69,7 +69,7 @@ ZEND_API void zend_objects_store_del_ref_by_handle(zend_object_handle handle TSRMLS_DC); ZEND_API zend_uint zend_objects_store_get_refcount(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); /* 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); http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_operators.c?r1=1.208.2.4.2.23.2.13&r2=1.208.2.4.2.23.2.14&diff_format=u Index: ZendEngine2/zend_operators.c diff -u ZendEngine2/zend_operators.c:1.208.2.4.2.23.2.13 ZendEngine2/zend_operators.c:1.208.2.4.2.23.2.14 --- ZendEngine2/zend_operators.c:1.208.2.4.2.23.2.13 Thu Aug 7 08:36:24 2008 +++ ZendEngine2/zend_operators.c Tue Aug 12 17:20:24 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_operators.c,v 1.208.2.4.2.23.2.13 2008/08/07 08:36:24 tony2001 Exp $ */ +/* $Id: zend_operators.c,v 1.208.2.4.2.23.2.14 2008/08/12 17:20:24 felipe Exp $ */ #include <ctype.h> @@ -1202,7 +1202,7 @@ /* 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) { Z_STRLEN_P(result) = Z_STRLEN_P(op1) + 1; Z_STRVAL_P(result) = (char *) erealloc(Z_STRVAL_P(op1), Z_STRLEN_P(result)+1); @@ -1214,7 +1214,7 @@ /* 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) { int length = Z_STRLEN_P(op1) + Z_STRLEN_P(op2); @@ -1640,7 +1640,7 @@ } -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; @@ -1661,7 +1661,7 @@ return 0; } -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); } http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_operators.h?r1=1.94.2.4.2.10.2.10&r2=1.94.2.4.2.10.2.11&diff_format=u Index: ZendEngine2/zend_operators.h diff -u ZendEngine2/zend_operators.h:1.94.2.4.2.10.2.10 ZendEngine2/zend_operators.h:1.94.2.4.2.10.2.11 --- ZendEngine2/zend_operators.h:1.94.2.4.2.10.2.10 Tue Aug 5 20:14:27 2008 +++ ZendEngine2/zend_operators.h Tue Aug 12 17:20:24 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_operators.h,v 1.94.2.4.2.10.2.10 2008/08/05 20:14:27 stas Exp $ */ +/* $Id: zend_operators.h,v 1.94.2.4.2.10.2.11 2008/08/12 17:20:24 felipe Exp $ */ #ifndef ZEND_OPERATORS_H #define ZEND_OPERATORS_H @@ -71,8 +71,8 @@ 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 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(zend_class_entry *instance_ce, zend_class_entry *ce 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(const zend_class_entry *instance_ce, const zend_class_entry *ce TSRMLS_DC); END_EXTERN_C() #define ZEND_IS_DIGIT(c) ((c) >= '0' && (c) <= '9') @@ -280,8 +280,8 @@ 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_string_ex(int argc, ...); -ZEND_API int add_char_to_string(zval *result, zval *op1, zval *op2); -ZEND_API int add_string_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, const zval *op1, const zval *op2); #define convert_to_string(op) if ((op)->type != IS_STRING) { _convert_to_string((op) ZEND_FILE_LINE_CC); } ZEND_API double zend_string_to_double(const char *number, zend_uint length); http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_stack.c?r1=1.16.2.1.2.1.2.2&r2=1.16.2.1.2.1.2.3&diff_format=u Index: ZendEngine2/zend_stack.c diff -u ZendEngine2/zend_stack.c:1.16.2.1.2.1.2.2 ZendEngine2/zend_stack.c:1.16.2.1.2.1.2.3 --- ZendEngine2/zend_stack.c:1.16.2.1.2.1.2.2 Sun Mar 16 21:05:33 2008 +++ ZendEngine2/zend_stack.c Tue Aug 12 17:20:24 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_stack.c,v 1.16.2.1.2.1.2.2 2008/03/16 21:05:33 helly Exp $ */ +/* $Id: zend_stack.c,v 1.16.2.1.2.1.2.3 2008/08/12 17:20:24 felipe Exp $ */ #include "zend.h" #include "zend_stack.h" @@ -34,7 +34,7 @@ } } -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 */ stack->elements = (void **) erealloc(stack->elements, @@ -49,7 +49,7 @@ } -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) { *element = stack->elements[stack->top - 1]; @@ -70,7 +70,7 @@ } -ZEND_API int zend_stack_int_top(zend_stack *stack) +ZEND_API int zend_stack_int_top(const zend_stack *stack) { int *e; @@ -82,7 +82,7 @@ } -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) { return 1; @@ -108,13 +108,13 @@ } -ZEND_API void **zend_stack_base(zend_stack *stack) +ZEND_API void **zend_stack_base(const zend_stack *stack) { 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; } http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_stack.h?r1=1.19.2.1.2.1.2.1&r2=1.19.2.1.2.1.2.2&diff_format=u Index: ZendEngine2/zend_stack.h diff -u ZendEngine2/zend_stack.h:1.19.2.1.2.1.2.1 ZendEngine2/zend_stack.h:1.19.2.1.2.1.2.2 --- ZendEngine2/zend_stack.h:1.19.2.1.2.1.2.1 Mon Dec 31 07:17:04 2007 +++ ZendEngine2/zend_stack.h Tue Aug 12 17:20:24 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_stack.h,v 1.19.2.1.2.1.2.1 2007/12/31 07:17:04 sebastian Exp $ */ +/* $Id: zend_stack.h,v 1.19.2.1.2.1.2.2 2008/08/12 17:20:24 felipe Exp $ */ #ifndef ZEND_STACK_H #define ZEND_STACK_H @@ -32,14 +32,14 @@ BEGIN_EXTERN_C() 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_top(zend_stack *stack, void **element); +ZEND_API int zend_stack_push(zend_stack *stack, const void *element, int size); +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_int_top(zend_stack *stack); -ZEND_API int zend_stack_is_empty(zend_stack *stack); +ZEND_API int zend_stack_int_top(const 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 void **zend_stack_base(zend_stack *stack); -ZEND_API int zend_stack_count(zend_stack *stack); +ZEND_API void **zend_stack_base(const 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_with_argument(zend_stack *stack, int type, int (*apply_function)(void *element, void *arg), void *arg); END_EXTERN_C() http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_stmt.c?r1=1.118.2.38.2.24.2.21&r2=1.118.2.38.2.24.2.22&diff_format=u Index: php-src/ext/pdo/pdo_stmt.c diff -u php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.24.2.21 php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.24.2.22 --- php-src/ext/pdo/pdo_stmt.c:1.118.2.38.2.24.2.21 Sat Aug 2 04:46:06 2008 +++ php-src/ext/pdo/pdo_stmt.c Tue Aug 12 17:20:25 2008 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_stmt.c,v 1.118.2.38.2.24.2.21 2008/08/02 04:46:06 felipe Exp $ */ +/* $Id: pdo_stmt.c,v 1.118.2.38.2.24.2.22 2008/08/12 17:20:25 felipe Exp $ */ /* The PDO Statement Handle Class */ @@ -2687,12 +2687,12 @@ 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; } -static int row_get_classname(zval *object, char **class_name, zend_uint *class_name_len, int parent TSRMLS_DC) +static int row_get_classname(const zval *object, char **class_name, zend_uint *class_name_len, int parent TSRMLS_DC) { if (parent) { return FAILURE; http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar.phar?r1=1.7.2.29&r2=1.7.2.30&diff_format=u Index: php-src/ext/phar/phar.phar http://cvs.php.net/viewvc.cgi/php-src/main/php_ini.c?r1=1.136.2.4.2.15.2.8&r2=1.136.2.4.2.15.2.9&diff_format=u Index: php-src/main/php_ini.c diff -u php-src/main/php_ini.c:1.136.2.4.2.15.2.8 php-src/main/php_ini.c:1.136.2.4.2.15.2.9 --- php-src/main/php_ini.c:1.136.2.4.2.15.2.8 Tue Apr 15 11:31:58 2008 +++ php-src/main/php_ini.c Tue Aug 12 17:20:25 2008 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_ini.c,v 1.136.2.4.2.15.2.8 2008/04/15 11:31:58 dmitry Exp $ */ +/* $Id: php_ini.c,v 1.136.2.4.2.15.2.9 2008/08/12 17:20:25 felipe Exp $ */ #include "php.h" #include "ext/standard/info.h" @@ -692,7 +692,7 @@ /* {{{ 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; char ini_file[MAXPATHLEN]; @@ -783,7 +783,7 @@ /* {{{ 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; @@ -798,7 +798,7 @@ /* {{{ 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; @@ -812,7 +812,7 @@ /* {{{ 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; @@ -830,7 +830,7 @@ /* {{{ 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; @@ -848,7 +848,7 @@ /* {{{ cfg_get_string */ -PHPAPI int cfg_get_string(char *varname, char **result) +PHPAPI int cfg_get_string(const char *varname, char **result) { zval *tmp; http://cvs.php.net/viewvc.cgi/php-src/main/php_ini.h?r1=1.45.2.3.2.3.2.7&r2=1.45.2.3.2.3.2.8&diff_format=u Index: php-src/main/php_ini.h diff -u php-src/main/php_ini.h:1.45.2.3.2.3.2.7 php-src/main/php_ini.h:1.45.2.3.2.3.2.8 --- php-src/main/php_ini.h:1.45.2.3.2.3.2.7 Tue Apr 15 11:31:58 2008 +++ php-src/main/php_ini.h Tue Aug 12 17:20:25 2008 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_ini.h,v 1.45.2.3.2.3.2.7 2008/04/15 11:31:58 dmitry Exp $ */ +/* $Id: php_ini.h,v 1.45.2.3.2.3.2.8 2008/08/12 17:20:25 felipe Exp $ */ #ifndef PHP_INI_H #define PHP_INI_H @@ -28,16 +28,16 @@ int php_init_config(TSRMLS_D); int php_shutdown_config(void); void php_ini_register_extensions(TSRMLS_D); -PHPAPI zval *cfg_get_entry(char *name, uint name_length); -PHPAPI int cfg_get_long(char *varname, long *result); -PHPAPI int cfg_get_double(char *varname, double *result); -PHPAPI int cfg_get_string(char *varname, char **result); -PHPAPI int php_parse_user_ini_file(char *dirname, char *ini_filename, HashTable *target_hash TSRMLS_DC); +PHPAPI zval *cfg_get_entry(const char *name, uint name_length); +PHPAPI int cfg_get_long(const char *varname, long *result); +PHPAPI int cfg_get_double(const char *varname, double *result); +PHPAPI int cfg_get_string(const char *varname, char **result); +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 int php_ini_has_per_dir_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_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); END_EXTERN_C()
« previous php.cvs (#52265) next »