cvs: php-src /ext/com_dotnet com_misc.c /ext/dom attr.c cdatasection.c characterdata.c comment.c document.c documentfragment.c dom_iterators.c
domexception.c domimplementation.c element.c entityreference.c namednodemap.c node.c nodelist.c php_dom.c processinginstruction.c text.c xpath.c
/ext/pdo pdo.c pdo_dbh.c pdo_stmt.c php_pdo_phpvers_compat.h /ext/reflection php_reflection.c /ext/session/tests 015.phpt 020.phpt /ext/simplexml
simplexml.c /ext/spl php_spl.c spl_array.c spl_directory.c spl_iterators.c /ext/sqlite sqlite.c /ext/standard array.c dir.c /ext/unicode
unicode_iterators.c /main SAPI.c SAPI.h php_ini.c php_variables.c /sapi/cgi cgi_main.c /sapi/cli php_cli.c /tests/lang bug25145.phpt
/tests/run-test test004.phpt ZendEngine2 zend.c zend.h zend_API.c zend_API.h zend_compile.h zend_exceptions.c zend_globals.h zend_hash.c zend_hash.h
zend_ini.h zend_ini_parser.y zend_ini_scanner.h zend_ini_scanner.l zend_interfaces.c zend_object_handlers.c zend! _operators.c
| From: | Dmitry Stogov | Date: | Mon, 13 Feb 2006 10:24:00 +0000 |
| Subject: | cvs: php-src /ext/com_dotnet com_misc.c /ext/dom attr.c cdatasection.c characterdata.c comment.c document.c documentfragment.c dom_iterators.c domexception.c domimplementation.c element.c entityreference.c namednodemap.c node.c nodelist.c php_dom.c processinginstruction.c text.c xpath.c /ext/pdo pdo.c pdo_dbh.c pdo_stmt.c php_pdo_phpvers_compat.h /ext/reflection php_reflection.c /ext/session/tests 015.phpt 020.phpt /ext/simplexml simplexml.c /ext/spl php_spl.c spl_array.c spl_directory.c spl_iterators.c /ext/sqlite sqlite.c /ext/standard array.c dir.c /ext/unicode unicode_iterators.c /main SAPI.c SAPI.h php_ini.c php_variables.c /sapi/cgi cgi_main.c /sapi/cli php_cli.c /tests/lang bug25145.phpt /tests/run-test test004.phpt ZendEngine2 zend.c zend.h zend_API.c zend_API.h zend_compile.h zend_exceptions.c zend_globals.h zend_hash.c zend_hash.h zend_ini.h zend_ini_parser.y zend_ini_scanner.h zend_ini_scanner.l zend_interfaces.c zend_object_handlers.c zend! _operators.c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-36861@lists.php.net to get a copy of this message | ||
dmitry Mon Feb 13 10:24:00 2006 UTC
Modified files:
/ZendEngine2 zend.c zend.h zend_API.c zend_API.h zend_compile.h
zend_exceptions.c zend_globals.h zend_hash.c
zend_hash.h zend_ini.h zend_ini_parser.y
zend_ini_scanner.h zend_ini_scanner.l
zend_interfaces.c zend_object_handlers.c
zend_operators.c
/php-src/ext/com_dotnet com_misc.c
/php-src/ext/dom attr.c cdatasection.c characterdata.c comment.c
document.c documentfragment.c dom_iterators.c
domexception.c domimplementation.c element.c
entityreference.c namednodemap.c node.c nodelist.c
php_dom.c processinginstruction.c text.c xpath.c
/php-src/ext/pdo pdo.c pdo_dbh.c pdo_stmt.c
php_pdo_phpvers_compat.h
/php-src/ext/reflection php_reflection.c
/php-src/ext/session/tests 015.phpt 020.phpt
/php-src/ext/simplexml simplexml.c
/php-src/ext/spl php_spl.c spl_array.c spl_directory.c
spl_iterators.c
/php-src/ext/sqlite sqlite.c
/php-src/ext/standard array.c dir.c
/php-src/ext/unicode unicode_iterators.c
/php-src/main SAPI.c SAPI.h php_ini.c php_variables.c
/php-src/sapi/cgi cgi_main.c
/php-src/sapi/cli php_cli.c
/php-src/tests/lang bug25145.phpt
/php-src/tests/run-test test004.phpt
Log:
Made server wide switch for unicode on/off (according to PDM).
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend.c?r1=1.334&r2=1.335&diff_format=u Index: ZendEngine2/zend.c diff -u ZendEngine2/zend.c:1.334 ZendEngine2/zend.c:1.335 --- ZendEngine2/zend.c:1.334 Mon Feb 13 09:23:13 2006 +++ ZendEngine2/zend.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend.c,v 1.334 2006/02/13 09:23:13 helly Exp $ */ +/* $Id: zend.c,v 1.335 2006/02/13 10:23:57 dmitry Exp $ */ #include "zend.h" #include "zend_extensions.h" @@ -29,7 +29,18 @@ #include "zend_builtin_functions.h" #include "zend_ini.h" #include "zend_unicode.h" -#include "zend_interfaces.h" + +#ifdef ZTS +# define GLOBAL_FUNCTION_TABLE global_function_table +# define GLOBAL_CLASS_TABLE global_class_table +# define GLOBAL_CONSTANTS_TABLE global_constants_table +# define GLOBAL_AUTO_GLOBALS_TABLE global_auto_globals_table +#else +# define GLOBAL_FUNCTION_TABLE CG(function_table) +# define GLOBAL_CLASS_TABLE CG(class_table) +# define GLOBAL_AUTO_GLOBALS_TABLE CG(auto_globals) +# define GLOBAL_CONSTANTS_TABLE EG(zend_constants) +#endif #if defined(ZEND_WIN32) && ZEND_DEBUG BOOL WINAPI IsDebuggerPresent(VOID); @@ -211,16 +222,12 @@ ZEND_API int compiler_globals_id; ZEND_API int executor_globals_id; ZEND_API int alloc_globals_id; -#endif static HashTable *global_function_table = NULL; static HashTable *global_class_table = NULL; static HashTable *global_constants_table = NULL; static HashTable *global_auto_globals_table = NULL; -static HashTable *global_u_function_table = NULL; -static HashTable *global_u_class_table = NULL; -static HashTable *global_u_constants_table = NULL; -static HashTable *global_u_auto_globals_table = NULL; static HashTable *global_persistent_list = NULL; +#endif ZEND_API zend_utility_values zend_uv; @@ -373,7 +380,7 @@ if ( /* UTODO: clean this up */ - (expr->type == IS_STRING && + (expr->type == IS_STRING && (!strcmp(ucnv_getName(ZEND_U_CONVERTER(UG(output_encoding_conv)), &temp), ucnv_getName(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &temp))))) { *use_copy = 0; @@ -648,13 +655,12 @@ static void zval_copy_persistent(zval *zv) { - if (Z_TYPE_P(zv) == IS_UNICODE) { - Z_USTRVAL_P(zv) = zend_ustrndup(Z_USTRVAL_P(zv), Z_USTRLEN_P(zv)); - } else if (Z_TYPE_P(zv) == IS_STRING || Z_TYPE_P(zv) == IS_CONSTANT) { + if (Z_TYPE_P(zv) == IS_STRING || Z_TYPE_P(zv) == IS_CONSTANT) { UChar *ustr; ustr = malloc(UBYTES(Z_STRLEN_P(zv)+1)); u_charsToUChars(Z_STRVAL_P(zv), ustr, Z_STRLEN_P(zv)+1); + free(Z_STRVAL_P(zv)); Z_USTRVAL_P(zv) = ustr; if (Z_TYPE_P(zv) == IS_STRING) Z_TYPE_P(zv) = IS_UNICODE; } @@ -673,14 +679,14 @@ int n = function->common.num_args; while (n > 0) { - --n; - if (function->common.arg_info[n].name) { - free(function->common.arg_info[n].name); - } - if (function->common.arg_info[n].class_name) { + --n; + if (function->common.arg_info[n].name) { + free(function->common.arg_info[n].name); + } + if (function->common.arg_info[n].class_name) { free(function->common.arg_info[n].class_name); } - } + } free(function->common.arg_info); } } @@ -696,15 +702,7 @@ free(c->name); } -static void copy_u_zend_constant(zend_constant *c) -{ - c->name = (char*)zend_ustrndup((UChar*)c->name, c->name_len - 1); - if (!(c->flags & CONST_PERSISTENT)) { - zval_copy_ctor(&c->value); - } -} - -static void function_to_unicode(zend_function *func) +static void function_to_unicode(zend_function *func TSRMLS_DC) { if (func->common.function_name) { UChar *uname; @@ -737,26 +735,22 @@ } } -static void property_info_to_unicode(zend_property_info *info) +static void property_info_to_unicode(zend_property_info *info TSRMLS_DC) { if (info->name) { UChar *uname; uname = malloc(UBYTES(info->name_length+1)); u_charsToUChars(info->name, uname, info->name_length+1); + free(info->name); info->name = (char*)uname; info->h = zend_u_get_hash_value(IS_UNICODE, info->name, info->name_length+1); } } -static void zval_ptr_to_unicode(zval **zv) +static void zval_ptr_to_unicode(zval **zv TSRMLS_DC) { - zval *new_zv = malloc(sizeof(zval)); - - memcpy(new_zv, *zv, sizeof(zval)); - new_zv->refcount = 1; - zval_copy_persistent(new_zv); - *zv = new_zv; + zval_copy_persistent(*zv); } static void const_to_unicode(zend_constant *c) @@ -766,157 +760,36 @@ if (c->name) { uname = malloc(UBYTES(c->name_len)); u_charsToUChars(c->name, uname, c->name_len); + free(c->name); c->name = (char*)uname; } - zval_copy_persistent(&c->value); -} - -static void class_to_unicode(zend_class_entry **ce) -{ - zend_class_entry *new_ce = malloc(sizeof(zend_class_entry)); - zend_property_info tmp_info; - zval* tmp_zval; - - memcpy(new_ce, *ce, sizeof(zend_class_entry)); - (*ce)->u_twin = new_ce; - - /* Convert name to unicode */ - if (new_ce->name) { - UChar *uname = malloc(UBYTES(new_ce->name_length+1)); - - u_charsToUChars(new_ce->name, uname, new_ce->name_length+1); - new_ce->name = (char*)uname; - } - - /* Copy methods */ - zend_u_hash_init_ex(&new_ce->function_table, (*ce)->function_table.nNumOfElements, NULL, ZEND_U_FUNCTION_DTOR, 1, 1, 0); - { - Bucket *p = (*ce)->function_table.pListHead; - while (p != NULL) { - zend_function *src = (zend_function*)p->pData; - zend_function *target; - zend_function tmp_func = *src; - - function_to_unicode(&tmp_func); - - zend_hash_add(&new_ce->function_table, p->key.u.string, p->nKeyLength, &tmp_func, sizeof(zend_function), (void**)&target); - src->common.u_twin = target; - - p = p->pListNext; - } - } -/* - zend_hash_copy(&new_ce->function_table, &(*ce)->function_table, (copy_ctor_func_t) function_to_unicode, &tmp_func, sizeof(zend_function)); -*/ - /* Copy constants */ - zend_u_hash_init_ex(&new_ce->constants_table, (*ce)->constants_table.nNumOfElements, NULL, (*ce)->constants_table.pDestructor, 1, 1, 0); - zend_hash_copy(&new_ce->constants_table, &(*ce)->constants_table, (copy_ctor_func_t) zval_ptr_to_unicode, &tmp_zval, sizeof(zval*)); - - /* Copy properties */ - zend_u_hash_init_ex(&new_ce->properties_info, (*ce)->properties_info.nNumOfElements, NULL, (*ce)->properties_info.pDestructor/*(dtor_func_t)zend_destroy_property_info_internal*/, 1, 1, 0); - zend_hash_copy(&new_ce->properties_info, &(*ce)->properties_info, (copy_ctor_func_t) property_info_to_unicode, &tmp_info, sizeof(zend_property_info)); - - zend_u_hash_init_ex(&new_ce->default_properties, (*ce)->default_properties.nNumOfElements, NULL, (*ce)->default_properties.pDestructor, 1, 1, 0); - zend_hash_copy(&new_ce->default_properties, &(*ce)->default_properties, (copy_ctor_func_t) zval_ptr_to_unicode, &tmp_zval, sizeof(zval*)); - - zend_u_hash_init_ex(&new_ce->default_static_members, (*ce)->default_static_members.nNumOfElements, NULL, (*ce)->default_static_members.pDestructor, 1, 1, 0); - - { - HashPosition pos; - zval **p; + if (Z_TYPE(c->value) == IS_STRING || Z_TYPE(c->value) == IS_CONSTANT) { + UChar *ustr; - zend_hash_internal_pointer_reset_ex(&(*ce)->default_static_members, &pos); - while (zend_hash_get_current_data_ex(&(*ce)->default_static_members, (void**)&p, &pos) == SUCCESS) { - char *str_index; - uint str_length; - ulong num_index; - zval **q; - - zend_hash_get_current_key_ex(&(*ce)->default_static_members, &str_index, &str_length, &num_index, 0, &pos); - if ((*p)->is_ref && - (*ce)->parent && - zend_hash_find(&(*ce)->parent->default_static_members, str_index, str_length, (void**)&q) == SUCCESS && - *p == *q && - zend_hash_find(&new_ce->parent->u_twin->default_static_members, str_index, str_length, (void**)&q) == SUCCESS) { - (*q)->refcount++; - (*q)->is_ref = 1; - zend_hash_add(&new_ce->default_static_members, str_index, str_length, (void**)q, sizeof(zval*), NULL); - } else { - zval *q = *p; - zval_ptr_to_unicode(&q); - q->is_ref = 0; - zend_hash_add(&new_ce->default_static_members, str_index, str_length, (void**)&q, sizeof(zval*), NULL); - } - zend_hash_move_forward_ex(&(*ce)->default_static_members, &pos); - } + ustr = malloc(UBYTES(Z_STRLEN(c->value)+1)); + u_charsToUChars(Z_STRVAL(c->value), ustr, Z_STRLEN(c->value)+1); + Z_USTRVAL(c->value) = ustr; + if (Z_TYPE(c->value) == IS_STRING) Z_TYPE(c->value) = IS_UNICODE; } - - *ce = new_ce; } -static void fix_classes(HashTable *ht) { - Bucket *p = ht->pListHead; - Bucket *q; - - /* Fix parent classes */ - while (p != NULL) { - zend_class_entry *ce = *(zend_class_entry**)p->pData; - - if (ce->parent) { - ce->parent = ce->parent->u_twin; - } - if (ce->num_interfaces > 0 && ce->interfaces) { - int i = sizeof(zend_class_entry*)*ce->num_interfaces; - zend_class_entry **new_interfaces; - - new_interfaces = (zend_class_entry**)malloc(i); - memcpy(new_interfaces, ce->interfaces, i); - ce->interfaces = new_interfaces; - for (i = 0; i < ce->num_interfaces; i++) { - ce->interfaces[i] = ce->interfaces[i]->u_twin; - } - } - - q = ce->function_table.pListHead; - while (q != NULL) { - zend_function *f = (zend_function*)q->pData; - - if (f->common.scope) { - f->common.scope = f->common.scope->u_twin; - } - if (f->common.prototype) { - f->common.prototype = f->common.prototype->common.u_twin; - } - q = q->pListNext; - } - - if (ce->constructor) { - ce->constructor = ce->constructor->common.u_twin; - } else if (ce->destructor) { - ce->destructor = ce->destructor->common.u_twin; - } else if (ce->clone) { - ce->clone = ce->clone->common.u_twin; - } else if (ce->__get) { - ce->__get = ce->__get->common.u_twin; - } else if (ce->__set) { - ce->__set = ce->__set->common.u_twin; - } else if (ce->__unset) { - ce->__unset = ce->__unset->common.u_twin; - } else if (ce->__isset) { - ce->__isset = ce->__isset->common.u_twin; - } else if (ce->__call) { - ce->__call = ce->__call->common.u_twin; - } else if (ce->__tostring) { - ce->__tostring = ce->__tostring->common.u_twin; - } else if (ce->serialize_func) { - ce->serialize_func = ce->serialize_func->common.u_twin; - } else if (ce->unserialize_func) { - ce->unserialize_func = ce->unserialize_func->common.u_twin; - } +static void class_to_unicode(zend_class_entry **ce TSRMLS_DC) +{ + /* Convert name to unicode */ + if ((*ce)->name) { + UChar *uname = malloc(UBYTES((*ce)->name_length+1)); - p = p->pListNext; + u_charsToUChars((*ce)->name, uname, (*ce)->name_length+1); + free((*ce)->name); + (*ce)->name = (char*)uname; } + zend_hash_to_unicode(&(*ce)->function_table, (apply_func_t)function_to_unicode TSRMLS_CC); + (*ce)->function_table.pDestructor = ZEND_U_FUNCTION_DTOR; + zend_hash_to_unicode(&(*ce)->constants_table, (apply_func_t)zval_ptr_to_unicode TSRMLS_CC); + zend_hash_to_unicode(&(*ce)->properties_info, (apply_func_t)property_info_to_unicode TSRMLS_CC); + zend_hash_to_unicode(&(*ce)->default_properties, (apply_func_t)zval_ptr_to_unicode TSRMLS_CC); + zend_hash_to_unicode(&(*ce)->default_static_members, (apply_func_t)zval_ptr_to_unicode TSRMLS_CC); } #ifdef ZTS @@ -927,46 +800,23 @@ compiler_globals->compiled_filename = NULL; - compiler_globals->global_function_table = compiler_globals->function_table = (HashTable *) malloc(sizeof(HashTable)); - zend_u_hash_init_ex(compiler_globals->function_table, 100, NULL, ZEND_FUNCTION_DTOR, 1, 0, 0); + compiler_globals->function_table = (HashTable *) malloc(sizeof(HashTable)); + zend_u_hash_init_ex(compiler_globals->function_table, 100, NULL, ZEND_FUNCTION_DTOR, 1, UG(unicode), 0); zend_hash_copy(compiler_globals->function_table, global_function_table, NULL, &tmp_func, sizeof(zend_function)); - if (global_u_function_table) { - compiler_globals->global_u_function_table = (HashTable *) malloc(sizeof(HashTable)); - zend_u_hash_init_ex(compiler_globals->global_u_function_table, 100, NULL, ZEND_FUNCTION_DTOR, 1, 1, 0); - zend_hash_copy(compiler_globals->global_u_function_table, global_u_function_table, NULL, &tmp_func, sizeof(zend_function)); - } else { - compiler_globals->global_u_function_table = 0; - } - - compiler_globals->global_class_table = compiler_globals->class_table = (HashTable *) malloc(sizeof(HashTable)); - zend_u_hash_init_ex(compiler_globals->class_table, 10, NULL, ZEND_CLASS_DTOR, 1, 0, 0); + compiler_globals->class_table = (HashTable *) malloc(sizeof(HashTable)); + zend_u_hash_init_ex(compiler_globals->class_table, 10, NULL, ZEND_CLASS_DTOR, 1, UG(unicode), 0); zend_hash_copy(compiler_globals->class_table, global_class_table, (copy_ctor_func_t) zend_class_add_ref, &tmp_class, sizeof(zend_class_entry *)); - if (global_u_class_table) { - compiler_globals->global_u_class_table = (HashTable *) malloc(sizeof(HashTable)); - zend_u_hash_init_ex(compiler_globals->global_u_class_table, 10, NULL, ZEND_CLASS_DTOR, 1, 1, 0); - zend_hash_copy(compiler_globals->global_u_class_table, global_u_class_table, (copy_ctor_func_t) zend_class_add_ref, &tmp_class, sizeof(zend_class_entry *)); - } else { - compiler_globals->global_u_class_table = NULL; - } zend_set_default_compile_time_values(TSRMLS_C); CG(interactive) = 0; CG(literal_type) = IS_STRING; - compiler_globals->global_auto_globals_table = compiler_globals->auto_globals = (HashTable *) malloc(sizeof(HashTable)); - zend_u_hash_init_ex(compiler_globals->auto_globals, 8, NULL, NULL, 1, 0, 0); + compiler_globals->auto_globals = (HashTable *) malloc(sizeof(HashTable)); + zend_u_hash_init_ex(compiler_globals->auto_globals, 8, NULL, NULL, 1, UG(unicode), 0); zend_hash_copy(compiler_globals->auto_globals, global_auto_globals_table, NULL, NULL, sizeof(zend_auto_global) /* empty element */); - if (global_u_auto_globals_table) { - compiler_globals->global_u_auto_globals_table = (HashTable *) malloc(sizeof(HashTable)); - zend_u_hash_init_ex(compiler_globals->global_u_auto_globals_table, 8, NULL, NULL, 1, 1, 0); - zend_hash_copy(compiler_globals->global_u_auto_globals_table, global_u_auto_globals_table, NULL, NULL, sizeof(zend_auto_global) /* empty element */); - } else { - compiler_globals->global_u_auto_globals_table = NULL; - } - compiler_globals->last_static_member = zend_hash_num_elements(compiler_globals->class_table); if (compiler_globals->last_static_member) { compiler_globals->static_members = (HashTable**)calloc(compiler_globals->last_static_member, sizeof(HashTable*)); @@ -978,38 +828,17 @@ static void compiler_globals_dtor(zend_compiler_globals *compiler_globals TSRMLS_DC) { - if (compiler_globals->function_table != global_function_table && - compiler_globals->function_table != global_u_function_table) { - if (compiler_globals->global_function_table) { - zend_hash_destroy(compiler_globals->global_function_table); - free(compiler_globals->global_function_table); - } - if (compiler_globals->global_u_function_table) { - zend_hash_destroy(compiler_globals->global_u_function_table); - free(compiler_globals->global_u_function_table); - } - } - if (compiler_globals->class_table != global_class_table && - compiler_globals->class_table != global_u_class_table) { - if (compiler_globals->global_class_table) { - zend_hash_destroy(compiler_globals->global_class_table); - free(compiler_globals->global_class_table); - } - if (compiler_globals->global_u_class_table) { - zend_hash_destroy(compiler_globals->global_u_class_table); - free(compiler_globals->global_u_class_table); - } - } - if (compiler_globals->auto_globals != global_auto_globals_table && - compiler_globals->auto_globals != global_u_auto_globals_table) { - if (compiler_globals->global_auto_globals_table) { - zend_hash_destroy(compiler_globals->global_auto_globals_table); - free(compiler_globals->global_auto_globals_table); - } - if (compiler_globals->global_u_auto_globals_table) { - zend_hash_destroy(compiler_globals->global_u_auto_globals_table); - free(compiler_globals->global_u_auto_globals_table); - } + if (compiler_globals->function_table != GLOBAL_FUNCTION_TABLE) { + zend_hash_destroy(compiler_globals->function_table); + free(compiler_globals->function_table); + } + if (compiler_globals->class_table != GLOBAL_CLASS_TABLE) { + zend_hash_destroy(compiler_globals->class_table); + free(compiler_globals->class_table); + } + if (compiler_globals->auto_globals != GLOBAL_AUTO_GLOBALS_TABLE) { + zend_hash_destroy(compiler_globals->auto_globals); + free(compiler_globals->auto_globals); } if (compiler_globals->static_members) { free(compiler_globals->static_members); @@ -1020,20 +849,8 @@ static void executor_globals_ctor(zend_executor_globals *executor_globals TSRMLS_DC) { - zend_constant tmp_const; - zend_startup_constants(TSRMLS_C); - zend_copy_constants(EG(zend_constants), global_constants_table); - EG(global_constants_table) = EG(zend_constants); - - if (global_u_constants_table) { - EG(global_u_constants_table) = (HashTable *) malloc(sizeof(HashTable)); - zend_u_hash_init_ex(EG(global_u_constants_table), global_u_constants_table->nNumOfElements, NULL, ZEND_CONSTANT_DTOR, 1, 1, 0); - zend_hash_copy(EG(global_u_constants_table), global_u_constants_table, (copy_ctor_func_t) copy_u_zend_constant, &tmp_const, sizeof(zend_constant)); - } else { - EG(global_u_constants_table) = NULL; - } - + zend_copy_constants(EG(zend_constants), GLOBAL_CONSTANTS_TABLE); zend_init_rsrc_plist(TSRMLS_C); EG(lambda_count)=0; EG(user_error_handler) = NULL; @@ -1051,16 +868,9 @@ if (&executor_globals->persistent_list != global_persistent_list) { zend_destroy_rsrc_list(&executor_globals->persistent_list TSRMLS_CC); } - if (executor_globals->global_constants_table != global_constants_table && - executor_globals->global_u_constants_table != global_u_function_table) { - if (executor_globals->global_constants_table) { - zend_hash_destroy(executor_globals->global_constants_table); - free(executor_globals->global_constants_table); - } - if (executor_globals->global_u_constants_table) { - zend_hash_destroy(executor_globals->global_u_constants_table); - free(executor_globals->global_u_constants_table); - } + if (executor_globals->zend_constants != GLOBAL_CONSTANTS_TABLE) { + zend_hash_destroy(executor_globals->zend_constants); + free(executor_globals->zend_constants); } } @@ -1082,6 +892,7 @@ start_memory_manager(TSRMLS_C); } + #if defined(__FreeBSD__) || defined(__DragonFly__) /* FreeBSD and DragonFly floating point precision fix */ #include <floatingpoint.h> @@ -1201,15 +1012,15 @@ zend_version_info = strdup(ZEND_CORE_VERSION_INFO); zend_version_info_length = sizeof(ZEND_CORE_VERSION_INFO)-1; - global_function_table = (HashTable *) malloc(sizeof(HashTable)); - global_class_table = (HashTable *) malloc(sizeof(HashTable)); - global_auto_globals_table = (HashTable *) malloc(sizeof(HashTable)); - global_constants_table = (HashTable *) malloc(sizeof(HashTable)); - - zend_hash_init_ex(global_function_table, 100, NULL, ZEND_FUNCTION_DTOR, 1, 0); - zend_hash_init_ex(global_class_table, 10, NULL, ZEND_CLASS_DTOR, 1, 0); - zend_hash_init_ex(global_auto_globals_table, 8, NULL, (dtor_func_t) zend_auto_global_dtor, 1, 0); - zend_hash_init_ex(global_constants_table, 20, NULL, ZEND_CONSTANT_DTOR, 1, 0); + GLOBAL_FUNCTION_TABLE = (HashTable *) malloc(sizeof(HashTable)); + GLOBAL_CLASS_TABLE = (HashTable *) malloc(sizeof(HashTable)); + GLOBAL_AUTO_GLOBALS_TABLE = (HashTable *) malloc(sizeof(HashTable)); + GLOBAL_CONSTANTS_TABLE = (HashTable *) malloc(sizeof(HashTable)); + + zend_hash_init_ex(GLOBAL_FUNCTION_TABLE, 100, NULL, ZEND_FUNCTION_DTOR, 1, 0); + zend_hash_init_ex(GLOBAL_CLASS_TABLE, 10, NULL, ZEND_CLASS_DTOR, 1, 0); + zend_hash_init_ex(GLOBAL_AUTO_GLOBALS_TABLE, 8, NULL, (dtor_func_t) zend_auto_global_dtor, 1, 0); + zend_hash_init_ex(GLOBAL_CONSTANTS_TABLE, 20, NULL, ZEND_CONSTANT_DTOR, 1, 0); zend_hash_init_ex(&module_registry, 50, NULL, ZEND_MODULE_DTOR, 1, 0); zend_init_rsrc_list_dtors(); @@ -1235,22 +1046,16 @@ compiler_globals->function_table = (HashTable *) malloc(sizeof(HashTable)); compiler_globals->class_table = (HashTable *) malloc(sizeof(HashTable)); - *compiler_globals->function_table = *global_function_table; - *compiler_globals->class_table = *global_class_table; - compiler_globals->auto_globals = global_auto_globals_table; + *compiler_globals->function_table = *GLOBAL_FUNCTION_TABLE; + *compiler_globals->class_table = *GLOBAL_CLASS_TABLE; + compiler_globals->auto_globals = GLOBAL_AUTO_GLOBALS_TABLE; zend_hash_destroy(executor_globals->zend_constants); - *executor_globals->zend_constants = *global_constants_table; + *executor_globals->zend_constants = *GLOBAL_CONSTANTS_TABLE; #else unicode_globals_ctor(&unicode_globals TSRMLS_CC); scanner_globals_ctor(&ini_scanner_globals TSRMLS_CC); scanner_globals_ctor(&language_scanner_globals TSRMLS_CC); - - CG(function_table) = global_function_table; - CG(class_table) = global_class_table; - CG(auto_globals) = global_auto_globals_table; - EG(zend_constants) = global_constants_table; - zend_set_default_compile_time_values(TSRMLS_C); EG(user_error_handler) = NULL; EG(user_exception_handler) = NULL; @@ -1261,7 +1066,6 @@ #ifndef ZTS zend_init_rsrc_plist(TSRMLS_C); - global_persistent_list = &EG(persistent_list); #endif if (start_builtin_functions) { @@ -1290,44 +1094,34 @@ */ void zend_post_startup(TSRMLS_D) { - UConverter *old_runtime_encoding_conv; - UErrorCode status = U_ZERO_ERROR; - zend_function tmp_func; - zend_class_entry *tmp_class; - zend_constant tmp_const; #ifdef ZTS zend_compiler_globals *compiler_globals = ts_resource(compiler_globals_id); zend_executor_globals *executor_globals = ts_resource(executor_globals_id); - *global_function_table = *compiler_globals->function_table; - *global_class_table = *compiler_globals->class_table; - *global_constants_table = *executor_globals->zend_constants; + *GLOBAL_FUNCTION_TABLE = *compiler_globals->function_table; + *GLOBAL_CLASS_TABLE = *compiler_globals->class_table; + *GLOBAL_CONSTANTS_TABLE = *executor_globals->zend_constants; #endif /* Make copies of HashTables with UNICODE */ - old_runtime_encoding_conv = UG(runtime_encoding_conv); - UG(runtime_encoding_conv) = ucnv_open("ASCII", &status); - - global_u_function_table = (HashTable *) malloc(sizeof(HashTable)); - zend_u_hash_init_ex(global_u_function_table, global_function_table->nNumOfElements, NULL, ZEND_U_FUNCTION_DTOR, 1, 1, 0); - zend_hash_copy(global_u_function_table, global_function_table, (copy_ctor_func_t) function_to_unicode, &tmp_func, sizeof(zend_function)); - - global_u_class_table = (HashTable *) malloc(sizeof(HashTable)); - zend_u_hash_init_ex(global_u_class_table, global_class_table->nNumOfElements, NULL, ZEND_CLASS_DTOR, 1, 1, 0); - zend_hash_copy(global_u_class_table, global_class_table, (copy_ctor_func_t) class_to_unicode, &tmp_class, sizeof(zend_class_entry *)); - fix_classes(global_u_class_table); - - global_u_auto_globals_table = (HashTable *) malloc(sizeof(HashTable)); - zend_u_hash_init_ex(global_u_auto_globals_table, global_auto_globals_table->nNumOfElements, NULL, NULL, 1, 1, 0); - zend_hash_copy(global_u_auto_globals_table, global_auto_globals_table, NULL, NULL, sizeof(zend_auto_global)); - - global_u_constants_table = (HashTable *) malloc(sizeof(HashTable)); - zend_u_hash_init_ex(global_u_constants_table, global_constants_table->nNumOfElements, NULL, ZEND_U_CONSTANT_DTOR, 1, 1, 0); - zend_hash_copy(global_u_constants_table, global_constants_table, (copy_ctor_func_t) const_to_unicode, &tmp_const, sizeof(zend_constant)); + if (UG(unicode)) { + UConverter *old_runtime_encoding_conv; + UErrorCode status = U_ZERO_ERROR; + + old_runtime_encoding_conv = UG(runtime_encoding_conv); + UG(runtime_encoding_conv) = ucnv_open("ASCII", &status); + + zend_hash_to_unicode(GLOBAL_FUNCTION_TABLE, (apply_func_t)function_to_unicode TSRMLS_CC); + GLOBAL_FUNCTION_TABLE->pDestructor = ZEND_U_FUNCTION_DTOR; + zend_hash_to_unicode(GLOBAL_CLASS_TABLE, (apply_func_t)class_to_unicode TSRMLS_CC); + zend_hash_to_unicode(GLOBAL_AUTO_GLOBALS_TABLE, NULL TSRMLS_CC); + zend_hash_to_unicode(GLOBAL_CONSTANTS_TABLE, (apply_func_t)const_to_unicode TSRMLS_CC); + GLOBAL_CONSTANTS_TABLE->pDestructor = ZEND_U_CONSTANT_DTOR; - ucnv_close(UG(runtime_encoding_conv)); - UG(runtime_encoding_conv) = old_runtime_encoding_conv; + ucnv_close(UG(runtime_encoding_conv)); + UG(runtime_encoding_conv) = old_runtime_encoding_conv; + } #ifdef ZTS zend_destroy_rsrc_list(&EG(persistent_list) TSRMLS_CC); @@ -1347,54 +1141,29 @@ #ifdef ZEND_WIN32 zend_shutdown_timeout_thread(); #endif - if (global_persistent_list) { - zend_destroy_rsrc_list(global_persistent_list TSRMLS_CC); - } + zend_destroy_rsrc_list(&EG(persistent_list) TSRMLS_CC); zend_hash_graceful_reverse_destroy(&module_registry); - zend_hash_destroy(global_function_table); - zend_hash_destroy(global_class_table); - if (global_u_function_table) { - zend_hash_destroy(global_u_function_table); - } - if (global_u_class_table) { - zend_hash_destroy(global_u_class_table); - } + zend_hash_destroy(GLOBAL_FUNCTION_TABLE); + zend_hash_destroy(GLOBAL_CLASS_TABLE); - zend_hash_destroy(global_auto_globals_table); - free(global_auto_globals_table); - if (global_u_auto_globals_table) { - zend_hash_destroy(global_u_auto_globals_table); - free(global_u_auto_globals_table); - } + zend_hash_destroy(GLOBAL_AUTO_GLOBALS_TABLE); + free(GLOBAL_AUTO_GLOBALS_TABLE); zend_shutdown_extensions(TSRMLS_C); free(zend_version_info); - zend_hash_destroy(global_constants_table); - free(global_constants_table); - if (global_u_constants_table) { - zend_hash_destroy(global_u_constants_table); - free(global_u_constants_table); - } - - free(global_function_table); - free(global_class_table); - if (global_u_function_table) { - free(global_u_function_table); - } - if (global_u_class_table) { - free(global_u_class_table); - } + free(GLOBAL_FUNCTION_TABLE); + free(GLOBAL_CLASS_TABLE); + + zend_hash_destroy(GLOBAL_CONSTANTS_TABLE); + free(GLOBAL_CONSTANTS_TABLE); + #ifdef ZTS - global_function_table = NULL; - global_u_function_table = NULL; - global_class_table = NULL; - global_u_class_table = NULL; - global_auto_globals_table = NULL; - global_u_auto_globals_table = NULL; - global_constants_table = NULL; - global_u_constants_table = NULL; + GLOBAL_FUNCTION_TABLE = NULL; + GLOBAL_CLASS_TABLE = NULL; + GLOBAL_AUTO_GLOBALS_TABLE = NULL; + GLOBAL_CONSTANTS_TABLE = NULL; #else unicode_globals_dtor(&unicode_globals TSRMLS_CC); #endif @@ -1489,19 +1258,7 @@ void zend_activate(TSRMLS_D) { -#ifdef ZTS - CG(function_table) = UG(unicode)?CG(global_u_function_table):CG(global_function_table); - CG(class_table) = UG(unicode)?CG(global_u_class_table):CG(global_class_table); - CG(auto_globals) = UG(unicode)?CG(global_u_auto_globals_table):CG(global_auto_globals_table); - EG(zend_constants) = UG(unicode)?EG(global_u_constants_table):EG(global_constants_table); -#else - CG(function_table) = UG(unicode)?global_u_function_table:global_function_table; - CG(class_table) = UG(unicode)?global_u_class_table:global_class_table; - CG(auto_globals) = UG(unicode)?global_u_auto_globals_table:global_auto_globals_table; - EG(zend_constants) = UG(unicode)?global_u_constants_table:global_constants_table; -#endif init_unicode_request_globals(TSRMLS_C); - init_unicode_strings(); init_compiler(TSRMLS_C); init_executor(TSRMLS_C); @@ -1730,7 +1487,7 @@ if (!EG(user_error_handler)) { EG(user_error_handler) = orig_user_error_handler; - } + } else { zval_ptr_dtor(&orig_user_error_handler); } http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend.h?r1=1.309&r2=1.310&diff_format=u Index: ZendEngine2/zend.h diff -u ZendEngine2/zend.h:1.309 ZendEngine2/zend.h:1.310 --- ZendEngine2/zend.h:1.309 Sun Feb 5 23:26:55 2006 +++ ZendEngine2/zend.h Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend.h,v 1.309 2006/02/05 23:26:55 helly Exp $ */ +/* $Id: zend.h,v 1.310 2006/02/13 10:23:57 dmitry Exp $ */ #ifndef ZEND_H #define ZEND_H @@ -373,8 +373,6 @@ char *doc_comment; zend_uint doc_comment_len; - zend_class_entry *u_twin; - struct _zend_module_entry *module; }; @@ -541,7 +539,7 @@ void zenderror(char *error); /* The following #define is used for code duality in PHP for Engine 1 & 2 */ -#define ZEND_STANDARD_CLASS_DEF_PTR U_CLASS_ENTRY(zend_standard_class_def) +#define ZEND_STANDARD_CLASS_DEF_PTR zend_standard_class_def extern ZEND_API zend_class_entry *zend_standard_class_def; extern ZEND_API zend_utility_values zend_uv; extern ZEND_API zval zval_used_for_init; http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_API.c?r1=1.338&r2=1.339&diff_format=u Index: ZendEngine2/zend_API.c diff -u ZendEngine2/zend_API.c:1.338 ZendEngine2/zend_API.c:1.339 --- ZendEngine2/zend_API.c:1.338 Mon Feb 6 20:36:51 2006 +++ ZendEngine2/zend_API.c Mon Feb 13 10:23:57 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_API.c,v 1.338 2006/02/06 20:36:51 tony2001 Exp $ */ +/* $Id: zend_API.c,v 1.339 2006/02/13 10:23:57 dmitry Exp $ */ #include "zend.h" #include "zend_execute.h" @@ -1164,7 +1164,7 @@ ZEND_API int _object_init(zval *arg ZEND_FILE_LINE_DC TSRMLS_DC) { - return _object_init_ex(arg, U_CLASS_ENTRY(zend_standard_class_def) ZEND_FILE_LINE_RELAY_CC TSRMLS_CC); + return _object_init_ex(arg, zend_standard_class_def ZEND_FILE_LINE_RELAY_CC TSRMLS_CC); } http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_API.h?r1=1.229&r2=1.230&diff_format=u Index: ZendEngine2/zend_API.h diff -u ZendEngine2/zend_API.h:1.229 ZendEngine2/zend_API.h:1.230 --- ZendEngine2/zend_API.h:1.229 Tue Jan 17 12:18:51 2006 +++ ZendEngine2/zend_API.h Mon Feb 13 10:23:57 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_API.h,v 1.229 2006/01/17 12:18:51 dmitry Exp $ */ +/* $Id: zend_API.h,v 1.230 2006/02/13 10:23:57 dmitry Exp $ */ #ifndef ZEND_API_H #define ZEND_API_H @@ -114,8 +114,6 @@ #endif -#define U_CLASS_ENTRY(ce) ((UG(unicode)&&ce)?ce->u_twin:ce) - #define INIT_CLASS_ENTRY(class_container, class_name, functions) INIT_OVERLOADED_CLASS_ENTRY(class_container, class_name, functions, NULL, NULL, NULL) #define INIT_OVERLOADED_CLASS_ENTRY_EX(class_container, class_name, functions, handle_fcall, handle_propget, handle_propset, handle_propunset, handle_propisset) \ @@ -145,7 +143,6 @@ class_container.interfaces = NULL; \ class_container.get_iterator = NULL; \ class_container.iterator_funcs.funcs = NULL; \ - class_container.u_twin = NULL; \ class_container.module = NULL; \ } http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_compile.h?r1=1.329&r2=1.330&diff_format=u Index: ZendEngine2/zend_compile.h diff -u ZendEngine2/zend_compile.h:1.329 ZendEngine2/zend_compile.h:1.330 --- ZendEngine2/zend_compile.h:1.329 Sun Feb 5 23:26:55 2006 +++ ZendEngine2/zend_compile.h Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.h,v 1.329 2006/02/05 23:26:55 helly Exp $ */ +/* $Id: zend_compile.h,v 1.330 2006/02/13 10:23:57 dmitry Exp $ */ #ifndef ZEND_COMPILE_H #define ZEND_COMPILE_H @@ -179,7 +179,6 @@ zend_arg_info *arg_info; zend_bool pass_rest_by_reference; unsigned char return_reference; - union _zend_function *u_twin; /* END of common elements */ zend_uint *refcount; @@ -234,7 +233,6 @@ zend_arg_info *arg_info; zend_bool pass_rest_by_reference; unsigned char return_reference; - union _zend_function *u_twin; /* END of common elements */ void (*handler)(INTERNAL_FUNCTION_PARAMETERS); @@ -257,7 +255,6 @@ zend_arg_info *arg_info; zend_bool pass_rest_by_reference; unsigned char return_reference; - union _zend_function *u_twin; } common; zend_op_array op_array; http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_exceptions.c?r1=1.95&r2=1.96&diff_format=u Index: ZendEngine2/zend_exceptions.c diff -u ZendEngine2/zend_exceptions.c:1.95 ZendEngine2/zend_exceptions.c:1.96 --- ZendEngine2/zend_exceptions.c:1.95 Tue Jan 17 12:18:51 2006 +++ ZendEngine2/zend_exceptions.c Mon Feb 13 10:23:57 2006 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_exceptions.c,v 1.95 2006/01/17 12:18:51 dmitry Exp $ */ +/* $Id: zend_exceptions.c,v 1.96 2006/02/13 10:23:57 dmitry Exp $ */ #include "zend.h" #include "zend_API.h" @@ -93,9 +93,9 @@ trace->refcount = 0; zend_fetch_debug_backtrace(trace, skip_top_traces, 0 TSRMLS_CC); - zend_update_property_rt_string(U_CLASS_ENTRY(default_exception_ce), &obj, "file", sizeof("file")-1, zend_get_executed_filename(TSRMLS_C) TSRMLS_CC); - zend_update_property_long(U_CLASS_ENTRY(default_exception_ce), &obj, "line", sizeof("line")-1, zend_get_executed_lineno(TSRMLS_C) TSRMLS_CC); - zend_update_property(U_CLASS_ENTRY(default_exception_ce), &obj, "trace", sizeof("trace")-1, trace TSRMLS_CC); + zend_update_property_rt_string(default_exception_ce, &obj, "file", sizeof("file")-1, zend_get_executed_filename(TSRMLS_C) TSRMLS_CC); + zend_update_property_long(default_exception_ce, &obj, "line", sizeof("line")-1, zend_get_executed_lineno(TSRMLS_C) TSRMLS_CC); + zend_update_property(default_exception_ce, &obj, "trace", sizeof("trace")-1, trace TSRMLS_CC); return obj.value.obj; } @@ -139,22 +139,22 @@ if (message) { if (message_type == IS_UNICODE) { - zend_update_property_unicodel(U_CLASS_ENTRY(default_exception_ce), object, "message", sizeof("message")-1, message, message_len TSRMLS_CC); + zend_update_property_unicodel(default_exception_ce, object, "message", sizeof("message")-1, message, message_len TSRMLS_CC); } else if (UG(unicode)) { UErrorCode status = U_ZERO_ERROR; UChar *u_str; int32_t u_len; zend_convert_to_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &u_str, &u_len, message, message_len, &status); - zend_update_property_unicodel(U_CLASS_ENTRY(default_exception_ce), object, "message", sizeof("message")-1, u_str, u_len TSRMLS_CC); + zend_update_property_unicodel(default_exception_ce, object, "message", sizeof("message")-1, u_str, u_len TSRMLS_CC); efree(u_str); } else { - zend_update_property_stringl(U_CLASS_ENTRY(default_exception_ce), object, "message", sizeof("message")-1, message, message_len TSRMLS_CC); + zend_update_property_stringl(default_exception_ce, object, "message", sizeof("message")-1, message, message_len TSRMLS_CC); } } if (code) { - zend_update_property_long(U_CLASS_ENTRY(default_exception_ce), object, "code", sizeof("code")-1, code TSRMLS_CC); + zend_update_property_long(default_exception_ce, object, "code", sizeof("code")-1, code TSRMLS_CC); } } /* }}} */ @@ -178,36 +178,36 @@ if (message) { if (message_type == IS_UNICODE) { - zend_update_property_unicodel(U_CLASS_ENTRY(default_exception_ce), object, "message", sizeof("message")-1, message, message_len TSRMLS_CC); + zend_update_property_unicodel(default_exception_ce, object, "message", sizeof("message")-1, message, message_len TSRMLS_CC); } else if (UG(unicode)) { UErrorCode status = U_ZERO_ERROR; UChar *u_str; int32_t u_len; zend_convert_to_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &u_str, &u_len, message, message_len, &status); - zend_update_property_unicodel(U_CLASS_ENTRY(default_exception_ce), object, "message", sizeof("message")-1, u_str, u_len TSRMLS_CC); + zend_update_property_unicodel(default_exception_ce, object, "message", sizeof("message")-1, u_str, u_len TSRMLS_CC); efree(u_str); } else { - zend_update_property_stringl(U_CLASS_ENTRY(default_exception_ce), object, "message", sizeof("message")-1, message, message_len TSRMLS_CC); + zend_update_property_stringl(default_exception_ce, object, "message", sizeof("message")-1, message, message_len TSRMLS_CC); } } if (code) { - zend_update_property_long(U_CLASS_ENTRY(default_exception_ce), object, "code", sizeof("code")-1, code TSRMLS_CC); + zend_update_property_long(default_exception_ce, object, "code", sizeof("code")-1, code TSRMLS_CC); } - zend_update_property_long(U_CLASS_ENTRY(default_exception_ce), object, "severity", sizeof("severity")-1, severity TSRMLS_CC); + zend_update_property_long(default_exception_ce, object, "severity", sizeof("severity")-1, severity TSRMLS_CC); if (argc >= 4) { if (file_type == IS_UNICODE) { - zend_update_property_unicodel(U_CLASS_ENTRY(default_exception_ce), object, "file", sizeof("file")-1, filename, filename_len TSRMLS_CC); + zend_update_property_unicodel(default_exception_ce, object, "file", sizeof("file")-1, filename, filename_len TSRMLS_CC); } else { - zend_update_property_stringl(U_CLASS_ENTRY(default_exception_ce), object, "file", sizeof("file")-1, filename, filename_len TSRMLS_CC); + zend_update_property_stringl(default_exception_ce, object, "file", sizeof("file")-1, filename, filename_len TSRMLS_CC); } if (argc < 5) { lineno = 0; /* invalidate lineno */ } - zend_update_property_long(U_CLASS_ENTRY(default_exception_ce), object, "line", sizeof("line")-1, lineno TSRMLS_CC); + zend_update_property_long(default_exception_ce, object, "line", sizeof("line")-1, lineno TSRMLS_CC); } } /* }}} */ @@ -221,7 +221,7 @@ { zval *value; - value = zend_read_property(U_CLASS_ENTRY(default_exception_ce), object, name, name_len, 0 TSRMLS_CC); + value = zend_read_property(default_exception_ce, object, name, name_len, 0 TSRMLS_CC); *return_value = *value; zval_copy_ctor(return_value); @@ -524,7 +524,7 @@ char *res = estrdup(""), **str = &res, *s_tmp; int res_len = 0, *len = &res_len, num = 0; - trace = zend_read_property(U_CLASS_ENTRY(default_exception_ce), getThis(), "trace", sizeof("trace")-1, 1 TSRMLS_CC); + trace = zend_read_property(default_exception_ce, getThis(), "trace", sizeof("trace")-1, 1 TSRMLS_CC); zend_hash_apply_with_arguments(Z_ARRVAL_P(trace), (apply_func_args_t)_build_trace_string, 3, str, len, &num); s_tmp = emalloc(1 + MAX_LENGTH_OF_LONG + 7 + 1); @@ -596,7 +596,7 @@ /* We store the result in the private property string so we can access * the result in uncaught exception handlers without memleaks. */ - zend_update_property_string(U_CLASS_ENTRY(default_exception_ce), getThis(), "string", sizeof("string")-1, str TSRMLS_CC); + zend_update_property_string(default_exception_ce, getThis(), "string", sizeof("string")-1, str TSRMLS_CC); if (trace) { zval_ptr_dtor(&trace); @@ -678,12 +678,12 @@ ZEND_API zend_class_entry *zend_exception_get_default(TSRMLS_D) { - return U_CLASS_ENTRY(default_exception_ce); + return default_exception_ce; } ZEND_API zend_class_entry *zend_get_error_exception(TSRMLS_D) { - return U_CLASS_ENTRY(error_exception_ce); + return error_exception_ce; } @@ -693,21 +693,21 @@ MAKE_STD_ZVAL(ex); if (exception_ce) { - if (!instanceof_function(exception_ce, U_CLASS_ENTRY(default_exception_ce) TSRMLS_CC)) { + if (!instanceof_function(exception_ce, default_exception_ce TSRMLS_CC)) { zend_error(E_NOTICE, "Exceptions must be derived from the Exception base class"); - exception_ce = U_CLASS_ENTRY(default_exception_ce); + exception_ce = default_exception_ce; } } else { - exception_ce = U_CLASS_ENTRY(default_exception_ce); + exception_ce = default_exception_ce; } object_init_ex(ex, exception_ce); if (message) { - zend_update_property_rt_string(U_CLASS_ENTRY(default_exception_ce), ex, "message", sizeof("message")-1, message TSRMLS_CC); + zend_update_property_rt_string(default_exception_ce, ex, "message", sizeof("message")-1, message TSRMLS_CC); } if (code) { - zend_update_property_long(U_CLASS_ENTRY(default_exception_ce), ex, "code", sizeof("code")-1, code TSRMLS_CC); + zend_update_property_long(default_exception_ce, ex, "code", sizeof("code")-1, code TSRMLS_CC); } zend_throw_exception_internal(ex TSRMLS_CC); @@ -733,7 +733,7 @@ ZEND_API zval * zend_throw_error_exception(zend_class_entry *exception_ce, char *message, long code, int severity TSRMLS_DC) { zval *ex = zend_throw_exception(exception_ce, message, code TSRMLS_CC); - zend_update_property_long(U_CLASS_ENTRY(default_exception_ce), ex, "severity", sizeof("severity")-1, severity TSRMLS_CC); + zend_update_property_long(default_exception_ce, ex, "severity", sizeof("severity")-1, severity TSRMLS_CC); return ex; } @@ -750,7 +750,7 @@ ZEND_API void zend_exception_error(zval *exception TSRMLS_DC) { zend_class_entry *ce_exception = Z_OBJCE_P(exception); - if (instanceof_function(ce_exception, U_CLASS_ENTRY(default_exception_ce) TSRMLS_CC)) { + if (instanceof_function(ce_exception, default_exception_ce TSRMLS_CC)) { zval *str, *file, *line; EG(exception) = NULL; @@ -760,16 +760,16 @@ if (Z_TYPE_P(str) != IS_STRING) { zend_error(E_WARNING, "%v::__toString() must return a string", ce_exception->name); } else { - zend_update_property_string(U_CLASS_ENTRY(default_exception_ce), exception, "string", sizeof("string")-1, EG(exception) ? ce_exception->name : Z_STRVAL_P(str) TSRMLS_CC); + zend_update_property_string(default_exception_ce, exception, "string", sizeof("string")-1, EG(exception) ? ce_exception->name : Z_STRVAL_P(str) TSRMLS_CC); } } zval_ptr_dtor(&str); if (EG(exception)) { /* do the best we can to inform about the inner exception */ - if (instanceof_function(ce_exception, U_CLASS_ENTRY(default_exception_ce) TSRMLS_CC)) { - file = zend_read_property(U_CLASS_ENTRY(default_exception_ce), EG(exception), "file", sizeof("file")-1, 1 TSRMLS_CC); - line = zend_read_property(U_CLASS_ENTRY(default_exception_ce), EG(exception), "line", sizeof("line")-1, 1 TSRMLS_CC); + if (instanceof_function(ce_exception, default_exception_ce TSRMLS_CC)) { + file = zend_read_property(default_exception_ce, EG(exception), "file", sizeof("file")-1, 1 TSRMLS_CC); + line = zend_read_property(default_exception_ce, EG(exception), "line", sizeof("line")-1, 1 TSRMLS_CC); } else { file = NULL; line = NULL; @@ -777,9 +777,9 @@ zend_error_va(E_WARNING, file ? Z_STRVAL_P(file) : NULL, line ? Z_LVAL_P(line) : 0, "Uncaught %v in exception handling during call to %v::__tostring()", Z_OBJCE_P(EG(exception))->name, ce_exception->name); } - str = zend_read_property(U_CLASS_ENTRY(default_exception_ce), exception, "string", sizeof("string")-1, 1 TSRMLS_CC); - file = zend_read_property(U_CLASS_ENTRY(default_exception_ce), exception, "file", sizeof("file")-1, 1 TSRMLS_CC); - line = zend_read_property(U_CLASS_ENTRY(default_exception_ce), exception, "line", sizeof("line")-1, 1 TSRMLS_CC); + str = zend_read_property(default_exception_ce, exception, "string", sizeof("string")-1, 1 TSRMLS_CC); + file = zend_read_property(default_exception_ce, exception, "file", sizeof("file")-1, 1 TSRMLS_CC); + line = zend_read_property(default_exception_ce, exception, "line", sizeof("line")-1, 1 TSRMLS_CC); if (Z_TYPE_P(file) == IS_UNICODE) { zval copy; @@ -806,7 +806,7 @@ exception_ce = Z_OBJCE_P(exception); - if (!exception_ce || !instanceof_function(exception_ce, U_CLASS_ENTRY(default_exception_ce) TSRMLS_CC)) { + if (!exception_ce || !instanceof_function(exception_ce, default_exception_ce TSRMLS_CC)) { zend_error(E_ERROR, "Exceptions must be valid objects derived from the Exception base class"); } zend_throw_exception_internal(exception TSRMLS_CC); http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_globals.h?r1=1.145&r2=1.146&diff_format=u Index: ZendEngine2/zend_globals.h diff -u ZendEngine2/zend_globals.h:1.145 ZendEngine2/zend_globals.h:1.146 --- ZendEngine2/zend_globals.h:1.145 Wed Jan 4 23:52:06 2006 +++ ZendEngine2/zend_globals.h Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_globals.h,v 1.145 2006/01/04 23:52:06 andi Exp $ */ +/* $Id: zend_globals.h,v 1.146 2006/02/13 10:23:57 dmitry Exp $ */ #ifndef ZEND_GLOBALS_H #define ZEND_GLOBALS_H @@ -137,13 +137,6 @@ char *script_encoding; #ifdef ZTS - HashTable *global_function_table; - HashTable *global_class_table; - HashTable *global_auto_globals_table; - HashTable *global_u_function_table; - HashTable *global_u_class_table; - HashTable *global_u_auto_globals_table; - HashTable **static_members; int last_static_member; #endif @@ -236,11 +229,6 @@ zend_property_info std_property_info; -#ifdef ZTS - HashTable *global_constants_table; - HashTable *global_u_constants_table; -#endif - void *reserved[ZEND_MAX_RESERVED_RESOURCES]; }; http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_hash.c?r1=1.129&r2=1.130&diff_format=u Index: ZendEngine2/zend_hash.c diff -u ZendEngine2/zend_hash.c:1.129 ZendEngine2/zend_hash.c:1.130 --- ZendEngine2/zend_hash.c:1.129 Mon Feb 6 20:36:51 2006 +++ ZendEngine2/zend_hash.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_hash.c,v 1.129 2006/02/06 20:36:51 tony2001 Exp $ */ +/* $Id: zend_hash.c,v 1.130 2006/02/13 10:23:57 dmitry Exp $ */ #include "zend.h" #include "zend_operators.h" @@ -49,16 +49,16 @@ #define UNICODE_KEY(ht, type, arKey, nKeyLength, tmp) \ if (ht->unicode && type == IS_STRING) { \ - UErrorCode status = U_ZERO_ERROR; \ + UErrorCode status = U_ZERO_ERROR; \ UChar *u = NULL; \ int32_t u_len; \ TSRMLS_FETCH(); \ zend_convert_to_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &u, &u_len, (char*)arKey, nKeyLength-1, &status); \ - if (U_FAILURE(status)) { \ + if (U_FAILURE(status)) { \ /* UTODO: */ \ - } \ - type = IS_UNICODE; \ - tmp = arKey = u; \ + } \ + type = IS_UNICODE; \ + tmp = arKey = u; \ } @@ -1781,6 +1781,57 @@ p = p->pListLast; } } + +ZEND_API void zend_hash_to_unicode(HashTable *ht, apply_func_t apply_func TSRMLS_DC) +{ + Bucket **p; + uint nIndex; + + IS_CONSISTENT(ht); + if (ht->unicode) { + return; + } + + ht->unicode = 1; + memset(ht->arBuckets, 0, ht->nTableSize * sizeof(Bucket *)); + p = &ht->pListHead; + while ((*p) != NULL) { + if ((*p)->key.type == IS_STRING) { + UErrorCode status = U_ZERO_ERROR; + UChar *u = NULL; + int32_t u_len; + Bucket *q; + + zend_convert_to_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &u, &u_len, (char*)(*p)->key.u.string, (*p)->nKeyLength-1, &status); + + q = (Bucket *) pemalloc(sizeof(Bucket)-sizeof(q->key.u)+((u_len+1)*2), ht->persistent); + memcpy(q, *p, sizeof(Bucket)-sizeof(q->key.u)); + memcpy(q->key.u.unicode, u, (u_len+1)*2); + q->key.type = IS_UNICODE; + q->nKeyLength = u_len+1; + q->h = zend_u_inline_hash_func(IS_UNICODE, (void*)q->key.u.unicode, q->nKeyLength); + if ((*p)->pData == &(*p)->pDataPtr) { + q->pData = &q->pDataPtr; + } + efree(u); + pefree(*p, ht->persistent); + *p = q; + if (q->pListNext) { + q->pListNext->pListLast = q; + } else { + ht->pListTail = q; + } + } + nIndex = (*p)->h & ht->nTableMask; + CONNECT_TO_BUCKET_DLLIST(*p, ht->arBuckets[nIndex]); + ht->arBuckets[nIndex] = *p; + if (apply_func) { + apply_func((*p)->pData TSRMLS_CC); + } + p = &(*p)->pListNext; + } +} + #endif /* http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_hash.h?r1=1.82&r2=1.83&diff_format=u Index: ZendEngine2/zend_hash.h diff -u ZendEngine2/zend_hash.h:1.82 ZendEngine2/zend_hash.h:1.83 --- ZendEngine2/zend_hash.h:1.82 Tue Jan 17 12:18:52 2006 +++ ZendEngine2/zend_hash.h Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_hash.h,v 1.82 2006/01/17 12:18:52 dmitry Exp $ */ +/* $Id: zend_hash.h,v 1.83 2006/02/13 10:23:57 dmitry Exp $ */ #ifndef ZEND_HASH_H #define ZEND_HASH_H @@ -175,6 +175,7 @@ */ ZEND_API void zend_hash_reverse_apply(HashTable *ht, apply_func_t apply_func TSRMLS_DC); +ZEND_API void zend_hash_to_unicode(HashTable *ht, apply_func_t apply_func TSRMLS_DC); /* Deletes */ ZEND_API int zend_hash_del_key_or_index(HashTable *ht, char *arKey, uint nKeyLength, ulong h, int flag); http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_ini.h?r1=1.35&r2=1.36&diff_format=u Index: ZendEngine2/zend_ini.h diff -u ZendEngine2/zend_ini.h:1.35 ZendEngine2/zend_ini.h:1.36 --- ZendEngine2/zend_ini.h:1.35 Wed Jan 4 23:52:06 2006 +++ ZendEngine2/zend_ini.h Mon Feb 13 10:23:57 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_ini.h,v 1.35 2006/01/04 23:52:06 andi Exp $ */ +/* $Id: zend_ini.h,v 1.36 2006/02/13 10:23:57 dmitry Exp $ */ #ifndef ZEND_INI_H #define ZEND_INI_H @@ -193,6 +193,7 @@ typedef void (*zend_ini_parser_cb_t)(zval *arg1, zval *arg2, int callback_type, void *arg); BEGIN_EXTERN_C() ZEND_API int zend_parse_ini_file(zend_file_handle *fh, zend_bool unbuffered_errors, zend_ini_parser_cb_t ini_parser_cb, void *arg); +ZEND_API int zend_parse_ini_string(char *str, zend_bool unbuffered_errors, zend_ini_parser_cb_t ini_parser_cb, void *arg); END_EXTERN_C() #define ZEND_INI_PARSER_ENTRY 1 http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_ini_parser.y?r1=1.42&r2=1.43&diff_format=u Index: ZendEngine2/zend_ini_parser.y diff -u ZendEngine2/zend_ini_parser.y:1.42 ZendEngine2/zend_ini_parser.y:1.43 --- ZendEngine2/zend_ini_parser.y:1.42 Wed Jan 4 23:52:06 2006 +++ ZendEngine2/zend_ini_parser.y Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_ini_parser.y,v 1.42 2006/01/04 23:52:06 andi Exp $ */ +/* $Id: zend_ini_parser.y,v 1.43 2006/02/13 10:23:57 dmitry Exp $ */ #define DEBUG_CFG_PARSER 0 #include "zend.h" @@ -157,10 +157,14 @@ TSRMLS_FETCH(); currently_parsed_filename = zend_ini_scanner_get_filename(TSRMLS_C); - error_buf_len = 128+strlen(currently_parsed_filename); /* should be more than enough */ - error_buf = (char *) emalloc(error_buf_len); + if (currently_parsed_filename) { + error_buf_len = 128+strlen(currently_parsed_filename); /* should be more than enough */ + error_buf = (char *) emalloc(error_buf_len); - sprintf(error_buf, "Error parsing %s on line %d\n", currently_parsed_filename, zend_ini_scanner_get_lineno(TSRMLS_C)); + sprintf(error_buf, "Error parsing %s on line %d\n", currently_parsed_filename, zend_ini_scanner_get_lineno(TSRMLS_C)); + } else { + error_buf = estrdup("Invalid configuration directive\n"); + } if (CG(ini_parser_unbuffered_errors)) { #ifdef PHP_WIN32 @@ -202,6 +206,30 @@ } +ZEND_API int zend_parse_ini_string(char *str, zend_bool unbuffered_errors, zend_ini_parser_cb_t ini_parser_cb, void *arg) +{ + int len; + zend_ini_parser_param ini_parser_param; + TSRMLS_FETCH(); + + ini_parser_param.ini_parser_cb = ini_parser_cb; + ini_parser_param.arg = arg; + + CG(ini_parser_param) = &ini_parser_param; + if (zend_ini_prepare_string_for_scanning(str TSRMLS_CC)==FAILURE) { + return FAILURE; + } + + CG(ini_parser_unbuffered_errors) = unbuffered_errors; + + if (ini_parse(TSRMLS_C)) { + return SUCCESS; + } else { + return FAILURE; + } +} + + %} %pure_parser http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_ini_scanner.h?r1=1.15&r2=1.16&diff_format=u Index: ZendEngine2/zend_ini_scanner.h diff -u ZendEngine2/zend_ini_scanner.h:1.15 ZendEngine2/zend_ini_scanner.h:1.16 --- ZendEngine2/zend_ini_scanner.h:1.15 Wed Jan 4 23:52:06 2006 +++ ZendEngine2/zend_ini_scanner.h Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_ini_scanner.h,v 1.15 2006/01/04 23:52:06 andi Exp $ */ +/* $Id: zend_ini_scanner.h,v 1.16 2006/02/13 10:23:57 dmitry Exp $ */ #ifndef _ZEND_INI_SCANNER_H #define _ZEND_INI_SCANNER_H @@ -26,6 +26,7 @@ int zend_ini_scanner_get_lineno(TSRMLS_D); char *zend_ini_scanner_get_filename(TSRMLS_D); int zend_ini_open_file_for_scanning(zend_file_handle *fh TSRMLS_DC); +int zend_ini_prepare_string_for_scanning(char *str TSRMLS_DC); void zend_ini_close_file(zend_file_handle *fh TSRMLS_DC); int ini_lex(zval *ini_lval TSRMLS_DC); END_EXTERN_C() http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_ini_scanner.l?r1=1.44&r2=1.45&diff_format=u Index: ZendEngine2/zend_ini_scanner.l diff -u ZendEngine2/zend_ini_scanner.l:1.44 ZendEngine2/zend_ini_scanner.l:1.45 --- ZendEngine2/zend_ini_scanner.l:1.44 Tue Jan 17 19:56:41 2006 +++ ZendEngine2/zend_ini_scanner.l Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_ini_scanner.l,v 1.44 2006/01/17 19:56:41 iliaa Exp $ */ +/* $Id: zend_ini_scanner.l,v 1.45 2006/02/13 10:23:57 dmitry Exp $ */ #define yyleng SCNG(yy_leng) #define yytext SCNG(yy_text) @@ -87,6 +87,16 @@ } +int zend_ini_prepare_string_for_scanning(char *str TSRMLS_DC) +{ + int len = strlen(str); + + yyin = NULL; + yy_scan_buffer(str, len + 2 TSRMLS_CC); + ini_filename = NULL; + return SUCCESS; +} + void zend_ini_close_file(zend_file_handle *fh TSRMLS_DC) { zend_stream_close(fh); http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_interfaces.c?r1=1.45&r2=1.46&diff_format=u Index: ZendEngine2/zend_interfaces.c diff -u ZendEngine2/zend_interfaces.c:1.45 ZendEngine2/zend_interfaces.c:1.46 --- ZendEngine2/zend_interfaces.c:1.45 Mon Feb 6 01:58:45 2006 +++ ZendEngine2/zend_interfaces.c Mon Feb 13 10:23:57 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_interfaces.c,v 1.45 2006/02/06 01:58:45 helly Exp $ */ +/* $Id: zend_interfaces.c,v 1.46 2006/02/13 10:23:57 dmitry Exp $ */ #include "zend.h" #include "zend_API.h" @@ -325,11 +325,11 @@ return SUCCESS; } for (i = 0; i < class_type->num_interfaces; i++) { - if (class_type->interfaces[i] == U_CLASS_ENTRY(zend_ce_aggregate) || class_type->interfaces[i] == U_CLASS_ENTRY(zend_ce_iterator)) { + if (class_type->interfaces[i] == zend_ce_aggregate || class_type->interfaces[i] == zend_ce_iterator) { return SUCCESS; } } - zend_error(E_CORE_ERROR, "Class %v must implement interface %s as part of either %s or %s", + zend_error(E_CORE_ERROR, "Class %v must implement interface %v as part of either %v or %v", class_type->name, zend_ce_traversable->name, zend_ce_iterator->name, @@ -351,10 +351,10 @@ /* c-level get_iterator cannot be changed (exception being only Traversable is implmented) */ if (class_type->num_interfaces) { for (i = 0; i < class_type->num_interfaces; i++) { - if (class_type->interfaces[i] == U_CLASS_ENTRY(zend_ce_iterator)) { + if (class_type->interfaces[i] == zend_ce_iterator) { return FAILURE; } - if (class_type->interfaces[i] == U_CLASS_ENTRY(zend_ce_traversable)) { + if (class_type->interfaces[i] == zend_ce_traversable) { t = i; } } http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_object_handlers.c?r1=1.156&r2=1.157&diff_format=u Index: ZendEngine2/zend_object_handlers.c diff -u ZendEngine2/zend_object_handlers.c:1.156 ZendEngine2/zend_object_handlers.c:1.157 --- ZendEngine2/zend_object_handlers.c:1.156 Sun Jan 22 18:55:02 2006 +++ ZendEngine2/zend_object_handlers.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_object_handlers.c,v 1.156 2006/01/22 18:55:02 helly Exp $ */ +/* $Id: zend_object_handlers.c,v 1.157 2006/02/13 10:23:57 dmitry Exp $ */ #include "zend.h" #include "zend_globals.h" @@ -436,7 +436,7 @@ zend_class_entry *ce = Z_OBJCE_P(object); zval *retval; - if (instanceof_function_ex(ce, U_CLASS_ENTRY(zend_ce_arrayaccess), 1 TSRMLS_CC)) { + if (instanceof_function_ex(ce, zend_ce_arrayaccess, 1 TSRMLS_CC)) { if(offset == NULL) { /* [] construct */ ALLOC_INIT_ZVAL(offset); @@ -469,7 +469,7 @@ { zend_class_entry *ce = Z_OBJCE_P(object); - if (instanceof_function_ex(ce, U_CLASS_ENTRY(zend_ce_arrayaccess), 1 TSRMLS_CC)) { + if (instanceof_function_ex(ce, zend_ce_arrayaccess, 1 TSRMLS_CC)) { if (!offset) { ALLOC_INIT_ZVAL(offset); } else { @@ -489,7 +489,7 @@ zval *retval; int result; - if (instanceof_function_ex(ce, U_CLASS_ENTRY(zend_ce_arrayaccess), 1 TSRMLS_CC)) { + if (instanceof_function_ex(ce, zend_ce_arrayaccess, 1 TSRMLS_CC)) { SEPARATE_ARG_IF_REF(offset); zend_call_method_with_1_params(&object, ce, NULL, "offsetexists", &retval, offset); if (retval) { @@ -603,7 +603,7 @@ { zend_class_entry *ce = Z_OBJCE_P(object); - if (instanceof_function_ex(ce, U_CLASS_ENTRY(zend_ce_arrayaccess), 1 TSRMLS_CC)) { + if (instanceof_function_ex(ce, zend_ce_arrayaccess, 1 TSRMLS_CC)) { SEPARATE_ARG_IF_REF(offset); zend_call_method_with_1_params(&object, ce, NULL, "offsetunset", NULL, offset); zval_ptr_dtor(&offset); http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_operators.c?r1=1.230&r2=1.231&diff_format=u Index: ZendEngine2/zend_operators.c diff -u ZendEngine2/zend_operators.c:1.230 ZendEngine2/zend_operators.c:1.231 --- ZendEngine2/zend_operators.c:1.230 Thu Feb 9 23:23:02 2006 +++ ZendEngine2/zend_operators.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_operators.c,v 1.230 2006/02/09 23:23:02 andrei Exp $ */ +/* $Id: zend_operators.c,v 1.231 2006/02/13 10:23:57 dmitry Exp $ */ #include <ctype.h> @@ -838,7 +838,7 @@ switch (op->type) { case IS_ARRAY: { - object_and_properties_init(op, U_CLASS_ENTRY(zend_standard_class_def), op->value.ht); + object_and_properties_init(op, zend_standard_class_def, op->value.ht); return; break; } http://cvs.php.net/viewcvs.cgi/php-src/ext/com_dotnet/com_misc.c?r1=1.10&r2=1.11&diff_format=u Index: php-src/ext/com_dotnet/com_misc.c diff -u php-src/ext/com_dotnet/com_misc.c:1.10 php-src/ext/com_dotnet/com_misc.c:1.11 --- php-src/ext/com_dotnet/com_misc.c:1.10 Sun Jan 1 13:09:48 2006 +++ php-src/ext/com_dotnet/com_misc.c Mon Feb 13 10:23:57 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: com_misc.c,v 1.10 2006/01/01 13:09:48 sniper Exp $ */ +/* $Id: com_misc.c,v 1.11 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -36,7 +36,7 @@ message = php_win_err(code); free_msg = 1; } - zend_throw_exception(U_CLASS_ENTRY(php_com_exception_class_entry), message, (long)code TSRMLS_CC); + zend_throw_exception(php_com_exception_class_entry, message, (long)code TSRMLS_CC); if (free_msg) { LocalFree(message); } http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/attr.c?r1=1.21&r2=1.22&diff_format=u Index: php-src/ext/dom/attr.c diff -u php-src/ext/dom/attr.c:1.21 php-src/ext/dom/attr.c:1.22 --- php-src/ext/dom/attr.c:1.21 Sun Jan 1 13:09:49 2006 +++ php-src/ext/dom/attr.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: attr.c,v 1.21 2006/01/01 13:09:49 sniper Exp $ */ +/* $Id: attr.c,v 1.22 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -54,8 +54,8 @@ char *name, *value = NULL; int name_len, value_len, name_valid; - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(dom_domexception_class_entry) TSRMLS_CC); - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|s", &id, U_CLASS_ENTRY(dom_attr_class_entry), &name, &name_len, &value, &value_len) == FAILURE) { + php_set_error_handling(EH_THROW, dom_domexception_class_entry TSRMLS_CC); + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|s", &id, dom_attr_class_entry, &name, &name_len, &value, &value_len) == FAILURE) { php_std_error_handling(); return; } @@ -263,7 +263,7 @@ dom_object *intern; xmlAttrPtr attrp; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, U_CLASS_ENTRY(dom_attr_class_entry)) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_attr_class_entry) == FAILURE) { return; } http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/cdatasection.c?r1=1.13&r2=1.14&diff_format=u Index: php-src/ext/dom/cdatasection.c diff -u php-src/ext/dom/cdatasection.c:1.13 php-src/ext/dom/cdatasection.c:1.14 --- php-src/ext/dom/cdatasection.c:1.13 Sun Jan 1 13:09:49 2006 +++ php-src/ext/dom/cdatasection.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: cdatasection.c,v 1.13 2006/01/01 13:09:49 sniper Exp $ */ +/* $Id: cdatasection.c,v 1.14 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -50,8 +50,8 @@ char *value = NULL; int value_len; - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(dom_domexception_class_entry) TSRMLS_CC); - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_cdatasection_class_entry), &value, &value_len) == FAILURE) { + php_set_error_handling(EH_THROW, dom_domexception_class_entry TSRMLS_CC); + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_cdatasection_class_entry, &value, &value_len) == FAILURE) { php_std_error_handling(); return; } http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/characterdata.c?r1=1.17&r2=1.18&diff_format=u Index: php-src/ext/dom/characterdata.c diff -u php-src/ext/dom/characterdata.c:1.17 php-src/ext/dom/characterdata.c:1.18 --- php-src/ext/dom/characterdata.c:1.17 Sun Jan 1 13:09:49 2006 +++ php-src/ext/dom/characterdata.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: characterdata.c,v 1.17 2006/01/01 13:09:49 sniper Exp $ */ +/* $Id: characterdata.c,v 1.18 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -154,7 +154,7 @@ int length; dom_object *intern; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oll", &id, U_CLASS_ENTRY(dom_characterdata_class_entry), &offset, &count) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oll", &id, dom_characterdata_class_entry, &offset, &count) == FAILURE) { return; } @@ -202,7 +202,7 @@ char *arg; int arg_len; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_characterdata_class_entry), &arg, &arg_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_characterdata_class_entry, &arg, &arg_len) == FAILURE) { return; } @@ -229,7 +229,7 @@ int length, arg_len; dom_object *intern; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ols", &id, U_CLASS_ENTRY(dom_characterdata_class_entry), &offset, &arg, &arg_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ols", &id, dom_characterdata_class_entry, &offset, &arg, &arg_len) == FAILURE) { return; } @@ -277,7 +277,7 @@ int length; dom_object *intern; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oll", &id, U_CLASS_ENTRY(dom_characterdata_class_entry), &offset, &count) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oll", &id, dom_characterdata_class_entry, &offset, &count) == FAILURE) { return; } @@ -334,7 +334,7 @@ int length, arg_len; dom_object *intern; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Olls", &id, U_CLASS_ENTRY(dom_characterdata_class_entry), &offset, &count, &arg, &arg_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Olls", &id, dom_characterdata_class_entry, &offset, &count, &arg, &arg_len) == FAILURE) { return; } http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/comment.c?r1=1.13&r2=1.14&diff_format=u Index: php-src/ext/dom/comment.c diff -u php-src/ext/dom/comment.c:1.13 php-src/ext/dom/comment.c:1.14 --- php-src/ext/dom/comment.c:1.13 Sun Jan 1 13:09:49 2006 +++ php-src/ext/dom/comment.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: comment.c,v 1.13 2006/01/01 13:09:49 sniper Exp $ */ +/* $Id: comment.c,v 1.14 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -50,8 +50,8 @@ char *value = NULL; int value_len; - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(dom_domexception_class_entry) TSRMLS_CC); - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|s", &id, U_CLASS_ENTRY(dom_comment_class_entry), &value, &value_len) == FAILURE) { + php_set_error_handling(EH_THROW, dom_domexception_class_entry TSRMLS_CC); + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|s", &id, dom_comment_class_entry, &value, &value_len) == FAILURE) { php_std_error_handling(); return; } http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/document.c?r1=1.74&r2=1.75&diff_format=u Index: php-src/ext/dom/document.c diff -u php-src/ext/dom/document.c:1.74 php-src/ext/dom/document.c:1.75 --- php-src/ext/dom/document.c:1.74 Tue Jan 17 12:18:52 2006 +++ php-src/ext/dom/document.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: document.c,v 1.74 2006/01/17 12:18:52 dmitry Exp $ */ +/* $Id: document.c,v 1.75 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -774,7 +774,7 @@ int ret, name_len, value_len; char *name, *value = NULL; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|s", &id, U_CLASS_ENTRY(dom_document_class_entry), &name, &name_len, &value, &value_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|s", &id, dom_document_class_entry, &name, &name_len, &value, &value_len) == FAILURE) { return; } @@ -807,7 +807,7 @@ dom_object *intern; int ret; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, U_CLASS_ENTRY(dom_document_class_entry)) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_document_class_entry) == FAILURE) { return; } @@ -836,7 +836,7 @@ dom_object *intern; char *value; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_document_class_entry), &value, &value_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &value, &value_len) == FAILURE) { return; } @@ -865,7 +865,7 @@ dom_object *intern; char *value; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_document_class_entry), &value, &value_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &value, &value_len) == FAILURE) { return; } @@ -894,7 +894,7 @@ dom_object *intern; char *value; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_document_class_entry), &value, &value_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &value, &value_len) == FAILURE) { return; } @@ -923,7 +923,7 @@ dom_object *intern; char *name, *value = NULL; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|s", &id, U_CLASS_ENTRY(dom_document_class_entry), &name, &name_len, &value, &value_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|s", &id, dom_document_class_entry, &name, &name_len, &value, &value_len) == FAILURE) { return; } @@ -959,7 +959,7 @@ dom_object *intern; char *name; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_document_class_entry), &name, &name_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &name, &name_len) == FAILURE) { return; } @@ -994,7 +994,7 @@ int ret, name_len; char *name; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_document_class_entry), &name, &name_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &name, &name_len) == FAILURE) { return; } @@ -1028,7 +1028,7 @@ char *name; xmlChar *local; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_document_class_entry), &name, &name_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &name, &name_len) == FAILURE) { return; } @@ -1056,7 +1056,7 @@ int ret; long recursive = 0; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO|l", &id, U_CLASS_ENTRY(dom_document_class_entry), &node, U_CLASS_ENTRY(dom_node_class_entry), &recursive) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO|l", &id, dom_document_class_entry, &node, dom_node_class_entry, &recursive) == FAILURE) { return; } @@ -1101,7 +1101,7 @@ int errorcode; dom_object *intern; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!s|s", &id, U_CLASS_ENTRY(dom_document_class_entry), &uri, &uri_len, &name, &name_len, &value, &value_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!s|s", &id, dom_document_class_entry, &uri, &uri_len, &name, &name_len, &value, &value_len) == FAILURE) { return; } @@ -1165,7 +1165,7 @@ dom_object *intern; int errorcode; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!s", &id, U_CLASS_ENTRY(dom_document_class_entry), &uri, &uri_len, &name, &name_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!s", &id, dom_document_class_entry, &uri, &uri_len, &name, &name_len) == FAILURE) { return; } @@ -1228,7 +1228,7 @@ char *uri, *name; xmlChar *local, *nsuri; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oss", &id, U_CLASS_ENTRY(dom_document_class_entry), &uri, &uri_len, &name, &name_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oss", &id, dom_document_class_entry, &uri, &uri_len, &name, &name_len) == FAILURE) { return; } @@ -1256,7 +1256,7 @@ dom_object *intern; char *idname; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_document_class_entry), &idname, &idname_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &idname, &idname_len) == FAILURE) { return; } @@ -1295,7 +1295,7 @@ xmlDocPtr docp; dom_object *intern; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, U_CLASS_ENTRY(dom_document_class_entry)) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_document_class_entry) == FAILURE) { return; } @@ -1326,8 +1326,8 @@ char *encoding, *version = NULL; int encoding_len = 0, version_len = 0, refcount; - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(dom_domexception_class_entry) TSRMLS_CC); - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|ss", &id, U_CLASS_ENTRY(dom_document_class_entry), &version, &version_len, &encoding, &encoding_len) == FAILURE) { + php_set_error_handling(EH_THROW, dom_domexception_class_entry TSRMLS_CC); + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|ss", &id, dom_document_class_entry, &version, &version_len, &encoding, &encoding_len) == FAILURE) { php_std_error_handling(); return; } @@ -1534,7 +1534,7 @@ long options = 0; id = getThis(); - if (id != NULL && ! instanceof_function(Z_OBJCE_P(id), U_CLASS_ENTRY(dom_document_class_entry) TSRMLS_CC)) { + if (id != NULL && ! instanceof_function(Z_OBJCE_P(id), dom_document_class_entry TSRMLS_CC)) { id = NULL; } @@ -1613,7 +1613,7 @@ char *file; long options = 0; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|l", &id, U_CLASS_ENTRY(dom_document_class_entry), &file, &file_len, &options) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|l", &id, dom_document_class_entry, &file, &file_len, &options) == FAILURE) { return; } @@ -1659,7 +1659,7 @@ int size, format, saveempty; long options = 0; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|O!l", &id, U_CLASS_ENTRY(dom_document_class_entry), &nodep, U_CLASS_ENTRY(dom_node_class_entry), &options) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|O!l", &id, dom_document_class_entry, &nodep, dom_node_class_entry, &options) == FAILURE) { return; } @@ -1758,7 +1758,7 @@ int err; dom_object *intern; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|l", &id, U_CLASS_ENTRY(dom_document_class_entry), &flags) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|l", &id, dom_document_class_entry, &flags) == FAILURE) { return; } @@ -1797,7 +1797,7 @@ dom_object *intern; xmlValidCtxt *cvp; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, U_CLASS_ENTRY(dom_document_class_entry)) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_document_class_entry) == FAILURE) { return; } @@ -1839,7 +1839,7 @@ int is_valid; char resolved_path[MAXPATHLEN + 1]; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_document_class_entry), &source, &source_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &source, &source_len) == FAILURE) { return; } @@ -1929,7 +1929,7 @@ int is_valid; char resolved_path[MAXPATHLEN + 1]; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_document_class_entry), &source, &source_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &source, &source_len) == FAILURE) { return; } @@ -2053,7 +2053,7 @@ if (!newdoc) RETURN_FALSE; - if (id != NULL && instanceof_function(Z_OBJCE_P(id), U_CLASS_ENTRY(dom_document_class_entry) TSRMLS_CC)) { + if (id != NULL && instanceof_function(Z_OBJCE_P(id), dom_document_class_entry TSRMLS_CC)) { intern = (dom_object *)zend_object_store_get_object(id TSRMLS_CC); if (intern != NULL) { docp = (xmlDocPtr) dom_object_get_node(intern); @@ -2110,7 +2110,7 @@ dom_doc_propsptr doc_props; char *file; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_document_class_entry), &file, &file_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &file, &file_len) == FAILURE) { return; } @@ -2145,7 +2145,7 @@ xmlChar *mem; int size; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, U_CLASS_ENTRY(dom_document_class_entry)) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_document_class_entry) == FAILURE) { return; } @@ -2176,7 +2176,7 @@ dom_object *intern; zend_uchar type1, type2; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oss!", &id, U_CLASS_ENTRY(dom_document_class_entry), &baseclass, &baseclass_len, &extendedclass, &extendedclass_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oss!", &id, dom_document_class_entry, &baseclass, &baseclass_len, &extendedclass, &extendedclass_len) == FAILURE) { return; } @@ -2189,7 +2189,7 @@ basece = *pce; } - if (basece == NULL || ! instanceof_function(basece, U_CLASS_ENTRY(dom_node_class_entry) TSRMLS_CC)) { + if (basece == NULL || ! instanceof_function(basece, dom_node_class_entry TSRMLS_CC)) { php_error_docref(NULL TSRMLS_CC, E_ERROR, "Class %s is not derived from DOMNode.", baseclass); return; } http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/documentfragment.c?r1=1.17&r2=1.18&diff_format=u Index: php-src/ext/dom/documentfragment.c diff -u php-src/ext/dom/documentfragment.c:1.17 php-src/ext/dom/documentfragment.c:1.18 --- php-src/ext/dom/documentfragment.c:1.17 Sun Jan 1 13:09:49 2006 +++ php-src/ext/dom/documentfragment.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: documentfragment.c,v 1.17 2006/01/01 13:09:49 sniper Exp $ */ +/* $Id: documentfragment.c,v 1.18 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -49,7 +49,7 @@ xmlNodePtr nodep = NULL, oldnode = NULL; dom_object *intern; - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(dom_domexception_class_entry) TSRMLS_CC); + php_set_error_handling(EH_THROW, dom_domexception_class_entry TSRMLS_CC); if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_documentfragment_class_entry) == FAILURE) { php_std_error_handling(); return; http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/dom_iterators.c?r1=1.13&r2=1.14&diff_format=u Index: php-src/ext/dom/dom_iterators.c diff -u php-src/ext/dom/dom_iterators.c:1.13 php-src/ext/dom/dom_iterators.c:1.14 --- php-src/ext/dom/dom_iterators.c:1.13 Tue Feb 7 11:48:37 2006 +++ php-src/ext/dom/dom_iterators.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dom_iterators.c,v 1.13 2006/02/07 11:48:37 rrichards Exp $ */ +/* $Id: dom_iterators.c,v 1.14 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -161,7 +161,7 @@ object = (zval *)iterator->intern.data; - if (instanceof_function(Z_OBJCE_P(object), U_CLASS_ENTRY(dom_nodelist_class_entry) TSRMLS_CC)) { + if (instanceof_function(Z_OBJCE_P(object), dom_nodelist_class_entry TSRMLS_CC)) { *int_key = iter->index - 1; return HASH_KEY_IS_LONG; } else { http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/domexception.c?r1=1.13&r2=1.14&diff_format=u Index: php-src/ext/dom/domexception.c diff -u php-src/ext/dom/domexception.c:1.13 php-src/ext/dom/domexception.c:1.14 --- php-src/ext/dom/domexception.c:1.13 Sun Jan 1 13:09:49 2006 +++ php-src/ext/dom/domexception.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: domexception.c,v 1.13 2006/01/01 13:09:49 sniper Exp $ */ +/* $Id: domexception.c,v 1.14 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -45,7 +45,7 @@ void php_dom_throw_error_with_message(int error_code, char *error_message, int strict_error TSRMLS_DC) { if (strict_error == 1) { - zend_throw_exception(U_CLASS_ENTRY(dom_domexception_class_entry), error_message, error_code TSRMLS_CC); + zend_throw_exception(dom_domexception_class_entry, error_message, error_code TSRMLS_CC); } else { php_libxml_issue_error(E_WARNING, error_message TSRMLS_CC); } http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/domimplementation.c?r1=1.17&r2=1.18&diff_format=u Index: php-src/ext/dom/domimplementation.c diff -u php-src/ext/dom/domimplementation.c:1.17 php-src/ext/dom/domimplementation.c:1.18 --- php-src/ext/dom/domimplementation.c:1.17 Sun Jan 1 13:09:49 2006 +++ php-src/ext/dom/domimplementation.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: domimplementation.c,v 1.17 2006/01/01 13:09:49 sniper Exp $ */ +/* $Id: domimplementation.c,v 1.18 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -134,7 +134,7 @@ char *prefix = NULL, *localname = NULL; dom_object *doctobj; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|ssO", &uri, &uri_len, &name, &name_len, &node, U_CLASS_ENTRY(dom_documenttype_class_entry)) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|ssO", &uri, &uri_len, &name, &name_len, &node, dom_documenttype_class_entry) == FAILURE) { return; } http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/element.c?r1=1.41&r2=1.42&diff_format=u Index: php-src/ext/dom/element.c diff -u php-src/ext/dom/element.c:1.41 php-src/ext/dom/element.c:1.42 --- php-src/ext/dom/element.c:1.41 Sun Jan 1 13:09:49 2006 +++ php-src/ext/dom/element.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: element.c,v 1.41 2006/01/01 13:09:49 sniper Exp $ */ +/* $Id: element.c,v 1.42 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -71,8 +71,8 @@ int name_len, value_len = 0, name_valid; xmlNsPtr nsptr = NULL; - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(dom_domexception_class_entry) TSRMLS_CC); - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|s!s", &id, U_CLASS_ENTRY(dom_element_class_entry), &name, &name_len, &value, &value_len, &uri, &uri_len) == FAILURE) { + php_set_error_handling(EH_THROW, dom_domexception_class_entry TSRMLS_CC); + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|s!s", &id, dom_element_class_entry, &name, &name_len, &value, &value_len, &uri, &uri_len) == FAILURE) { php_std_error_handling(); return; } @@ -202,7 +202,7 @@ dom_object *intern; int name_len; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_element_class_entry), &name, &name_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_element_class_entry, &name, &name_len) == FAILURE) { return; } @@ -233,7 +233,7 @@ char *name, *value; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oss", &id, U_CLASS_ENTRY(dom_element_class_entry), &name, &name_len, &value, &value_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oss", &id, dom_element_class_entry, &name, &name_len, &value, &value_len) == FAILURE) { return; } @@ -278,7 +278,7 @@ int name_len; char *name; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_element_class_entry), &name, &name_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_element_class_entry, &name, &name_len) == FAILURE) { return; } @@ -322,7 +322,7 @@ dom_object *intern; char *name; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_element_class_entry), &name, &name_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_element_class_entry, &name, &name_len) == FAILURE) { return; } @@ -350,7 +350,7 @@ dom_object *intern, *attrobj, *oldobj; int ret; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &id, U_CLASS_ENTRY(dom_element_class_entry), &node, U_CLASS_ENTRY(dom_attr_class_entry)) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &id, dom_element_class_entry, &node, dom_attr_class_entry) == FAILURE) { return; } @@ -413,7 +413,7 @@ dom_object *intern, *attrobj; int ret; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &id, U_CLASS_ENTRY(dom_element_class_entry), &node, U_CLASS_ENTRY(dom_attr_class_entry)) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &id, dom_element_class_entry, &node, dom_attr_class_entry) == FAILURE) { return; } @@ -452,7 +452,7 @@ char *name; xmlChar *local; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_element_class_entry), &name, &name_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_element_class_entry, &name, &name_len) == FAILURE) { return; } @@ -479,7 +479,7 @@ int uri_len = 0, name_len = 0; char *uri, *name, *strattr; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!s", &id, U_CLASS_ENTRY(dom_element_class_entry), &uri, &uri_len, &name, &name_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!s", &id, dom_element_class_entry, &uri, &uri_len, &name, &name_len) == FAILURE) { return; } @@ -559,7 +559,7 @@ dom_object *intern; int errorcode = 0, stricterror, is_xmlns = 0; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!ss", &id, U_CLASS_ENTRY(dom_element_class_entry), &uri, &uri_len, &name, &name_len, &value, &value_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!ss", &id, dom_element_class_entry, &uri, &uri_len, &name, &name_len, &value, &value_len) == FAILURE) { return; } @@ -668,7 +668,7 @@ int name_len, uri_len; char *name, *uri; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!s", &id, U_CLASS_ENTRY(dom_element_class_entry), &uri, &uri_len, &name, &name_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!s", &id, dom_element_class_entry, &uri, &uri_len, &name, &name_len) == FAILURE) { return; } @@ -725,7 +725,7 @@ int uri_len, name_len, ret; char *uri, *name; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!s", &id, U_CLASS_ENTRY(dom_element_class_entry), &uri, &uri_len, &name, &name_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!s", &id, dom_element_class_entry, &uri, &uri_len, &name, &name_len) == FAILURE) { return; } @@ -756,7 +756,7 @@ dom_object *intern, *attrobj, *oldobj; int ret; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &id, U_CLASS_ENTRY(dom_element_class_entry), &node, U_CLASS_ENTRY(dom_attr_class_entry)) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &id, dom_element_class_entry, &node, dom_attr_class_entry) == FAILURE) { return; } @@ -827,7 +827,7 @@ char *uri, *name; xmlChar *local, *nsuri; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oss", &id, U_CLASS_ENTRY(dom_element_class_entry), &uri, &uri_len, &name, &name_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oss", &id, dom_element_class_entry, &uri, &uri_len, &name, &name_len) == FAILURE) { return; } @@ -855,7 +855,7 @@ char *name, *value; int name_len; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_element_class_entry), &name, &name_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_element_class_entry, &name, &name_len) == FAILURE) { return; } @@ -885,7 +885,7 @@ int uri_len, name_len; char *uri, *name, *value; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!s", &id, U_CLASS_ENTRY(dom_element_class_entry), &uri, &uri_len, &name, &name_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!s", &id, dom_element_class_entry, &uri, &uri_len, &name, &name_len) == FAILURE) { return; } @@ -942,7 +942,7 @@ int name_len; zend_bool is_id; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Osb", &id, U_CLASS_ENTRY(dom_element_class_entry), &name, &name_len, &is_id) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Osb", &id, dom_element_class_entry, &name, &name_len, &is_id) == FAILURE) { return; } @@ -979,7 +979,7 @@ char *uri, *name; zend_bool is_id; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ossb", &id, U_CLASS_ENTRY(dom_element_class_entry), &uri, &uri_len, &name, &name_len, &is_id) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ossb", &id, dom_element_class_entry, &uri, &uri_len, &name, &name_len, &is_id) == FAILURE) { return; } @@ -1016,7 +1016,7 @@ int name_len; zend_bool is_id; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OOb", &id, U_CLASS_ENTRY(dom_element_class_entry), &node, U_CLASS_ENTRY(dom_attr_class_entry), &is_id) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OOb", &id, dom_element_class_entry, &node, dom_attr_class_entry, &is_id) == FAILURE) { return; } http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/entityreference.c?r1=1.14&r2=1.15&diff_format=u Index: php-src/ext/dom/entityreference.c diff -u php-src/ext/dom/entityreference.c:1.14 php-src/ext/dom/entityreference.c:1.15 --- php-src/ext/dom/entityreference.c:1.14 Sun Jan 1 13:09:49 2006 +++ php-src/ext/dom/entityreference.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: entityreference.c,v 1.14 2006/01/01 13:09:49 sniper Exp $ */ +/* $Id: entityreference.c,v 1.15 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -50,8 +50,8 @@ char *name; int name_len, name_valid; - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(dom_domexception_class_entry) TSRMLS_CC); - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_entityreference_class_entry), &name, &name_len) == FAILURE) { + php_set_error_handling(EH_THROW, dom_domexception_class_entry TSRMLS_CC); + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_entityreference_class_entry, &name, &name_len) == FAILURE) { php_std_error_handling(); return; } http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/namednodemap.c?r1=1.17&r2=1.18&diff_format=u Index: php-src/ext/dom/namednodemap.c diff -u php-src/ext/dom/namednodemap.c:1.17 php-src/ext/dom/namednodemap.c:1.18 --- php-src/ext/dom/namednodemap.c:1.17 Sun Jan 1 13:09:49 2006 +++ php-src/ext/dom/namednodemap.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: namednodemap.c,v 1.17 2006/01/01 13:09:49 sniper Exp $ */ +/* $Id: namednodemap.c,v 1.18 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -104,7 +104,7 @@ xmlNodePtr nodep; xmlNotation *notep = NULL; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_namednodemap_class_entry), &named, &namedlen) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_namednodemap_class_entry, &named, &namedlen) == FAILURE) { return; } @@ -176,7 +176,7 @@ xmlNodePtr nodep, curnode; int count; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol", &id, U_CLASS_ENTRY(dom_namednodemap_class_entry), &index) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol", &id, dom_namednodemap_class_entry, &index) == FAILURE) { return; } if (index >= 0) { @@ -232,7 +232,7 @@ xmlNodePtr nodep; xmlNotation *notep = NULL; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!s", &id, U_CLASS_ENTRY(dom_namednodemap_class_entry), &uri, &urilen, &named, &namedlen) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!s", &id, dom_namednodemap_class_entry, &uri, &urilen, &named, &namedlen) == FAILURE) { return; } http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/node.c?r1=1.42&r2=1.43&diff_format=u Index: php-src/ext/dom/node.c diff -u php-src/ext/dom/node.c:1.42 php-src/ext/dom/node.c:1.43 --- php-src/ext/dom/node.c:1.42 Wed Jan 25 17:33:24 2006 +++ php-src/ext/dom/node.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: node.c,v 1.42 2006/01/25 17:33:24 rrichards Exp $ */ +/* $Id: node.c,v 1.43 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -913,7 +913,7 @@ dom_object *intern, *childobj, *refpobj; int ret, stricterror; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO|O!", &id, U_CLASS_ENTRY(dom_node_class_entry), &node, U_CLASS_ENTRY(dom_node_class_entry), &ref, U_CLASS_ENTRY(dom_node_class_entry)) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO|O!", &id, dom_node_class_entry, &node, dom_node_class_entry, &ref, dom_node_class_entry) == FAILURE) { return; } @@ -1077,7 +1077,7 @@ int ret; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OOO", &id, U_CLASS_ENTRY(dom_node_class_entry), &newnode, U_CLASS_ENTRY(dom_node_class_entry), &oldnode, U_CLASS_ENTRY(dom_node_class_entry)) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OOO", &id, dom_node_class_entry, &newnode, dom_node_class_entry, &oldnode, dom_node_class_entry) == FAILURE) { return; } @@ -1167,7 +1167,7 @@ dom_object *intern, *childobj; int ret, stricterror; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &id, U_CLASS_ENTRY(dom_node_class_entry), &node, U_CLASS_ENTRY(dom_node_class_entry)) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &id, dom_node_class_entry, &node, dom_node_class_entry) == FAILURE) { return; } @@ -1220,7 +1220,7 @@ dom_object *intern, *childobj; int ret, stricterror; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &id, U_CLASS_ENTRY(dom_node_class_entry), &node, U_CLASS_ENTRY(dom_node_class_entry)) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &id, dom_node_class_entry, &node, dom_node_class_entry) == FAILURE) { return; } @@ -1321,7 +1321,7 @@ xmlNode *nodep; dom_object *intern; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, U_CLASS_ENTRY(dom_node_class_entry)) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_node_class_entry) == FAILURE) { return; } @@ -1353,7 +1353,7 @@ dom_object *intern; long recursive = 0; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|l", &id, U_CLASS_ENTRY(dom_node_class_entry), &recursive) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|l", &id, dom_node_class_entry, &recursive) == FAILURE) { return; } @@ -1414,7 +1414,7 @@ xmlNode *nodep; dom_object *intern; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, U_CLASS_ENTRY(dom_node_class_entry)) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_node_class_entry) == FAILURE) { return; } @@ -1436,7 +1436,7 @@ int feature_len, version_len; char *feature, *version; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oss", &id, U_CLASS_ENTRY(dom_node_class_entry), &feature, &feature_len, &version, &version_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oss", &id, dom_node_class_entry, &feature, &feature_len, &version, &version_len) == FAILURE) { return; } @@ -1459,7 +1459,7 @@ xmlNode *nodep; dom_object *intern; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, U_CLASS_ENTRY(dom_node_class_entry)) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_node_class_entry) == FAILURE) { return; } @@ -1497,7 +1497,7 @@ xmlNodePtr nodeotherp, nodep; dom_object *intern, *nodeotherobj; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &id, U_CLASS_ENTRY(dom_node_class_entry), &node, U_CLASS_ENTRY(dom_node_class_entry)) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &id, dom_node_class_entry, &node, dom_node_class_entry) == FAILURE) { return; } @@ -1527,7 +1527,7 @@ int uri_len = 0; char *uri; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_node_class_entry), &uri, &uri_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_node_class_entry, &uri, &uri_len) == FAILURE) { return; } @@ -1578,7 +1578,7 @@ int uri_len = 0; char *uri; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_node_class_entry), &uri, &uri_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_node_class_entry, &uri, &uri_len) == FAILURE) { return; } @@ -1609,7 +1609,7 @@ int prefix_len = 0; char *prefix; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_node_class_entry), &prefix, &prefix_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_node_class_entry, &prefix, &prefix_len) == FAILURE) { return; } http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/nodelist.c?r1=1.20&r2=1.21&diff_format=u Index: php-src/ext/dom/nodelist.c diff -u php-src/ext/dom/nodelist.c:1.20 php-src/ext/dom/nodelist.c:1.21 --- php-src/ext/dom/nodelist.c:1.20 Sun Jan 1 13:09:49 2006 +++ php-src/ext/dom/nodelist.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: nodelist.c,v 1.20 2006/01/01 13:09:49 sniper Exp $ */ +/* $Id: nodelist.c,v 1.21 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -111,7 +111,7 @@ HashTable *nodeht; zval **entry; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol", &id, U_CLASS_ENTRY(dom_nodelist_class_entry), &index) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol", &id, dom_nodelist_class_entry, &index) == FAILURE) { return; } http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/php_dom.c?r1=1.87&r2=1.88&diff_format=u Index: php-src/ext/dom/php_dom.c diff -u php-src/ext/dom/php_dom.c:1.87 php-src/ext/dom/php_dom.c:1.88 --- php-src/ext/dom/php_dom.c:1.87 Sun Jan 1 13:09:49 2006 +++ php-src/ext/dom/php_dom.c Mon Feb 13 10:23:57 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_dom.c,v 1.87 2006/01/01 13:09:49 sniper Exp $ */ +/* $Id: php_dom.c,v 1.88 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1049,7 +1049,7 @@ clone = dom_objects_set_class(intern->std.ce, 0 TSRMLS_CC); - if (instanceof_function(intern->std.ce, U_CLASS_ENTRY(dom_node_class_entry) TSRMLS_CC)) { + if (instanceof_function(intern->std.ce, dom_node_class_entry TSRMLS_CC)) { node = (xmlNodePtr)dom_object_get_node((dom_object *) object); if (node != NULL) { cloned_node = xmlDocCopyNode(node, node->doc, 1); @@ -1170,9 +1170,9 @@ zend_class_entry *ce; if (ce_type == DOM_NAMEDNODEMAP) { - ce = U_CLASS_ENTRY(dom_namednodemap_class_entry); + ce = dom_namednodemap_class_entry; } else { - ce = U_CLASS_ENTRY(dom_nodelist_class_entry); + ce = dom_nodelist_class_entry; } object_init_ex(return_value, ce); @@ -1209,69 +1209,69 @@ case XML_DOCUMENT_NODE: case XML_HTML_DOCUMENT_NODE: { - ce = U_CLASS_ENTRY(dom_document_class_entry); + ce = dom_document_class_entry; break; } case XML_DTD_NODE: case XML_DOCUMENT_TYPE_NODE: { - ce = U_CLASS_ENTRY(dom_documenttype_class_entry); + ce = dom_documenttype_class_entry; break; } case XML_ELEMENT_NODE: { - ce = U_CLASS_ENTRY(dom_element_class_entry); + ce = dom_element_class_entry; break; } case XML_ATTRIBUTE_NODE: { - ce = U_CLASS_ENTRY(dom_attr_class_entry); + ce = dom_attr_class_entry; break; } case XML_TEXT_NODE: { - ce = U_CLASS_ENTRY(dom_text_class_entry); + ce = dom_text_class_entry; break; } case XML_COMMENT_NODE: { - ce = U_CLASS_ENTRY(dom_comment_class_entry); + ce = dom_comment_class_entry; break; } case XML_PI_NODE: { - ce = U_CLASS_ENTRY(dom_processinginstruction_class_entry); + ce = dom_processinginstruction_class_entry; break; } case XML_ENTITY_REF_NODE: { - ce = U_CLASS_ENTRY(dom_entityreference_class_entry); + ce = dom_entityreference_class_entry; break; } case XML_ENTITY_DECL: case XML_ELEMENT_DECL: { - ce = U_CLASS_ENTRY(dom_entity_class_entry); + ce = dom_entity_class_entry; break; } case XML_CDATA_SECTION_NODE: { - ce = U_CLASS_ENTRY(dom_cdatasection_class_entry); + ce = dom_cdatasection_class_entry; break; } case XML_DOCUMENT_FRAG_NODE: { - ce = U_CLASS_ENTRY(dom_documentfragment_class_entry); + ce = dom_documentfragment_class_entry; break; } case XML_NOTATION_NODE: { - ce = U_CLASS_ENTRY(dom_notation_class_entry); + ce = dom_notation_class_entry; break; } case XML_NAMESPACE_DECL: { - ce = U_CLASS_ENTRY(dom_namespace_node_class_entry); + ce = dom_namespace_node_class_entry; break; } default: @@ -1300,7 +1300,7 @@ void php_dom_create_implementation(zval **retval TSRMLS_DC) { - object_init_ex(*retval, U_CLASS_ENTRY(dom_domimplementation_class_entry)); + object_init_ex(*retval, dom_domimplementation_class_entry); } /* {{{ int dom_hierarchy(xmlNodePtr parent, xmlNodePtr child) */ http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/processinginstruction.c?r1=1.19&r2=1.20&diff_format=u Index: php-src/ext/dom/processinginstruction.c diff -u php-src/ext/dom/processinginstruction.c:1.19 php-src/ext/dom/processinginstruction.c:1.20 --- php-src/ext/dom/processinginstruction.c:1.19 Sun Jan 1 13:09:49 2006 +++ php-src/ext/dom/processinginstruction.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: processinginstruction.c,v 1.19 2006/01/01 13:09:49 sniper Exp $ */ +/* $Id: processinginstruction.c,v 1.20 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -50,8 +50,8 @@ char *name, *value = NULL; int name_len, value_len, name_valid; - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(dom_domexception_class_entry) TSRMLS_CC); - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|s", &id, U_CLASS_ENTRY(dom_processinginstruction_class_entry), &name, &name_len, &value, &value_len) == FAILURE) { + php_set_error_handling(EH_THROW, dom_domexception_class_entry TSRMLS_CC); + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|s", &id, dom_processinginstruction_class_entry, &name, &name_len, &value, &value_len) == FAILURE) { php_std_error_handling(); return; } http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/text.c?r1=1.25&r2=1.26&diff_format=u Index: php-src/ext/dom/text.c diff -u php-src/ext/dom/text.c:1.25 php-src/ext/dom/text.c:1.26 --- php-src/ext/dom/text.c:1.25 Sun Jan 1 13:09:49 2006 +++ php-src/ext/dom/text.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: text.c,v 1.25 2006/01/01 13:09:49 sniper Exp $ */ +/* $Id: text.c,v 1.26 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -54,8 +54,8 @@ char *value = NULL; int value_len; - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(dom_domexception_class_entry) TSRMLS_CC); - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|s", &id, U_CLASS_ENTRY(dom_text_class_entry), &value, &value_len) == FAILURE) { + php_set_error_handling(EH_THROW, dom_domexception_class_entry TSRMLS_CC); + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|s", &id, dom_text_class_entry, &value, &value_len) == FAILURE) { php_std_error_handling(); return; } @@ -125,7 +125,7 @@ int length; dom_object *intern; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol", &id, U_CLASS_ENTRY(dom_text_class_entry), &offset) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol", &id, dom_text_class_entry, &offset) == FAILURE) { return; } DOM_GET_OBJ(node, id, xmlNodePtr, intern); @@ -177,7 +177,7 @@ xmlNodePtr node; dom_object *intern; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, U_CLASS_ENTRY(dom_text_class_entry)) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_text_class_entry) == FAILURE) { return; } DOM_GET_OBJ(node, id, xmlNodePtr, intern); http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/xpath.c?r1=1.28&r2=1.29&diff_format=u Index: php-src/ext/dom/xpath.c diff -u php-src/ext/dom/xpath.c:1.28 php-src/ext/dom/xpath.c:1.29 --- php-src/ext/dom/xpath.c:1.28 Sun Jan 1 13:09:49 2006 +++ php-src/ext/dom/xpath.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: xpath.c,v 1.28 2006/01/01 13:09:49 sniper Exp $ */ +/* $Id: xpath.c,v 1.29 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -52,8 +52,8 @@ dom_object *docobj, *intern; xmlXPathContextPtr ctx, oldctx; - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(dom_domexception_class_entry) TSRMLS_CC); - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &id, U_CLASS_ENTRY(dom_xpath_class_entry), &doc, U_CLASS_ENTRY(dom_document_class_entry)) == FAILURE) { + php_set_error_handling(EH_THROW, dom_domexception_class_entry TSRMLS_CC); + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &id, dom_xpath_class_entry, &doc, dom_document_class_entry) == FAILURE) { php_std_error_handling(); return; } @@ -111,7 +111,7 @@ dom_object *intern; unsigned char *prefix, *ns_uri; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oss", &id, U_CLASS_ENTRY(dom_xpath_class_entry), &prefix, &prefix_len, &ns_uri, &ns_uri_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oss", &id, dom_xpath_class_entry, &prefix, &prefix_len, &ns_uri, &ns_uri_len) == FAILURE) { return; } @@ -151,7 +151,7 @@ xmlNsPtr *ns; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|O", &id, U_CLASS_ENTRY(dom_xpath_class_entry), &expr, &expr_len, &context, U_CLASS_ENTRY(dom_node_class_entry)) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|O", &id, dom_xpath_class_entry, &expr, &expr_len, &context, dom_node_class_entry) == FAILURE) { return; } http://cvs.php.net/viewcvs.cgi/php-src/ext/pdo/pdo.c?r1=1.70&r2=1.71&diff_format=u Index: php-src/ext/pdo/pdo.c diff -u php-src/ext/pdo/pdo.c:1.70 php-src/ext/pdo/pdo.c:1.71 --- php-src/ext/pdo/pdo.c:1.70 Sun Jan 1 13:09:52 2006 +++ php-src/ext/pdo/pdo.c Mon Feb 13 10:23:57 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo.c,v 1.70 2006/01/01 13:09:52 sniper Exp $ */ +/* $Id: pdo.c,v 1.71 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -55,7 +55,7 @@ PDO_API zend_class_entry *php_pdo_get_exception(TSRMLS_D) { - return U_CLASS_ENTRY(pdo_exception_ce); + return pdo_exception_ce; } PDO_API char *php_pdo_str_tolower_dup(const char *src, int len) http://cvs.php.net/viewcvs.cgi/php-src/ext/pdo/pdo_dbh.c?r1=1.110&r2=1.111&diff_format=u Index: php-src/ext/pdo/pdo_dbh.c diff -u php-src/ext/pdo/pdo_dbh.c:1.110 php-src/ext/pdo/pdo_dbh.c:1.111 --- php-src/ext/pdo/pdo_dbh.c:1.110 Wed Feb 1 09:10:23 2006 +++ php-src/ext/pdo/pdo_dbh.c Mon Feb 13 10:23:57 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_dbh.c,v 1.110 2006/02/01 09:10:23 tony2001 Exp $ */ +/* $Id: pdo_dbh.c,v 1.111 2006/02/13 10:23:57 dmitry Exp $ */ /* The PDO Database Handle Class */ @@ -508,7 +508,7 @@ RETURN_FALSE; } dbstmt_ce = *pce; - if (!instanceof_function(dbstmt_ce, U_CLASS_ENTRY(pdo_dbstmt_ce) TSRMLS_CC)) { + if (!instanceof_function(dbstmt_ce, pdo_dbstmt_ce TSRMLS_CC)) { pdo_raise_impl_error(dbh, NULL, "HY000", "user-supplied statement class must be derived from PDOStatement" TSRMLS_CC); PDO_HANDLE_DBH_ERR(); @@ -727,7 +727,7 @@ PDO_HANDLE_DBH_ERR(); RETURN_FALSE; } - if (!instanceof_function(*pce, U_CLASS_ENTRY(pdo_dbstmt_ce) TSRMLS_CC)) { + if (!instanceof_function(*pce, pdo_dbstmt_ce TSRMLS_CC)) { pdo_raise_impl_error(dbh, NULL, "HY000", "user-supplied statement class must be derived from PDOStatement" TSRMLS_CC); PDO_HANDLE_DBH_ERR(); @@ -1372,7 +1372,7 @@ ALLOC_HASHTABLE(dbh->properties); zend_hash_init(dbh->properties, 0, NULL, ZVAL_PTR_DTOR, 0); zend_hash_copy(dbh->properties, &ce->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *)); - dbh->def_stmt_ce = U_CLASS_ENTRY(pdo_dbstmt_ce); + dbh->def_stmt_ce = pdo_dbstmt_ce; retval.handle = zend_objects_store_put(dbh, (zend_objects_store_dtor_t)zend_objects_destroy_object, (zend_objects_free_object_storage_t)pdo_dbh_free_storage, NULL TSRMLS_CC); retval.handlers = &pdo_dbh_object_handlers; http://cvs.php.net/viewcvs.cgi/php-src/ext/pdo/pdo_stmt.c?r1=1.143&r2=1.144&diff_format=u Index: php-src/ext/pdo/pdo_stmt.c diff -u php-src/ext/pdo/pdo_stmt.c:1.143 php-src/ext/pdo/pdo_stmt.c:1.144 --- php-src/ext/pdo/pdo_stmt.c:1.143 Sun Feb 5 23:31:47 2006 +++ php-src/ext/pdo/pdo_stmt.c Mon Feb 13 10:23:57 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_stmt.c,v 1.143 2006/02/05 23:31:47 helly Exp $ */ +/* $Id: pdo_stmt.c,v 1.144 2006/02/13 10:23:57 dmitry Exp $ */ /* The PDO Statement Handle Class */ @@ -1178,7 +1178,7 @@ switch(ZEND_NUM_ARGS()) { case 0: - stmt->fetch.cls.ce = U_CLASS_ENTRY(zend_standard_class_def); + stmt->fetch.cls.ce = zend_standard_class_def; break; case 2: if (Z_TYPE_P(ctor_args) != IS_NULL && Z_TYPE_P(ctor_args) != IS_ARRAY) { @@ -1274,7 +1274,7 @@ switch(ZEND_NUM_ARGS()) { case 0: case 1: - stmt->fetch.cls.ce = U_CLASS_ENTRY(zend_standard_class_def); + stmt->fetch.cls.ce = zend_standard_class_def; break; case 3: if (Z_TYPE_P(ctor_args) != IS_NULL && Z_TYPE_P(ctor_args) != IS_ARRAY) { @@ -2406,7 +2406,7 @@ static zend_class_entry *row_get_ce(zval *object TSRMLS_DC) { - return U_CLASS_ENTRY(pdo_dbstmt_ce); + return pdo_dbstmt_ce; } static int row_get_classname(zval *object, char **class_name, zend_uint *class_name_len, int parent TSRMLS_DC) http://cvs.php.net/viewcvs.cgi/php-src/ext/pdo/php_pdo_phpvers_compat.h?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/pdo/php_pdo_phpvers_compat.h diff -u php-src/ext/pdo/php_pdo_phpvers_compat.h:1.2 php-src/ext/pdo/php_pdo_phpvers_compat.h:1.3 --- php-src/ext/pdo/php_pdo_phpvers_compat.h:1.2 Sun Jan 1 13:09:52 2006 +++ php-src/ext/pdo/php_pdo_phpvers_compat.h Mon Feb 13 10:23:57 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_phpvers_compat.h,v 1.2 2006/01/01 13:09:52 sniper Exp $ */ +/* $Id: php_pdo_phpvers_compat.h,v 1.3 2006/02/13 10:23:57 dmitry Exp $ */ /* macros for backwards compatibility with PHP 5, so that HEAD of PDO and its * drivers may still build against PHP 5 */ @@ -27,7 +27,6 @@ # define ZVAL_RT_STRINGL(a, b, c, d) ZVAL_STRINGL(a, b, c, d) # define ZVAL_ASCII_STRINGL(a, b, c, d) ZVAL_STRINGL(a, b, c, d) -# define U_CLASS_ENTRY(ce) ce # define PDO_ZVAL_PP_IS_TEXT(pp) (Z_TYPE_PP(pp) == IS_STRING) # define PDO_ZVAL_P_IS_TEXT(pp) (Z_TYPE_P(pp) == IS_STRING) # define Z_UNIVAL_PP(x) Z_STRVAL_PP(x) http://cvs.php.net/viewcvs.cgi/php-src/ext/reflection/php_reflection.c?r1=1.203&r2=1.204&diff_format=u Index: php-src/ext/reflection/php_reflection.c diff -u php-src/ext/reflection/php_reflection.c:1.203 php-src/ext/reflection/php_reflection.c:1.204 --- php-src/ext/reflection/php_reflection.c:1.203 Wed Feb 8 00:37:31 2006 +++ php-src/ext/reflection/php_reflection.c Mon Feb 13 10:23:57 2006 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_reflection.c,v 1.203 2006/02/08 00:37:31 iliaa Exp $ */ +/* $Id: php_reflection.c,v 1.204 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -71,7 +71,7 @@ /* Method macros */ #define METHOD_NOTSTATIC(ce) \ - if (!this_ptr || !instanceof_function(Z_OBJCE_P(this_ptr), U_CLASS_ENTRY(ce) TSRMLS_CC)) { \ + if (!this_ptr || !instanceof_function(Z_OBJCE_P(this_ptr), ce TSRMLS_CC)) { \ zend_error(E_ERROR, "%v() cannot be called statically", get_active_function_name(TSRMLS_C)); \ return; \ } \ @@ -83,11 +83,11 @@ /* Exception throwing macro */ #define _DO_THROW(msg) \ - zend_throw_exception(U_CLASS_ENTRY(reflection_exception_ptr), msg, 0 TSRMLS_CC); \ + zend_throw_exception(reflection_exception_ptr, msg, 0 TSRMLS_CC); \ return; \ #define RETURN_ON_EXCEPTION \ - if (EG(exception) && Z_OBJCE_P(EG(exception)) == U_CLASS_ENTRY(reflection_exception_ptr)) { \ + if (EG(exception) && Z_OBJCE_P(EG(exception)) == reflection_exception_ptr) { \ return; \ } @@ -960,7 +960,7 @@ MAKE_STD_ZVAL(name); ZVAL_TEXTL(name, ce->name, ce->name_length, 1); - reflection_instanciate(U_CLASS_ENTRY(reflection_class_ptr), object TSRMLS_CC); + reflection_instanciate(reflection_class_ptr, object TSRMLS_CC); intern = (reflection_object *) zend_object_store_get_object(object TSRMLS_CC); intern->ptr = ce; intern->free_ptr = 0; @@ -986,7 +986,7 @@ } free_alloca(lcname); - reflection_instanciate(U_CLASS_ENTRY(reflection_extension_ptr), object TSRMLS_CC); + reflection_instanciate(reflection_extension_ptr, object TSRMLS_CC); intern = (reflection_object *) zend_object_store_get_object(object TSRMLS_CC); MAKE_STD_ZVAL(name); ZVAL_STRINGL(name, module->name, name_len, 1); @@ -1010,7 +1010,7 @@ } else { ZVAL_NULL(name); } - reflection_instanciate(U_CLASS_ENTRY(reflection_parameter_ptr), object TSRMLS_CC); + reflection_instanciate(reflection_parameter_ptr, object TSRMLS_CC); intern = (reflection_object *) zend_object_store_get_object(object TSRMLS_CC); reference = (parameter_reference*) emalloc(sizeof(parameter_reference)); reference->arg_info = arg_info; @@ -1033,7 +1033,7 @@ MAKE_STD_ZVAL(name); ZVAL_TEXT(name, function->common.function_name, 1); - reflection_instanciate(U_CLASS_ENTRY(reflection_function_ptr), object TSRMLS_CC); + reflection_instanciate(reflection_function_ptr, object TSRMLS_CC); intern = (reflection_object *) zend_object_store_get_object(object TSRMLS_CC); intern->ptr = function; intern->free_ptr = 0; @@ -1053,7 +1053,7 @@ MAKE_STD_ZVAL(classname); ZVAL_TEXT(name, method->common.function_name, 1); ZVAL_TEXTL(classname, ce->name, ce->name_length, 1); - reflection_instanciate(U_CLASS_ENTRY(reflection_method_ptr), object TSRMLS_CC); + reflection_instanciate(reflection_method_ptr, object TSRMLS_CC); intern = (reflection_object *) zend_object_store_get_object(object TSRMLS_CC); intern->ptr = method; intern->free_ptr = 0; @@ -1091,7 +1091,7 @@ ZVAL_TEXT(name, prop_name, 1); ZVAL_TEXTL(classname, ce->name, ce->name_length, 1); - reflection_instanciate(U_CLASS_ENTRY(reflection_property_ptr), object TSRMLS_CC); + reflection_instanciate(reflection_property_ptr, object TSRMLS_CC); intern = (reflection_object *) zend_object_store_get_object(object TSRMLS_CC); reference = (property_reference*) emalloc(sizeof(property_reference)); reference->ce = ce; @@ -1175,7 +1175,7 @@ params[1] = &output_ptr; ZVAL_STRINGL(&fname, "export", sizeof("export") - 1, 0); - fci.function_table = &U_CLASS_ENTRY(reflection_ptr)->function_table; + fci.function_table = &reflection_ptr->function_table; fci.function_name = &fname; fci.object_pp = NULL; fci.retval_ptr_ptr = &retval_ptr; @@ -1218,7 +1218,7 @@ int result; zend_bool return_output = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|b", &object, U_CLASS_ENTRY(reflector_ptr), &return_output) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|b", &object, reflector_ptr, &return_output) == FAILURE) { return; } @@ -1290,7 +1290,7 @@ Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ ZEND_METHOD(reflection_function, export) { - _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(reflection_function_ptr), 1); + _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, reflection_function_ptr, 1); } /* }}} */ @@ -1320,7 +1320,7 @@ lcname = zend_u_str_case_fold(type, name_str, name_len, 1, &lcname_len); if (zend_u_hash_find(EG(function_table), type, lcname, lcname_len + 1, (void **)&fptr) == FAILURE) { efree(lcname); - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Function %R() does not exist", type, name_str); return; } @@ -1511,7 +1511,7 @@ efree(params); if (result == FAILURE) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Invocation of function %v() failed", fptr->common.function_name); return; } @@ -1575,7 +1575,7 @@ efree(params); if (result == FAILURE) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Invocation of function %v() failed", fptr->common.function_name); return; } @@ -1707,7 +1707,7 @@ Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ ZEND_METHOD(reflection_parameter, export) { - _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(reflection_parameter_ptr), 2); + _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, reflection_parameter_ptr, 2); } /* }}} */ @@ -1746,7 +1746,7 @@ lcname = zend_u_str_case_fold(Z_TYPE_P(reference), Z_UNIVAL_P(reference), Z_UNILEN_P(reference), 1, &lcname_len); if (zend_u_hash_find(EG(function_table), Z_TYPE_P(reference), lcname, lcname_len + 1, (void**) &fptr) == FAILURE) { efree(lcname); - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Function %R() does not exist", Z_TYPE_P(reference), Z_UNIVAL_P(reference)); return; } @@ -1772,7 +1772,7 @@ } else { convert_to_text_ex(classref); if (zend_u_lookup_class(Z_TYPE_PP(classref), Z_UNIVAL_PP(classref), Z_UNILEN_PP(classref), &pce TSRMLS_CC) == FAILURE) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Class %R does not exist", Z_TYPE_PP(classref), Z_UNIVAL_PP(classref)); return; } @@ -1783,7 +1783,7 @@ lcname = zend_u_str_case_fold(Z_TYPE_PP(method), Z_UNIVAL_PP(method), Z_UNILEN_PP(method), 1, &lcname_len); if (zend_u_hash_find(&ce->function_table, Z_TYPE_PP(method), lcname, lcname_len + 1, (void **) &fptr) == FAILURE) { efree(lcname); - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Method %R::%R() does not exist", Z_TYPE_PP(classref), Z_UNIVAL_PP(classref), Z_TYPE_PP(method), Z_UNIVAL_PP(method)); return; } @@ -1881,7 +1881,7 @@ zend_class_entry **pce; if (zend_u_lookup_class_ex(UG(unicode)?IS_UNICODE:IS_STRING, param->arg_info->class_name, param->arg_info->class_name_len, 1, &pce TSRMLS_CC) == FAILURE) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Class %v does not exist", param->arg_info->class_name); return; } @@ -1986,16 +1986,16 @@ if (param->fptr->type != ZEND_USER_FUNCTION) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, "Cannot determine default value for internal functions"); + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Cannot determine default value for internal functions"); return; } if (param->offset < param->required) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, "Parameter is not optional"); + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Parameter is not optional"); return; } precv = _get_recv_op((zend_op_array*)param->fptr, param->offset); if (!precv || precv->opcode != ZEND_RECV_INIT || precv->op2.op_type == IS_UNUSED) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, "Internal error"); + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Internal error"); return; } @@ -2010,7 +2010,7 @@ Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ ZEND_METHOD(reflection_method, export) { - _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(reflection_method_ptr), 2); + _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, reflection_method_ptr, 2); } /* }}} */ @@ -2057,7 +2057,7 @@ case IS_STRING: case IS_UNICODE: if (zend_u_lookup_class(Z_TYPE_P(classname), Z_UNIVAL_P(classname), Z_UNILEN_P(classname), &pce TSRMLS_CC) == FAILURE) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Class %v does not exist", Z_UNIVAL_P(classname)); return; } @@ -2086,7 +2086,7 @@ if (zend_u_hash_find(&ce->function_table, type, lcname, lcname_len + 1, (void **) &mptr) == FAILURE) { efree(lcname); - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Method %v::%R() does not exist", ce->name, type, name_str); return; } @@ -2144,11 +2144,11 @@ if (!(mptr->common.fn_flags & ZEND_ACC_PUBLIC) || (mptr->common.fn_flags & ZEND_ACC_ABSTRACT)) { if (mptr->common.fn_flags & ZEND_ACC_ABSTRACT) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Trying to invoke abstract method %v::%v()", mptr->common.scope->name, mptr->common.function_name); } else { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Trying to invoke %s method %v::%v() from scope %v", mptr->common.fn_flags & ZEND_ACC_PROTECTED ? "protected" : "private", mptr->common.scope->name, mptr->common.function_name, @@ -2209,7 +2209,7 @@ efree(params); if (result == FAILURE) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Invocation of method %v::%v() failed", mptr->common.scope->name, mptr->common.function_name); return; } @@ -2247,11 +2247,11 @@ if (!(mptr->common.fn_flags & ZEND_ACC_PUBLIC) || (mptr->common.fn_flags & ZEND_ACC_ABSTRACT)) { if (mptr->common.fn_flags & ZEND_ACC_ABSTRACT) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Trying to invoke abstract method %v::%v", mptr->common.scope->name, mptr->common.function_name); } else { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Trying to invoke %s method %v::%v from scope %v", mptr->common.fn_flags & ZEND_ACC_PROTECTED ? "protected" : "private", mptr->common.scope->name, mptr->common.function_name, @@ -2278,7 +2278,7 @@ } else { if (!object) { efree(params); - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Trying to invoke non static method %v::%v without an object", mptr->common.scope->name, mptr->common.function_name); return; @@ -2313,7 +2313,7 @@ efree(params); if (result == FAILURE) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Invocation of method %v::%v() failed", mptr->common.scope->name, mptr->common.function_name); return; } @@ -2440,7 +2440,7 @@ GET_REFLECTION_OBJECT_PTR(mptr); if (!mptr->common.prototype) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Method %v::%v does not have a prototype", intern->ce->name, mptr->common.function_name); return; } @@ -2453,7 +2453,7 @@ Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ ZEND_METHOD(reflection_class, export) { - _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(reflection_class_ptr), 1); + _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, reflection_class_ptr, 1); } /* }}} */ @@ -2495,7 +2495,7 @@ convert_to_string_ex(&argument); if (zend_u_lookup_class(Z_TYPE_P(argument), Z_UNIVAL_P(argument), Z_UNILEN_P(argument), &ce TSRMLS_CC) == FAILURE) { if (!EG(exception)) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), -1 TSRMLS_CC, "Class %R does not exist", Z_TYPE_P(argument), Z_UNIVAL_P(argument)); + zend_throw_exception_ex(reflection_exception_ptr, -1 TSRMLS_CC, "Class %R does not exist", Z_TYPE_P(argument), Z_UNIVAL_P(argument)); } return; } @@ -2559,7 +2559,7 @@ if (def_value) { RETURN_ZVAL(def_value, 1, 0); } else { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Class %v does not have a property named %R", ce->name, name_type, name); } return; @@ -2591,7 +2591,7 @@ zend_update_class_constants(ce TSRMLS_CC); variable_ptr = zend_std_get_static_property(ce, name_type, name, name_len, 1 TSRMLS_CC); if (!variable_ptr) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Class %v does not have a property named %R", ce->name, name_type, name); return; } @@ -2837,7 +2837,7 @@ efree(lc_name); } else { efree(lc_name); - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Method %R does not exist", type, name); return; } @@ -2952,7 +2952,7 @@ if (zend_u_lookup_class(name_type, classname, classname_len, &pce TSRMLS_CC) == FAILURE) { if (!EG(exception)) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), -1 TSRMLS_CC, "Class %R does not exist", name_type, classname); + zend_throw_exception_ex(reflection_exception_ptr, -1 TSRMLS_CC, "Class %R does not exist", name_type, classname); } efree(classname); return; @@ -2960,7 +2960,7 @@ efree(classname); if (!instanceof_function(ce, *pce TSRMLS_CC)) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), -1 TSRMLS_CC, "Fully qualified property name %v::%R does not specify a base class of %v", (*pce)->name, name_type, name, ce->name); + zend_throw_exception_ex(reflection_exception_ptr, -1 TSRMLS_CC, "Fully qualified property name %v::%R does not specify a base class of %v", (*pce)->name, name_type, name, ce->name); return; } ce = *pce; @@ -2970,7 +2970,7 @@ return; } } - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Property %R does not exist", name_type, name); } /* }}} */ @@ -3196,7 +3196,7 @@ zend_fcall_info_cache fcc; if (!(ce->constructor->common.fn_flags & ZEND_ACC_PUBLIC)) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, "Access to non-public constructor of class %v", ce->name); + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Access to non-public constructor of class %v", ce->name); return; } @@ -3236,7 +3236,7 @@ } else if (!ZEND_NUM_ARGS()) { object_init_ex(return_value, ce); } else { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, "Class %v does not have a constructor, so you cannot pass any constructor arguments", ce->name); + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Class %v does not have a constructor, so you cannot pass any constructor arguments", ce->name); } } /* }}} */ @@ -3267,7 +3267,7 @@ zend_fcall_info_cache fcc; if (!(ce->constructor->common.fn_flags & ZEND_ACC_PUBLIC)) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, "Access to non-public constructor of class %v", ce->name); + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Access to non-public constructor of class %v", ce->name); return; } @@ -3305,7 +3305,7 @@ } else if (!ZEND_NUM_ARGS()) { object_init_ex(return_value, ce); } else { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, "Class %v does not have a constructor, so you cannot pass any constructor arguments", ce->name); + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Class %v does not have a constructor, so you cannot pass any constructor arguments", ce->name); } } /* }}} */ @@ -3373,14 +3373,14 @@ case IS_STRING: case IS_UNICODE: if (zend_u_lookup_class(Z_TYPE_P(class_name), Z_UNIVAL_P(class_name), Z_UNILEN_P(class_name), &pce TSRMLS_CC) == FAILURE) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Interface %R does not exist", Z_TYPE_P(class_name), Z_UNIVAL_P(class_name)); return; } class_ce = *pce; break; case IS_OBJECT: - if (instanceof_function(Z_OBJCE_P(class_name), U_CLASS_ENTRY(reflection_class_ptr) TSRMLS_CC)) { + if (instanceof_function(Z_OBJCE_P(class_name), reflection_class_ptr TSRMLS_CC)) { argument = (reflection_object *) zend_object_store_get_object(class_name TSRMLS_CC); if (argument == NULL || argument->ptr == NULL) { zend_error(E_ERROR, "Internal error: Failed to retrieve the argument's reflection object"); @@ -3391,7 +3391,7 @@ } /* no break */ default: - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Parameter one must either be a string or a ReflectionClass object"); return; } @@ -3420,14 +3420,14 @@ case IS_STRING: case IS_UNICODE: if (zend_u_lookup_class(Z_TYPE_P(interface), Z_UNIVAL_P(interface), Z_UNILEN_P(interface), &pce TSRMLS_CC) == FAILURE) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Interface %R does not exist", Z_TYPE_P(interface), Z_UNIVAL_P(interface)); return; } interface_ce = *pce; break; case IS_OBJECT: - if (instanceof_function(Z_OBJCE_P(interface), U_CLASS_ENTRY(reflection_class_ptr) TSRMLS_CC)) { + if (instanceof_function(Z_OBJCE_P(interface), reflection_class_ptr TSRMLS_CC)) { argument = (reflection_object *) zend_object_store_get_object(interface TSRMLS_CC); if (argument == NULL || argument->ptr == NULL) { zend_error(E_ERROR, "Internal error: Failed to retrieve the argument's reflection object"); @@ -3438,13 +3438,13 @@ } /* no break */ default: - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Parameter one must either be a string or a ReflectionClass object"); return; } if (!(interface_ce->ce_flags & ZEND_ACC_INTERFACE)) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Interface %v is a Class", interface_ce->name); return; } @@ -3504,7 +3504,7 @@ Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ ZEND_METHOD(reflection_object, export) { - _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(reflection_object_ptr), 1); + _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, reflection_object_ptr, 1); } /* }}} */ @@ -3520,7 +3520,7 @@ Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ ZEND_METHOD(reflection_property, export) { - _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(reflection_property_ptr), 2); + _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, reflection_property_ptr, 2); } /* }}} */ @@ -3554,7 +3554,7 @@ case IS_STRING: case IS_UNICODE: if (zend_u_lookup_class(Z_TYPE_P(classname), Z_UNIVAL_P(classname), Z_UNILEN_P(classname), &pce TSRMLS_CC) == FAILURE) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Class %R does not exist", Z_TYPE_P(classname), Z_UNIVAL_P(classname)); return; } @@ -3571,7 +3571,7 @@ } if (zend_u_hash_find(&ce->properties_info, name_type, name_str, name_len + 1, (void **) &property_info) == FAILURE || (property_info->flags & ZEND_ACC_SHADOW)) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Property %v::$%R does not exist", ce->name, name_type, name_str); return; } @@ -3839,7 +3839,7 @@ Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ ZEND_METHOD(reflection_extension, export) { - _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(reflection_extension_ptr), 1); + _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, reflection_extension_ptr, 1); } /* }}} */ @@ -3868,7 +3868,7 @@ zend_str_tolower_copy(lcname, name_str, name_len); if (zend_hash_find(&module_registry, lcname, name_len + 1, (void **)&module) == FAILURE) { free_alloca(lcname); - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Extension %s does not exist", name_str); return; } @@ -4248,7 +4248,7 @@ && (ZEND_U_EQUAL(Z_TYPE_P(member), Z_UNIVAL_P(member), Z_UNILEN_P(member), "name", sizeof("name")-1) || ZEND_U_EQUAL(Z_TYPE_P(member), Z_UNIVAL_P(member), Z_UNILEN_P(member), "class", sizeof("class")-1))) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Cannot set read-only property %v::$%R", Z_OBJCE_P(object)->name, Z_TYPE_P(member), Z_UNIVAL_P(member)); } else @@ -4342,7 +4342,7 @@ php_info_print_table_start(); php_info_print_table_header(2, "Reflection", "enabled"); - php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 1.203 2006/02/08 00:37:31 iliaa Exp $"); + php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 1.204 2006/02/13 10:23:57 dmitry Exp $"); php_info_print_table_end(); } /* }}} */ http://cvs.php.net/viewcvs.cgi/php-src/ext/session/tests/015.phpt?r1=1.5&r2=1.6&diff_format=u Index: php-src/ext/session/tests/015.phpt diff -u php-src/ext/session/tests/015.phpt:1.5 php-src/ext/session/tests/015.phpt:1.6 --- php-src/ext/session/tests/015.phpt:1.5 Mon Jul 4 13:09:14 2005 +++ php-src/ext/session/tests/015.phpt Mon Feb 13 10:23:57 2006 @@ -6,7 +6,7 @@ session.use_trans_sid=1 session.use_cookies=0 session.cache_limiter= -arg_separator.output=& +arg_separator.output="&" session.name=PHPSESSID session.serialize_handler=php session.save_handler=files http://cvs.php.net/viewcvs.cgi/php-src/ext/session/tests/020.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/session/tests/020.phpt diff -u php-src/ext/session/tests/020.phpt:1.4 php-src/ext/session/tests/020.phpt:1.5 --- php-src/ext/session/tests/020.phpt:1.4 Mon Jul 4 13:09:14 2005 +++ php-src/ext/session/tests/020.phpt Mon Feb 13 10:23:57 2006 @@ -6,7 +6,7 @@ session.use_cookies=0 session.cache_limiter= session.use_trans_sid=1 -arg_separator.output=& +arg_separator.output="&" session.name=PHPSESSID session.serialize_handler=php session.save_handler=files http://cvs.php.net/viewcvs.cgi/php-src/ext/simplexml/simplexml.c?r1=1.185&r2=1.186&diff_format=u Index: php-src/ext/simplexml/simplexml.c diff -u php-src/ext/simplexml/simplexml.c:1.185 php-src/ext/simplexml/simplexml.c:1.186 --- php-src/ext/simplexml/simplexml.c:1.185 Mon Feb 6 10:54:49 2006 +++ php-src/ext/simplexml/simplexml.c Mon Feb 13 10:23:57 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: simplexml.c,v 1.185 2006/02/06 10:54:49 tony2001 Exp $ */ +/* $Id: simplexml.c,v 1.186 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -44,7 +44,7 @@ ZEND_API zend_class_entry *sxe_get_element_class_entry(TSRMLS_D) { - return U_CLASS_ENTRY(sxe_class_entry); + return sxe_class_entry; } #define SXE_ME(func, arg_info, flags) PHP_ME(simplexml_element, func, arg_info, flags) @@ -1585,7 +1585,7 @@ char *classname = ""; int classname_len = 0; long options = 0; - zend_class_entry *ce= U_CLASS_ENTRY(sxe_class_entry); + zend_class_entry *ce= sxe_class_entry; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|sl", &filename, &filename_len, &classname, &classname_len, &options) == FAILURE) { return; @@ -1629,7 +1629,7 @@ char *classname = ""; int classname_len = 0; long options = 0; - zend_class_entry *ce= U_CLASS_ENTRY(sxe_class_entry); + zend_class_entry *ce= sxe_class_entry; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|sl", &data, &data_len, &classname, &classname_len, &options) == FAILURE) { return; @@ -1896,7 +1896,7 @@ xmlNodePtr nodep = NULL; char *classname = ""; int classname_len = 0; - zend_class_entry *ce= U_CLASS_ENTRY(sxe_class_entry); + zend_class_entry *ce= sxe_class_entry; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o|s", &node, &classname, &classname_len) == FAILURE) { return; @@ -2032,7 +2032,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, "Simplexml support", "enabled"); - php_info_print_table_row(2, "Revision", "$Revision: 1.185 $"); + php_info_print_table_row(2, "Revision", "$Revision: 1.186 $"); php_info_print_table_row(2, "Schema support", #ifdef LIBXML_SCHEMAS_ENABLED "enabled"); http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/php_spl.c?r1=1.84&r2=1.85&diff_format=u Index: php-src/ext/spl/php_spl.c diff -u php-src/ext/spl/php_spl.c:1.84 php-src/ext/spl/php_spl.c:1.85 --- php-src/ext/spl/php_spl.c:1.84 Sun Feb 12 16:43:30 2006 +++ php-src/ext/spl/php_spl.c Mon Feb 13 10:23:57 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_spl.c,v 1.84 2006/02/12 16:43:30 helly Exp $ */ +/* $Id: php_spl.c,v 1.85 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -145,7 +145,7 @@ /* }}} */ #define SPL_ADD_CLASS(class_name, z_list, sub, allow, ce_flags) \ - spl_add_classes(U_CLASS_ENTRY(spl_ce_ ## class_name), z_list, sub, allow, ce_flags TSRMLS_CC) + spl_add_classes(spl_ce_ ## class_name, z_list, sub, allow, ce_flags TSRMLS_CC) #define SPL_LIST_CLASSES(z_list, sub, allow, ce_flags) \ SPL_ADD_CLASS(AppendIterator, z_list, sub, allow, ce_flags); \ @@ -298,7 +298,7 @@ EG(function_state_ptr) = original_function_state_ptr; if (!found) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_LogicException), 0 TSRMLS_CC, "Class %s could not be loaded", class_name); + zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Class %s could not be loaded", class_name); } } /* }}} */ @@ -420,25 +420,25 @@ if (Z_TYPE_P(zcallable) == IS_ARRAY) { if (!obj_ptr && alfi.func_ptr && !(alfi.func_ptr->common.fn_flags & ZEND_ACC_STATIC)) { if (do_throw) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_LogicException), 0 TSRMLS_CC, "Passed array specifies a non static method but no object"); + zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Passed array specifies a non static method but no object"); } zval_dtor(&zfunc_name); return; } else if (do_throw) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_LogicException), 0 TSRMLS_CC, "Passed array does not specify %s %smethod", alfi.func_ptr ? "a callable" : "an existing", !obj_ptr ? "static " : ""); + zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Passed array does not specify %s %smethod", alfi.func_ptr ? "a callable" : "an existing", !obj_ptr ? "static " : ""); } zval_dtor(&zfunc_name); return; } else if (Z_TYPE_P(zcallable) == IS_STRING || Z_TYPE_P(zcallable) == IS_UNICODE) { if (do_throw) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_LogicException), 0 TSRMLS_CC, "Function '%R' not %s", Z_TYPE_P(zcallable), Z_UNIVAL_P(zcallable), alfi.func_ptr ? "callable" : "found"); + zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Function '%R' not %s", Z_TYPE_P(zcallable), Z_UNIVAL_P(zcallable), alfi.func_ptr ? "callable" : "found"); } zval_dtor(&zfunc_name); return; } else { if (do_throw) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_LogicException), 0 TSRMLS_CC, "Illegal value passed"); + zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Illegal value passed"); } zval_dtor(&zfunc_name); return; http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_array.c?r1=1.97&r2=1.98&diff_format=u Index: php-src/ext/spl/spl_array.c diff -u php-src/ext/spl/spl_array.c:1.97 php-src/ext/spl/spl_array.c:1.98 --- php-src/ext/spl/spl_array.c:1.97 Sun Feb 12 16:43:30 2006 +++ php-src/ext/spl/spl_array.c Mon Feb 13 10:23:57 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_array.c,v 1.97 2006/02/12 16:43:30 helly Exp $ */ +/* $Id: spl_array.c,v 1.98 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -156,11 +156,11 @@ retval.handle = zend_objects_store_put(intern, (zend_objects_store_dtor_t)zend_objects_destroy_object, (zend_objects_free_object_storage_t) spl_array_object_free_storage, NULL TSRMLS_CC); while (parent) { - if (parent == U_CLASS_ENTRY(spl_ce_ArrayIterator) || parent == U_CLASS_ENTRY(spl_ce_RecursiveArrayIterator)) { + if (parent == spl_ce_ArrayIterator || parent == spl_ce_RecursiveArrayIterator) { retval.handlers = &spl_handler_ArrayIterator; class_type->get_iterator = spl_array_get_iterator; break; - } else if (parent == U_CLASS_ENTRY(spl_ce_ArrayObject)) { + } else if (parent == spl_ce_ArrayObject) { retval.handlers = &spl_handler_ArrayObject; break; } @@ -207,7 +207,7 @@ } } - intern->ce_get_iterator = U_CLASS_ENTRY(spl_ce_ArrayIterator); + intern->ce_get_iterator = spl_ce_ArrayIterator; zend_hash_internal_pointer_reset_ex(spl_array_get_hash_table(intern, 0 TSRMLS_CC), &intern->pos); return retval; } @@ -332,7 +332,7 @@ case IS_STRING: case IS_UNICODE: if (*(char*)Z_UNIVAL_P(offset) == '\0') { - zend_throw_exception(U_CLASS_ENTRY(spl_ce_InvalidArgumentException), "An offset must not begin with \\0 or be empty", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_InvalidArgumentException, "An offset must not begin with \\0 or be empty", 0 TSRMLS_CC); return; } value->refcount++; @@ -845,7 +845,7 @@ if (ZEND_NUM_ARGS() == 0) { return; /* nothing to do */ } - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(spl_ce_InvalidArgumentException) TSRMLS_CC); + php_set_error_handling(EH_THROW, spl_ce_InvalidArgumentException TSRMLS_CC); intern = (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC); @@ -856,7 +856,7 @@ if (ZEND_NUM_ARGS() > 2) { if (zend_lookup_class(class_name, class_name_len, &pce_get_iterator TSRMLS_CC) == FAILURE) { - zend_throw_exception(U_CLASS_ENTRY(spl_ce_InvalidArgumentException), "A class that implements Iterator must be specified", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_InvalidArgumentException, "A class that implements Iterator must be specified", 0 TSRMLS_CC); php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); return; } @@ -877,7 +877,7 @@ } else { if (Z_TYPE_P(array) != IS_OBJECT && Z_TYPE_P(array) != IS_ARRAY) { php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); - zend_throw_exception(U_CLASS_ENTRY(spl_ce_InvalidArgumentException), "Passed variable is not an array or object, using empty array instead", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_InvalidArgumentException, "Passed variable is not an array or object, using empty array instead", 0 TSRMLS_CC); return; } zval_ptr_dtor(&intern->array); @@ -895,7 +895,7 @@ if ((handler != std_object_handlers.get_properties && handler != spl_array_get_properties) || !spl_array_get_hash_table(intern, 0 TSRMLS_CC)) { php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_InvalidArgumentException), 0 TSRMLS_CC, "Overloaded object of type %s is not compatible with %s", Z_OBJCE_P(array)->name, intern->std.ce->name); + zend_throw_exception_ex(spl_ce_InvalidArgumentException, 0 TSRMLS_CC, "Overloaded object of type %s is not compatible with %s", Z_OBJCE_P(array)->name, intern->std.ce->name); return; } } @@ -922,7 +922,7 @@ } if (zend_lookup_class(class_name, class_name_len, &pce_get_iterator TSRMLS_CC) == FAILURE) { - zend_throw_exception(U_CLASS_ENTRY(spl_ce_InvalidArgumentException), "A class that implements Iterator must be specified", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_InvalidArgumentException, "A class that implements Iterator must be specified", 0 TSRMLS_CC); php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); return; } @@ -992,7 +992,7 @@ intern->array = other->array; } else { if (Z_TYPE_PP(array) != IS_OBJECT && !HASH_OF(*array)) { - zend_throw_exception(U_CLASS_ENTRY(spl_ce_InvalidArgumentException), "Passed variable is not an array or object, using empty array instead", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_InvalidArgumentException, "Passed variable is not an array or object, using empty array instead", 0 TSRMLS_CC); return; } zval_ptr_dtor(&intern->array); @@ -1072,7 +1072,7 @@ return; /* ok */ } } - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_OutOfBoundsException), 0 TSRMLS_CC, "Seek position %ld is out of range", opos); + zend_throw_exception_ex(spl_ce_OutOfBoundsException, 0 TSRMLS_CC, "Seek position %ld is out of range", opos); } /* }}} */ int spl_array_object_count_elements(zval *object, long *count TSRMLS_DC) /* {{{ */ @@ -1127,7 +1127,7 @@ if (use_arg) { if (ZEND_NUM_ARGS() != 1 || zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "z", &arg) == FAILURE) { - zend_throw_exception(U_CLASS_ENTRY(spl_ce_BadMethodCallException), "Function expects exactly one argument", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_BadMethodCallException, "Function expects exactly one argument", 0 TSRMLS_CC); return; } zend_call_method(NULL, NULL, NULL, fname, fname_len, &return_value, 2, &tmp, arg TSRMLS_CC); http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_directory.c?r1=1.74&r2=1.75&diff_format=u Index: php-src/ext/spl/spl_directory.c diff -u php-src/ext/spl/spl_directory.c:1.74 php-src/ext/spl/spl_directory.c:1.75 --- php-src/ext/spl/spl_directory.c:1.74 Fri Feb 10 16:56:56 2006 +++ php-src/ext/spl/spl_directory.c Mon Feb 13 10:23:57 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_directory.c,v 1.74 2006/02/10 16:56:56 tony2001 Exp $ */ +/* $Id: spl_directory.c,v 1.75 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -131,8 +131,8 @@ memset(intern, 0, sizeof(spl_filesystem_object)); intern->std.ce = class_type; /* intern->type = SPL_FS_INFO; done by set o */ - intern->file_class = U_CLASS_ENTRY(spl_ce_SplFileObject); - intern->info_class = U_CLASS_ENTRY(spl_ce_SplFileInfo); + intern->file_class = spl_ce_SplFileObject; + intern->info_class = spl_ce_SplFileInfo; if (obj) *obj = intern; ALLOC_HASHTABLE(intern->std.properties); @@ -206,7 +206,7 @@ if (intern->u.file.stream == NULL) { if (!EG(exception)) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_RuntimeException), 0 TSRMLS_CC, "Cannot open file %s", intern->file_name); + zend_throw_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Cannot open file %s", intern->file_name); } intern->file_name = NULL; /* until here it is not a copy */ intern->u.file.open_mode = NULL; @@ -301,7 +301,7 @@ spl_filesystem_object *intern; if (!file_path || !file_path_len) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_RuntimeException), 0 TSRMLS_CC, "Cannot create SplFileInfo for empty path"); + zend_throw_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Cannot create SplFileInfo for empty path"); if (file_path && !use_copy) { efree(file_path); @@ -309,7 +309,7 @@ return NULL; } - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(spl_ce_RuntimeException) TSRMLS_CC); + php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC); return_value->value.obj = spl_filesystem_object_new_ex(ce ? ce : source->info_class, &intern TSRMLS_CC); Z_TYPE_P(return_value) = IS_OBJECT; @@ -326,7 +326,7 @@ spl_filesystem_object *intern; zend_bool use_include_path = 0; - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(spl_ce_RuntimeException) TSRMLS_CC); + php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC); switch (source->type) { case SPL_FS_INFO: @@ -334,7 +334,7 @@ break; case SPL_FS_DIR: if (!source->u.dir.entry.d_name[0]) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_RuntimeException), 0 TSRMLS_CC, "Could not open file"); + zend_throw_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Could not open file"); php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); return NULL; } @@ -381,7 +381,7 @@ break; case SPL_FS_DIR: php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_RuntimeException), 0 TSRMLS_CC, "Operation not supported"); + zend_throw_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Operation not supported"); return NULL; } php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); @@ -396,7 +396,7 @@ char *path; int len; - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(spl_ce_RuntimeException) TSRMLS_CC); + php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &path, &len) == FAILURE) { php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); @@ -411,7 +411,7 @@ intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); spl_filesystem_dir_open(intern, path TSRMLS_CC); - intern->u.dir.is_recursive = instanceof_function(intern->std.ce, U_CLASS_ENTRY(spl_ce_RecursiveDirectoryIterator) TSRMLS_CC) ? 1 : 0; + intern->u.dir.is_recursive = instanceof_function(intern->std.ce, spl_ce_RecursiveDirectoryIterator TSRMLS_CC) ? 1 : 0; intern->flags = 0; php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); @@ -596,7 +596,7 @@ char *path; int len; - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(spl_ce_RuntimeException) TSRMLS_CC); + php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &path, &len) == FAILURE) { php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); @@ -714,7 +714,7 @@ SPL_METHOD(SplFileInfo, setFileClass) { spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - zend_class_entry *ce = U_CLASS_ENTRY(spl_ce_SplFileObject); + zend_class_entry *ce = spl_ce_SplFileObject; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|C", &ce) == FAILURE) { return; @@ -729,7 +729,7 @@ SPL_METHOD(SplFileInfo, setInfoClass) { spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - zend_class_entry *ce = U_CLASS_ENTRY(spl_ce_SplFileInfo); + zend_class_entry *ce = spl_ce_SplFileInfo; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|C", &ce) == FAILURE) { return; @@ -778,7 +778,7 @@ int len; long flags = SPL_FILE_DIR_CURRENT_AS_FILEINFO; - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(spl_ce_RuntimeException) TSRMLS_CC); + php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &path, &len, &flags) == FAILURE) { php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); @@ -787,7 +787,7 @@ intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); spl_filesystem_dir_open(intern, path TSRMLS_CC); - intern->u.dir.is_recursive = instanceof_function(intern->std.ce, U_CLASS_ENTRY(spl_ce_RecursiveDirectoryIterator) TSRMLS_CC) ? 1 : 0; + intern->u.dir.is_recursive = instanceof_function(intern->std.ce, spl_ce_RecursiveDirectoryIterator TSRMLS_CC) ? 1 : 0; intern->flags = flags; php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); @@ -869,7 +869,7 @@ INIT_PZVAL(&zpath); ZVAL_STRINGL(&zpath, intern->file_name, intern->file_name_len, 0); - spl_instantiate_arg_ex1(U_CLASS_ENTRY(spl_ce_RecursiveDirectoryIterator), &return_value, 0, &zpath TSRMLS_CC); + spl_instantiate_arg_ex1(spl_ce_RecursiveDirectoryIterator, &return_value, 0, &zpath TSRMLS_CC); subdir = (spl_filesystem_object*)zend_object_store_get_object(return_value TSRMLS_CC); if (subdir) { @@ -1317,7 +1317,7 @@ if (php_stream_eof(intern->u.file.stream)) { if (!silent) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_RuntimeException), 0 TSRMLS_CC, "Cannot read from file %s", intern->file_name); + zend_throw_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Cannot read from file %s", intern->file_name); } return FAILURE; } @@ -1351,10 +1351,10 @@ zval *retval; /* if overloaded call the function, otherwise do it directly */ - if (intern->u.file.func_getCurr->common.scope != U_CLASS_ENTRY(spl_ce_SplFileObject)) { + if (intern->u.file.func_getCurr->common.scope != spl_ce_SplFileObject) { if (php_stream_eof(intern->u.file.stream)) { if (!silent) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_RuntimeException), 0 TSRMLS_CC, "Cannot read from file %s", intern->file_name); + zend_throw_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Cannot read from file %s", intern->file_name); } return FAILURE; } @@ -1384,7 +1384,7 @@ static void spl_filesystem_file_rewind(spl_filesystem_object *intern TSRMLS_DC) /* {{{ */ { if (-1 == php_stream_rewind(intern->u.file.stream)) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_RuntimeException), 0 TSRMLS_CC, "Cannot rewind file %s", intern->file_name); + zend_throw_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Cannot rewind file %s", intern->file_name); } else { spl_filesystem_file_free_line(intern TSRMLS_CC); intern->u.file.current_line_num = 0; @@ -1399,7 +1399,7 @@ zend_bool use_include_path = 0; char *p1, *p2; - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(spl_ce_RuntimeException) TSRMLS_CC); + php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC); intern->u.file.open_mode = "r"; intern->u.file.open_mode_len = 1; @@ -1438,7 +1438,7 @@ char tmp_fname[48]; spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(spl_ce_RuntimeException) TSRMLS_CC); + php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &max_memory) == FAILURE) { php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); @@ -1586,7 +1586,7 @@ } if (max_len < 0) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_DomainException), 0 TSRMLS_CC, "Maximum line length must be greater than or equal zero"); + zend_throw_exception_ex(spl_ce_DomainException, 0 TSRMLS_CC, "Maximum line length must be greater than or equal zero"); return; } @@ -1850,7 +1850,7 @@ } if (!php_stream_truncate_supported(intern->u.file.stream)) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_LogicException), 0 TSRMLS_CC, "Can't truncate file %s", intern->file_name); + zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Can't truncate file %s", intern->file_name); RETURN_FALSE; } @@ -1868,7 +1868,7 @@ return; } if (line_pos < 0) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_LogicException), 0 TSRMLS_CC, "Can't seek file %s to negative line %ld", intern->file_name, line_pos); + zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Can't seek file %s to negative line %ld", intern->file_name, line_pos); RETURN_FALSE; } http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_iterators.c?r1=1.113&r2=1.114&diff_format=u Index: php-src/ext/spl/spl_iterators.c diff -u php-src/ext/spl/spl_iterators.c:1.113 php-src/ext/spl/spl_iterators.c:1.114 --- php-src/ext/spl/spl_iterators.c:1.113 Mon Feb 6 11:28:20 2006 +++ php-src/ext/spl/spl_iterators.c Mon Feb 13 10:23:58 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_iterators.c,v 1.113 2006/02/06 11:28:20 tony2001 Exp $ */ +/* $Id: spl_iterators.c,v 1.114 2006/02/13 10:23:58 dmitry Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -265,11 +265,11 @@ } ce = child && Z_TYPE_P(child) == IS_OBJECT ? Z_OBJCE_P(child) : NULL; - if (!ce || !instanceof_function(ce, U_CLASS_ENTRY(spl_ce_RecursiveIterator) TSRMLS_CC)) { + if (!ce || !instanceof_function(ce, spl_ce_RecursiveIterator TSRMLS_CC)) { if (child) { zval_ptr_dtor(&child); } - zend_throw_exception(U_CLASS_ENTRY(spl_ce_UnexpectedValueException), "Objects returned by RecursiveIterator::getChildren() must implement RecursiveIterator", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_UnexpectedValueException, "Objects returned by RecursiveIterator::getChildren() must implement RecursiveIterator", 0 TSRMLS_CC); return; } if (object->mode == RIT_CHILD_FIRST) { @@ -313,7 +313,7 @@ sub_iter = object->iterators[object->level].iterator; sub_iter->funcs->dtor(sub_iter TSRMLS_CC); zval_ptr_dtor(&object->iterators[object->level--].zobject); - if (!object->endChildren || object->endChildren->common.scope != U_CLASS_ENTRY(spl_ce_RecursiveIteratorIterator)) { + if (!object->endChildren || object->endChildren->common.scope != spl_ce_RecursiveIteratorIterator) { zend_call_method_with_0_params(&zthis, object->ce, &object->endChildren, "endchildren", NULL); } } @@ -378,10 +378,10 @@ long mode = RIT_LEAVES_ONLY, flags = 0; int inc_refcount = 1; - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(spl_ce_InvalidArgumentException) TSRMLS_CC); + php_set_error_handling(EH_THROW, spl_ce_InvalidArgumentException TSRMLS_CC); if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "o|ll", &iterator, &mode, &flags) == SUCCESS) { - if (instanceof_function(Z_OBJCE_P(iterator), U_CLASS_ENTRY(zend_ce_aggregate) TSRMLS_CC)) { + if (instanceof_function(Z_OBJCE_P(iterator), zend_ce_aggregate TSRMLS_CC)) { zval *aggregate = iterator; zend_call_method_with_0_params(&aggregate, Z_OBJCE_P(aggregate), &Z_OBJCE_P(aggregate)->iterator_funcs.zf_new_iterator, "getiterator", &iterator); inc_refcount = 0; @@ -389,12 +389,12 @@ } else { iterator = NULL; } - if (!iterator || !instanceof_function(Z_OBJCE_P(iterator), U_CLASS_ENTRY(spl_ce_RecursiveIterator) TSRMLS_CC)) { + if (!iterator || !instanceof_function(Z_OBJCE_P(iterator), spl_ce_RecursiveIterator TSRMLS_CC)) { if (iterator && !inc_refcount) { zval_ptr_dtor(&iterator); } php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); - zend_throw_exception(U_CLASS_ENTRY(spl_ce_InvalidArgumentException), "An instance of RecursiveIterator or IteratorAggregate creating it is required", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_InvalidArgumentException, "An instance of RecursiveIterator or IteratorAggregate creating it is required", 0 TSRMLS_CC); return; } @@ -408,31 +408,31 @@ intern->ce = Z_OBJCE_P(object); zend_hash_find(&intern->ce->function_table, "beginiteration", sizeof("beginiteration"), (void **) &intern->beginIteration); - if (intern->beginIteration->common.scope == U_CLASS_ENTRY(spl_ce_RecursiveIteratorIterator)) { + if (intern->beginIteration->common.scope == spl_ce_RecursiveIteratorIterator) { intern->beginIteration = NULL; } zend_hash_find(&intern->ce->function_table, "enditeration", sizeof("enditeration"), (void **) &intern->endIteration); - if (intern->endIteration->common.scope == U_CLASS_ENTRY(spl_ce_RecursiveIteratorIterator)) { + if (intern->endIteration->common.scope == spl_ce_RecursiveIteratorIterator) { intern->endIteration = NULL; } zend_hash_find(&intern->ce->function_table, "callhaschildren", sizeof("callHasChildren"), (void **) &intern->callHasChildren); - if (intern->callHasChildren->common.scope == U_CLASS_ENTRY(spl_ce_RecursiveIteratorIterator)) { + if (intern->callHasChildren->common.scope == spl_ce_RecursiveIteratorIterator) { intern->callHasChildren = NULL; } zend_hash_find(&intern->ce->function_table, "callgetchildren", sizeof("callGetChildren"), (void **) &intern->callGetChildren); - if (intern->callGetChildren->common.scope == U_CLASS_ENTRY(spl_ce_RecursiveIteratorIterator)) { + if (intern->callGetChildren->common.scope == spl_ce_RecursiveIteratorIterator) { intern->callGetChildren = NULL; } zend_hash_find(&intern->ce->function_table, "beginchildren", sizeof("beginchildren"), (void **) &intern->beginChildren); - if (intern->beginChildren->common.scope == U_CLASS_ENTRY(spl_ce_RecursiveIteratorIterator)) { + if (intern->beginChildren->common.scope == spl_ce_RecursiveIteratorIterator) { intern->beginChildren = NULL; } zend_hash_find(&intern->ce->function_table, "endchildren", sizeof("endchildren"), (void **) &intern->endChildren); - if (intern->endChildren->common.scope == U_CLASS_ENTRY(spl_ce_RecursiveIteratorIterator)) { + if (intern->endChildren->common.scope == spl_ce_RecursiveIteratorIterator) { intern->endChildren = NULL; } zend_hash_find(&intern->ce->function_table, "nextelement", sizeof("nextElement"), (void **) &intern->nextElement); - if (intern->nextElement->common.scope == U_CLASS_ENTRY(spl_ce_RecursiveIteratorIterator)) { + if (intern->nextElement->common.scope == spl_ce_RecursiveIteratorIterator) { intern->nextElement = NULL; } ce_iterator = Z_OBJCE_P(iterator); /* respect inheritance, don't use spl_ce_RecursiveIterator */ @@ -633,7 +633,7 @@ return; } if (max_depth < -1) { - zend_throw_exception(U_CLASS_ENTRY(spl_ce_OutOfRangeException), "Parameter max_depth must be >= -1", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_OutOfRangeException, "Parameter max_depth must be >= -1", 0 TSRMLS_CC); return; } object->max_depth = max_depth; @@ -842,7 +842,7 @@ int inc_refcount = 1; - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(spl_ce_InvalidArgumentException) TSRMLS_CC); + php_set_error_handling(EH_THROW, spl_ce_InvalidArgumentException TSRMLS_CC); intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC); @@ -857,12 +857,12 @@ } if (intern->u.limit.offset < 0) { php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); - zend_throw_exception(U_CLASS_ENTRY(spl_ce_OutOfRangeException), "Parameter offset must be > 0", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_OutOfRangeException, "Parameter offset must be > 0", 0 TSRMLS_CC); return NULL; } if (intern->u.limit.count < 0 && intern->u.limit.count != -1) { php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); - zend_throw_exception(U_CLASS_ENTRY(spl_ce_OutOfRangeException), "Parameter count must either be -1 or a value greater than or equal 0", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_OutOfRangeException, "Parameter count must either be -1 or a value greater than or equal 0", 0 TSRMLS_CC); return NULL; } break; @@ -877,7 +877,7 @@ if (((flags & CIT_CALL_TOSTRING) && (flags & (CIT_TOSTRING_USE_KEY|CIT_TOSTRING_USE_CURRENT))) || ((flags & (CIT_TOSTRING_USE_KEY|CIT_TOSTRING_USE_CURRENT)) == (CIT_TOSTRING_USE_KEY|CIT_TOSTRING_USE_CURRENT))) { php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); - zend_throw_exception(U_CLASS_ENTRY(spl_ce_InvalidArgumentException), "Flags must contain only one of CATCH_GET_CHILD, CALL_TOSTRING, TOSTRING_USE_KEY, TOSTRING_USE_CURRENT", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_InvalidArgumentException, "Flags must contain only one of CATCH_GET_CHILD, CALL_TOSTRING, TOSTRING_USE_KEY, TOSTRING_USE_CURRENT", 0 TSRMLS_CC); return NULL; } intern->u.caching.flags |= flags & CIT_PUBLIC; @@ -895,22 +895,22 @@ return NULL; } ce = Z_OBJCE_P(zobject); - if (!instanceof_function(ce, U_CLASS_ENTRY(zend_ce_iterator) TSRMLS_CC)) { + if (!instanceof_function(ce, zend_ce_iterator TSRMLS_CC)) { if (ZEND_NUM_ARGS() > 1) { if (zend_lookup_class(class_name, class_name_len, &pce_cast TSRMLS_CC) == FAILURE || !instanceof_function(ce, *pce_cast TSRMLS_CC) || !(*pce_cast)->get_iterator ) { - zend_throw_exception(U_CLASS_ENTRY(spl_ce_LogicException), "Class to downcast to not found or not base class or does not implement Traversable", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_LogicException, "Class to downcast to not found or not base class or does not implement Traversable", 0 TSRMLS_CC); php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); return NULL; } ce = *pce_cast; } - if (instanceof_function(ce, U_CLASS_ENTRY(zend_ce_aggregate) TSRMLS_CC)) { + if (instanceof_function(ce, zend_ce_aggregate TSRMLS_CC)) { zend_call_method_with_0_params(&zobject, ce, &ce->iterator_funcs.zf_new_iterator, "getiterator", &retval); - if (!retval || Z_TYPE_P(retval) != IS_OBJECT || !instanceof_function(Z_OBJCE_P(retval), U_CLASS_ENTRY(zend_ce_traversable) TSRMLS_CC)) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_LogicException), 0 TSRMLS_CC, "%s::getIterator() must return an object that implememnts Traversable", ce->name); + if (!retval || Z_TYPE_P(retval) != IS_OBJECT || !instanceof_function(Z_OBJCE_P(retval), zend_ce_traversable TSRMLS_CC)) { + zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "%s::getIterator() must return an object that implememnts Traversable", ce->name); php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); return NULL; } @@ -922,9 +922,9 @@ break; } case DIT_AppendIterator: - spl_instantiate(U_CLASS_ENTRY(spl_ce_ArrayIterator), &intern->u.append.zarrayit, 1 TSRMLS_CC); - zend_call_method_with_0_params(&intern->u.append.zarrayit, U_CLASS_ENTRY(spl_ce_ArrayIterator), &U_CLASS_ENTRY(spl_ce_ArrayIterator)->constructor, "__construct", NULL); - intern->u.append.iterator = U_CLASS_ENTRY(spl_ce_ArrayIterator)->get_iterator(U_CLASS_ENTRY(spl_ce_ArrayIterator), intern->u.append.zarrayit, 0 TSRMLS_CC); + spl_instantiate(spl_ce_ArrayIterator, &intern->u.append.zarrayit, 1 TSRMLS_CC); + zend_call_method_with_0_params(&intern->u.append.zarrayit, spl_ce_ArrayIterator, &spl_ce_ArrayIterator->constructor, "__construct", NULL); + intern->u.append.iterator = spl_ce_ArrayIterator->get_iterator(spl_ce_ArrayIterator, intern->u.append.zarrayit, 0 TSRMLS_CC); php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); return intern; #if HAVE_PCRE || HAVE_BUNDLED_PCRE @@ -970,7 +970,7 @@ Create an Iterator from another iterator */ SPL_METHOD(dual_it, __construct) { - spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(zend_ce_iterator), DIT_Default); + spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, zend_ce_iterator, DIT_Default); } /* }}} */ /* {{{ proto Iterator FilterIterator::getInnerIterator() @@ -1212,7 +1212,7 @@ Create a RecursiveFilterIterator from a RecursiveIterator */ SPL_METHOD(RecursiveFilterIterator, __construct) { - spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(spl_ce_RecursiveIterator), DIT_Default); + spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, spl_ce_RecursiveIterator, DIT_Default); } /* }}} */ /* {{{ proto boolean RecursiveFilterIterator::hasChildren() @@ -1246,7 +1246,7 @@ Create a ParentIterator from a RecursiveIterator */ SPL_METHOD(ParentIterator, __construct) { - spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(spl_ce_RecursiveIterator), DIT_Default); + spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, spl_ce_RecursiveIterator, DIT_Default); } /* }}} */ /* {{{ proto boolean ParentIterator::hasChildren() @@ -1281,7 +1281,7 @@ Create an RegExIterator from another iterator and a regular expression */ SPL_METHOD(RegExIterator, __construct) { - spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(zend_ce_iterator), DIT_RegExIterator); + spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, zend_ce_iterator, DIT_RegExIterator); } /* }}} */ /* {{{ proto bool RegExIterator::accept() @@ -1330,7 +1330,7 @@ Create an RecursiveRegExIterator from another recursive iterator and a regular expression */ SPL_METHOD(RecursiveRegExIterator, __construct) { - spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(spl_ce_RecursiveIterator), DIT_RecursiveRegExIterator); + spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, spl_ce_RecursiveIterator, DIT_RecursiveRegExIterator); } /* }}} */ #endif @@ -1473,14 +1473,14 @@ spl_dual_it_free(intern TSRMLS_CC); if (pos < intern->u.limit.offset) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_OutOfBoundsException), 0 TSRMLS_CC, "Cannot seek to %ld which is below the offset %ld", pos, intern->u.limit.offset); + zend_throw_exception_ex(spl_ce_OutOfBoundsException, 0 TSRMLS_CC, "Cannot seek to %ld which is below the offset %ld", pos, intern->u.limit.offset); return; } if (pos > intern->u.limit.offset + intern->u.limit.count && intern->u.limit.count != -1) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_OutOfBoundsException), 0 TSRMLS_CC, "Cannot seek to %ld which is behind offest %ld plus count %ld", pos, intern->u.limit.offset, intern->u.limit.count); + zend_throw_exception_ex(spl_ce_OutOfBoundsException, 0 TSRMLS_CC, "Cannot seek to %ld which is behind offest %ld plus count %ld", pos, intern->u.limit.offset, intern->u.limit.count); return; } - if (instanceof_function(intern->inner.ce, U_CLASS_ENTRY(spl_ce_SeekableIterator) TSRMLS_CC)) { + if (instanceof_function(intern->inner.ce, spl_ce_SeekableIterator TSRMLS_CC)) { MAKE_STD_ZVAL(zpos); ZVAL_LONG(zpos, pos); spl_dual_it_free(intern TSRMLS_CC); @@ -1509,7 +1509,7 @@ Construct a LimitIterator from an Iterator with a given starting offset and optionally a maximum count */ SPL_METHOD(LimitIterator, __construct) { - spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(zend_ce_iterator), DIT_LimitIterator); + spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, zend_ce_iterator, DIT_LimitIterator); } /* }}} */ /* {{{ proto void LimitIterator::rewind() @@ -1649,7 +1649,7 @@ } else { INIT_PZVAL(&zflags); ZVAL_LONG(&zflags, intern->u.caching.flags & CIT_PUBLIC); - spl_instantiate_arg_ex2(U_CLASS_ENTRY(spl_ce_RecursiveCachingIterator), &intern->u.caching.zchildren, 1, zchildren, &zflags TSRMLS_CC); + spl_instantiate_arg_ex2(spl_ce_RecursiveCachingIterator, &intern->u.caching.zchildren, 1, zchildren, &zflags TSRMLS_CC); zval_ptr_dtor(&zchildren); } } @@ -1692,7 +1692,7 @@ Construct a CachingIterator from an Iterator */ SPL_METHOD(CachingIterator, __construct) { - spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(zend_ce_iterator), DIT_CachingIterator); + spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, zend_ce_iterator, DIT_CachingIterator); } /* }}} */ /* {{{ proto void CachingIterator::rewind() @@ -1748,7 +1748,7 @@ intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC); if (!(intern->u.caching.flags & (CIT_CALL_TOSTRING|CIT_TOSTRING_USE_KEY|CIT_TOSTRING_USE_CURRENT))) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_BadMethodCallException), 0 TSRMLS_CC, "%v does not fetch string value (see CachingIterator::__construct)", Z_OBJCE_P(getThis())->name); + zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "%v does not fetch string value (see CachingIterator::__construct)", Z_OBJCE_P(getThis())->name); } if (intern->u.caching.flags & CIT_TOSTRING_USE_KEY) { if (intern->current.key_type == HASH_KEY_IS_STRING) { @@ -1788,7 +1788,7 @@ intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC); if (!(intern->u.caching.flags & CIT_FULL_CACHE)) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_BadMethodCallException), 0 TSRMLS_CC, "%v does not use a full cache (see CachingIterator::__construct)", Z_OBJCE_P(getThis())->name); + zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "%v does not use a full cache (see CachingIterator::__construct)", Z_OBJCE_P(getThis())->name); } if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Tz", &arKey, &nKeyLength, &type, &value) == FAILURE) { @@ -1813,7 +1813,7 @@ intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC); if (!(intern->u.caching.flags & CIT_FULL_CACHE)) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_BadMethodCallException), 0 TSRMLS_CC, "%v does not use a full cache (see CachingIterator::__construct)", Z_OBJCE_P(getThis())->name); + zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "%v does not use a full cache (see CachingIterator::__construct)", Z_OBJCE_P(getThis())->name); } if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "T", &arKey, &nKeyLength, &type) == FAILURE) { @@ -1841,7 +1841,7 @@ intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC); if (!(intern->u.caching.flags & CIT_FULL_CACHE)) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_BadMethodCallException), 0 TSRMLS_CC, "%v does not use a full cache (see CachingIterator::__construct)", Z_OBJCE_P(getThis())->name); + zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "%v does not use a full cache (see CachingIterator::__construct)", Z_OBJCE_P(getThis())->name); } if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "T", &arKey, &nKeyLength, &type) == FAILURE) { @@ -1864,7 +1864,7 @@ intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC); if (!(intern->u.caching.flags & CIT_FULL_CACHE)) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_BadMethodCallException), 0 TSRMLS_CC, "%v does not use a full cache (see CachingIterator::__construct)", Z_OBJCE_P(getThis())->name); + zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "%v does not use a full cache (see CachingIterator::__construct)", Z_OBJCE_P(getThis())->name); } if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "T", &arKey, &nKeyLength, &type) == FAILURE) { @@ -1906,7 +1906,7 @@ return; } if ((intern->u.caching.flags & CIT_CALL_TOSTRING) != 0 && (flags & ~CIT_CALL_TOSTRING) == 0) { - zend_throw_exception(U_CLASS_ENTRY(spl_ce_InvalidArgumentException), "Unsetting flag CALL_TO_STRING is not possible", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_InvalidArgumentException, "Unsetting flag CALL_TO_STRING is not possible", 0 TSRMLS_CC); return; } if ((flags && CIT_FULL_CACHE) != 0 && (intern->u.caching.flags & CIT_FULL_CACHE) == 0) { @@ -1962,7 +1962,7 @@ Create an iterator from a RecursiveIterator */ SPL_METHOD(RecursiveCachingIterator, __construct) { - spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(spl_ce_RecursiveIterator), DIT_RecursiveCachingIterator); + spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, spl_ce_RecursiveIterator, DIT_RecursiveCachingIterator); } /* }}} */ /* {{{ proto bolean RecursiveCachingIterator::hasChildren() @@ -2008,7 +2008,7 @@ Create an iterator from anything that is traversable */ SPL_METHOD(IteratorIterator, __construct) { - spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(zend_ce_traversable), DIT_IteratorIterator); + spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, zend_ce_traversable, DIT_IteratorIterator); } /* }}} */ static @@ -2031,7 +2031,7 @@ Create an iterator from another iterator */ SPL_METHOD(NoRewindIterator, __construct) { - spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(zend_ce_iterator), DIT_NoRewindIterator); + spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, zend_ce_iterator, DIT_NoRewindIterator); } /* }}} */ /* {{{ proto void NoRewindIterator::rewind() @@ -2123,7 +2123,7 @@ Create an iterator from another iterator */ SPL_METHOD(InfiniteIterator, __construct) { - spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(zend_ce_iterator), DIT_InfiniteIterator); + spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, zend_ce_iterator, DIT_InfiniteIterator); } /* }}} */ /* {{{ proto InfiniteIterator::next() @@ -2168,14 +2168,14 @@ Throws exception */ SPL_METHOD(EmptyIterator, key) { - zend_throw_exception(U_CLASS_ENTRY(spl_ce_BadMethodCallException), "Accessing the key of an EmptyIterator", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_BadMethodCallException, "Accessing the key of an EmptyIterator", 0 TSRMLS_CC); } /* }}} */ /* {{{ proto EmptyIterator::current() Throws exception */ SPL_METHOD(EmptyIterator, current) { - zend_throw_exception(U_CLASS_ENTRY(spl_ce_BadMethodCallException), "Accessing the value of an EmptyIterator", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_BadMethodCallException, "Accessing the value of an EmptyIterator", 0 TSRMLS_CC); } /* }}} */ /* {{{ proto EmptyIterator::next() @@ -2246,7 +2246,7 @@ Create an AppendIterator */ SPL_METHOD(AppendIterator, __construct) { - spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(zend_ce_iterator), DIT_AppendIterator); + spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, zend_ce_iterator, DIT_AppendIterator); } /* }}} */ /* {{{ proto void AppendIterator::append(Iterator it) @@ -2258,7 +2258,7 @@ intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &it, U_CLASS_ENTRY(zend_ce_iterator)) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &it, zend_ce_iterator) == FAILURE) { return; } spl_array_iterator_append(intern->u.append.zarrayit, it TSRMLS_CC); @@ -2362,7 +2362,7 @@ ulong int_key; int key_type; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &obj, U_CLASS_ENTRY(zend_ce_traversable)) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &obj, zend_ce_traversable) == FAILURE) { RETURN_FALSE; } @@ -2408,7 +2408,7 @@ zend_object_iterator *iter; long count = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &obj, U_CLASS_ENTRY(zend_ce_traversable)) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &obj, zend_ce_traversable) == FAILURE) { RETURN_FALSE; } http://cvs.php.net/viewcvs.cgi/php-src/ext/sqlite/sqlite.c?r1=1.183&r2=1.184&diff_format=u Index: php-src/ext/sqlite/sqlite.c diff -u php-src/ext/sqlite/sqlite.c:1.183 php-src/ext/sqlite/sqlite.c:1.184 --- php-src/ext/sqlite/sqlite.c:1.183 Tue Jan 17 12:18:52 2006 +++ php-src/ext/sqlite/sqlite.c Mon Feb 13 10:23:58 2006 @@ -17,7 +17,7 @@ | Marcus Boerger <helly@php.net> | +----------------------------------------------------------------------+ - $Id: sqlite.c,v 1.183 2006/01/17 12:18:52 dmitry Exp $ + $Id: sqlite.c,v 1.184 2006/02/13 10:23:58 dmitry Exp $ */ #ifdef HAVE_CONFIG_H @@ -879,12 +879,12 @@ static zend_class_entry *sqlite_get_ce_query(zval *object TSRMLS_DC) { - return U_CLASS_ENTRY(sqlite_ce_query); + return sqlite_ce_query; } static zend_class_entry *sqlite_get_ce_ub_query(zval *object TSRMLS_DC) { - return U_CLASS_ENTRY(sqlite_ce_ub_query); + return sqlite_ce_ub_query; } static zval * sqlite_instanciate(zend_class_entry *pce, zval *object TSRMLS_DC) @@ -1128,7 +1128,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, "SQLite support", "enabled"); - php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.183 2006/01/17 12:18:52 dmitry Exp $"); + php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.184 2006/02/13 10:23:58 dmitry Exp $"); php_info_print_table_row(2, "SQLite Library", sqlite_libversion()); php_info_print_table_row(2, "SQLite Encoding", sqlite_libencoding()); php_info_print_table_end(); @@ -1188,7 +1188,7 @@ if (object) { /* if object is not an object then we're called from the factory() function */ if (Z_TYPE_P(object) != IS_OBJECT) { - sqlite_instanciate(U_CLASS_ENTRY(sqlite_ce_db), object TSRMLS_CC); + sqlite_instanciate(sqlite_ce_db, object TSRMLS_CC); } /* and now register the object */ SQLITE_REGISTER_OBJECT(db, object, db) @@ -1295,7 +1295,7 @@ zval *errmsg = NULL; zval *object = getThis(); - php_set_error_handling(object ? EH_THROW : EH_NORMAL, U_CLASS_ENTRY(sqlite_ce_exception) TSRMLS_CC); + php_set_error_handling(object ? EH_THROW : EH_NORMAL, sqlite_ce_exception TSRMLS_CC); if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lz/", &filename, &filename_len, &mode, &errmsg)) { php_std_error_handling(); @@ -1350,7 +1350,7 @@ int filename_len; zval *errmsg = NULL; - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(sqlite_ce_exception) TSRMLS_CC); + php_set_error_handling(EH_THROW, sqlite_ce_exception TSRMLS_CC); if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lz/", &filename, &filename_len, &mode, &errmsg)) { php_std_error_handling(); @@ -1577,9 +1577,9 @@ if (object) { sqlite_object *obj; if (buffered) { - sqlite_instanciate(U_CLASS_ENTRY(sqlite_ce_query), return_value TSRMLS_CC); + sqlite_instanciate(sqlite_ce_query, return_value TSRMLS_CC); } else { - sqlite_instanciate(U_CLASS_ENTRY(sqlite_ce_ub_query), return_value TSRMLS_CC); + sqlite_instanciate(sqlite_ce_ub_query, return_value TSRMLS_CC); } obj = (sqlite_object *) zend_object_store_get_object(return_value TSRMLS_CC); obj->type = is_result; @@ -2073,7 +2073,7 @@ zval *ctor_params = NULL; zend_uchar class_name_type; - php_set_error_handling(object ? EH_THROW : EH_NORMAL, U_CLASS_ENTRY(sqlite_ce_exception) TSRMLS_CC); + php_set_error_handling(object ? EH_THROW : EH_NORMAL, sqlite_ce_exception TSRMLS_CC); if (object) { if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|tzb", &class_name, &class_name_len, &class_name_type, &ctor_params, &decode_binary)) { php_std_error_handling(); @@ -2081,7 +2081,7 @@ } RES_FROM_OBJECT(res, object); if (!ZEND_NUM_ARGS()) { - ce = U_CLASS_ENTRY(zend_standard_class_def); + ce = zend_standard_class_def; } else { ce = zend_u_fetch_class(class_name_type, class_name, class_name_len, ZEND_FETCH_CLASS_AUTO TSRMLS_CC); } @@ -2092,14 +2092,14 @@ } ZEND_FETCH_RESOURCE(res, struct php_sqlite_result *, &zres, -1, "sqlite result", le_sqlite_result); if (ZEND_NUM_ARGS() < 2) { - ce = U_CLASS_ENTRY(zend_standard_class_def); + ce = zend_standard_class_def; } else { ce = zend_u_fetch_class(class_name_type, class_name, class_name_len, ZEND_FETCH_CLASS_AUTO TSRMLS_CC); } } if (!ce) { - zend_throw_exception_ex(U_CLASS_ENTRY(sqlite_ce_exception), 0 TSRMLS_CC, "Could not find class '%s'", class_name); + zend_throw_exception_ex(sqlite_ce_exception, 0 TSRMLS_CC, "Could not find class '%s'", class_name); php_std_error_handling(); return; } @@ -2142,7 +2142,7 @@ * single value is an array. Also we'd have to make that one * argument passed by reference. */ - zend_throw_exception(U_CLASS_ENTRY(sqlite_ce_exception), "Parameter ctor_params must be an array", 0 TSRMLS_CC); + zend_throw_exception(sqlite_ce_exception, "Parameter ctor_params must be an array", 0 TSRMLS_CC); return; } } else { @@ -2157,7 +2157,7 @@ fcc.object_pp = &return_value; if (zend_call_function(&fci, &fcc TSRMLS_CC) == FAILURE) { - zend_throw_exception_ex(U_CLASS_ENTRY(sqlite_ce_exception), 0 TSRMLS_CC, "Could not execute %s::%v()", class_name, ce->constructor->common.function_name); + zend_throw_exception_ex(sqlite_ce_exception, 0 TSRMLS_CC, "Could not execute %s::%v()", class_name, ce->constructor->common.function_name); } else { if (retval_ptr) { zval_ptr_dtor(&retval_ptr); @@ -2167,7 +2167,7 @@ efree(fci.params); } } else if (ctor_params && Z_TYPE_P(ctor_params) != IS_NULL) { - zend_throw_exception_ex(U_CLASS_ENTRY(sqlite_ce_exception), 0 TSRMLS_CC, "Class %s does not have a constructor, use NULL for parameter ctor_params or omit it", class_name); + zend_throw_exception_ex(sqlite_ce_exception, 0 TSRMLS_CC, "Class %s does not have a constructor, use NULL for parameter ctor_params or omit it", class_name); } } /* }}} */ @@ -2545,7 +2545,7 @@ * count = obj->u.res->nrows; return SUCCESS; } else { - zend_throw_exception(U_CLASS_ENTRY(sqlite_ce_exception), "Row count is not available for unbuffered queries", 0 TSRMLS_CC); + zend_throw_exception(sqlite_ce_exception, "Row count is not available for unbuffered queries", 0 TSRMLS_CC); return FAILURE; } } /* }}} */ http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/array.c?r1=1.339&r2=1.340&diff_format=u Index: php-src/ext/standard/array.c diff -u php-src/ext/standard/array.c:1.339 php-src/ext/standard/array.c:1.340 --- php-src/ext/standard/array.c:1.339 Tue Feb 7 17:54:52 2006 +++ php-src/ext/standard/array.c Mon Feb 13 10:23:58 2006 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: array.c,v 1.339 2006/02/07 17:54:52 andrei Exp $ */ +/* $Id: array.c,v 1.340 2006/02/13 10:23:58 dmitry Exp $ */ #include "php.h" #include "php_ini.h" @@ -316,7 +316,7 @@ /* it the object implements Countable we call its count() method */ zval *retval; - if (Z_OBJ_HT_P(array)->get_class_entry && instanceof_function(Z_OBJCE_P(array), U_CLASS_ENTRY(spl_ce_Countable) TSRMLS_CC)) { + if (Z_OBJ_HT_P(array)->get_class_entry && instanceof_function(Z_OBJCE_P(array), spl_ce_Countable TSRMLS_CC)) { zend_call_method_with_0_params(&array, NULL, NULL, "count", &retval); RETVAL_LONG(Z_LVAL_P(retval)); zval_ptr_dtor(&retval); http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/dir.c?r1=1.150&r2=1.151&diff_format=u Index: php-src/ext/standard/dir.c diff -u php-src/ext/standard/dir.c:1.150 php-src/ext/standard/dir.c:1.151 --- php-src/ext/standard/dir.c:1.150 Sun Jan 1 13:09:55 2006 +++ php-src/ext/standard/dir.c Mon Feb 13 10:23:58 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dir.c,v 1.150 2006/01/01 13:09:55 sniper Exp $ */ +/* $Id: dir.c,v 1.151 2006/02/13 10:23:58 dmitry Exp $ */ /* {{{ includes/startup/misc */ @@ -201,7 +201,7 @@ php_set_default_dir(dirp->rsrc_id TSRMLS_CC); if (createobject) { - object_init_ex(return_value, U_CLASS_ENTRY(dir_class_entry_ptr)); + object_init_ex(return_value, dir_class_entry_ptr); add_property_rt_stringl(return_value, "path", dirname, dir_len, 1); add_property_resource(return_value, "handle", dirp->rsrc_id); php_stream_auto_cleanup(dirp); /* so we don't get warnings under debug */ http://cvs.php.net/viewcvs.cgi/php-src/ext/unicode/unicode_iterators.c?r1=1.19&r2=1.20&diff_format=u Index: php-src/ext/unicode/unicode_iterators.c diff -u php-src/ext/unicode/unicode_iterators.c:1.19 php-src/ext/unicode/unicode_iterators.c:1.20 --- php-src/ext/unicode/unicode_iterators.c:1.19 Sat Feb 11 00:16:43 2006 +++ php-src/ext/unicode/unicode_iterators.c Mon Feb 13 10:23:58 2006 @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: unicode_iterators.c,v 1.19 2006/02/11 00:16:43 andrei Exp $ */ +/* $Id: unicode_iterators.c,v 1.20 2006/02/13 10:23:58 dmitry Exp $ */ /* * TODO @@ -539,7 +539,7 @@ intern->flags = flags; } - if (Z_OBJCE_P(this_ptr) == U_CLASS_ENTRY(rev_text_iterator_ce)) { + if (Z_OBJCE_P(this_ptr) == rev_text_iterator_ce) { intern->flags |= ITER_REVERSE; } http://cvs.php.net/viewcvs.cgi/php-src/main/SAPI.c?r1=1.210&r2=1.211&diff_format=u Index: php-src/main/SAPI.c diff -u php-src/main/SAPI.c:1.210 php-src/main/SAPI.c:1.211 --- php-src/main/SAPI.c:1.210 Sun Jan 1 13:09:57 2006 +++ php-src/main/SAPI.c Mon Feb 13 10:23:58 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: SAPI.c,v 1.210 2006/01/01 13:09:57 sniper Exp $ */ +/* $Id: SAPI.c,v 1.211 2006/02/13 10:23:58 dmitry Exp $ */ #include <ctype.h> #include <sys/stat.h> @@ -75,6 +75,7 @@ SAPI_API void sapi_startup(sapi_module_struct *sf) { + sf->ini_entries = NULL; sapi_module = *sf; #ifdef ZTS http://cvs.php.net/viewcvs.cgi/php-src/main/SAPI.h?r1=1.116&r2=1.117&diff_format=u Index: php-src/main/SAPI.h diff -u php-src/main/SAPI.h:1.116 php-src/main/SAPI.h:1.117 --- php-src/main/SAPI.h:1.116 Sun Jan 1 13:09:57 2006 +++ php-src/main/SAPI.h Mon Feb 13 10:23:58 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: SAPI.h,v 1.116 2006/01/01 13:09:57 sniper Exp $ */ +/* $Id: SAPI.h,v 1.117 2006/02/13 10:23:58 dmitry Exp $ */ #ifndef SAPI_H #define SAPI_H @@ -258,6 +258,8 @@ void (*ini_defaults)(HashTable *configuration_hash); int phpinfo_as_text; + + char *ini_entries; }; http://cvs.php.net/viewcvs.cgi/php-src/main/php_ini.c?r1=1.140&r2=1.141&diff_format=u Index: php-src/main/php_ini.c diff -u php-src/main/php_ini.c:1.140 php-src/main/php_ini.c:1.141 --- php-src/main/php_ini.c:1.140 Sun Jan 1 13:09:57 2006 +++ php-src/main/php_ini.c Mon Feb 13 10:23:58 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_ini.c,v 1.140 2006/01/01 13:09:57 sniper Exp $ */ +/* $Id: php_ini.c,v 1.141 2006/02/13 10:23:58 dmitry Exp $ */ #include "php.h" #include "ext/standard/info.h" @@ -524,6 +524,11 @@ zend_llist_destroy(&scanned_ini_list); } } + + if (sapi_module.ini_entries) { + zend_parse_ini_string(sapi_module.ini_entries, 1, php_config_ini_parser_cb, &extension_lists); + } + return SUCCESS; } /* }}} */ http://cvs.php.net/viewcvs.cgi/php-src/main/php_variables.c?r1=1.111&r2=1.112&diff_format=u Index: php-src/main/php_variables.c diff -u php-src/main/php_variables.c:1.111 php-src/main/php_variables.c:1.112 --- php-src/main/php_variables.c:1.111 Tue Jan 17 12:18:53 2006 +++ php-src/main/php_variables.c Mon Feb 13 10:23:58 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_variables.c,v 1.111 2006/01/17 12:18:53 dmitry Exp $ */ +/* $Id: php_variables.c,v 1.112 2006/02/13 10:23:58 dmitry Exp $ */ #include <stdio.h> #include "php.h" @@ -581,6 +581,7 @@ php_register_variable_safe(var, val, new_val_len, array_ptr TSRMLS_CC); } */ + efree(u_var); efree(u_val); } } else { @@ -696,15 +697,11 @@ } /* auto-type */ ALLOC_ZVAL(tmp); - Z_TYPE_P(tmp) = IS_STRING; - Z_STRLEN_P(tmp) = strlen(ss); - Z_STRVAL_P(tmp) = estrndup(ss, Z_STRLEN_P(tmp)); + ZVAL_RT_STRING(tmp, ss, 1); INIT_PZVAL(tmp); count++; if (zend_hash_next_index_insert(Z_ARRVAL_P(arr), &tmp, sizeof(zval *), NULL) == FAILURE) { - if (Z_TYPE_P(tmp) == IS_STRING) { - efree(Z_STRVAL_P(tmp)); - } + efree(Z_STRVAL_P(tmp)); } if (space) { *space = '+'; http://cvs.php.net/viewcvs.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.275&r2=1.276&diff_format=u Index: php-src/sapi/cgi/cgi_main.c diff -u php-src/sapi/cgi/cgi_main.c:1.275 php-src/sapi/cgi/cgi_main.c:1.276 --- php-src/sapi/cgi/cgi_main.c:1.275 Fri Feb 3 16:30:27 2006 +++ php-src/sapi/cgi/cgi_main.c Mon Feb 13 10:23:58 2006 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: cgi_main.c,v 1.275 2006/02/03 16:30:27 dmitry Exp $ */ +/* $Id: cgi_main.c,v 1.276 2006/02/13 10:23:58 dmitry Exp $ */ #include "php.h" #include "php_globals.h" @@ -846,22 +846,6 @@ } /* }}} */ -static void define_command_line_ini_entry(char *arg) -{ - char *name, *value; - - name = arg; - value = strchr(arg, '='); - if (value) { - *value = 0; - value++; - } else { - value = "1"; - } - zend_alter_ini_entry(name, strlen(name) + 1, value, strlen(value), PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE); -} - - static void php_register_command_line_global_vars(char **arg TSRMLS_DC) { char *var, *val; @@ -913,6 +897,7 @@ char *orig_optarg = php_optarg; char *script_file = NULL; zend_llist global_vars; + int ini_entries_len = 0; /* end of temporary locals */ #ifdef ZTS @@ -995,6 +980,23 @@ /* if we're started on command line, check to see if we are being started as an 'external' fastcgi server by accepting a bindpath parameter. */ + case 'd': { + /* define ini entries on command line */ + int len = strlen(php_optarg); + + if (strchr(php_optarg, '=')) { + cgi_sapi_module.ini_entries = realloc(cgi_sapi_module.ini_entries, ini_entries_len + len + sizeof("\n\0")); + memcpy(cgi_sapi_module.ini_entries + ini_entries_len, php_optarg, len); + memcpy(cgi_sapi_module.ini_entries + ini_entries_len + len, "\n\0", sizeof("\n\0")); + ini_entries_len += len + sizeof("\n\0") - 2; + } else { + cgi_sapi_module.ini_entries = realloc(cgi_sapi_module.ini_entries, ini_entries_len + len + sizeof("=1\n\0")); + memcpy(cgi_sapi_module.ini_entries + ini_entries_len, php_optarg, len); + memcpy(cgi_sapi_module.ini_entries + ini_entries_len + len, "=1\n\0", sizeof("=1\n\0")); + ini_entries_len += len + sizeof("=1\n\0") - 2; + } + break; + } case 'b': if (!fastcgi) { bindpath = strdup(php_optarg); @@ -1270,9 +1272,6 @@ case 'C': /* don't chdir to the script directory */ SG(options) |= SAPI_OPTION_NO_CHDIR; break; - case 'd': /* define ini entries on command line */ - define_command_line_ini_entry(php_optarg); - break; case 'e': /* enable extended info output */ CG(extended_info) = 1; @@ -1586,6 +1585,9 @@ if (cgi_sapi_module.php_ini_path_override) { free(cgi_sapi_module.php_ini_path_override); } + if (cgi_sapi_module.ini_entries) { + free(cgi_sapi_module.ini_entries); + } } zend_catch { exit_status = 255; } zend_end_try(); @@ -1595,7 +1597,7 @@ sapi_shutdown(); #ifdef ZTS - /*tsrm_shutdown();*/ + tsrm_shutdown(); #endif #if defined(PHP_WIN32) && ZEND_DEBUG && 0 http://cvs.php.net/viewcvs.cgi/php-src/sapi/cli/php_cli.c?r1=1.144&r2=1.145&diff_format=u Index: php-src/sapi/cli/php_cli.c diff -u php-src/sapi/cli/php_cli.c:1.144 php-src/sapi/cli/php_cli.c:1.145 --- php-src/sapi/cli/php_cli.c:1.144 Sat Jan 7 16:46:30 2006 +++ php-src/sapi/cli/php_cli.c Mon Feb 13 10:23:59 2006 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_cli.c,v 1.144 2006/01/07 16:46:30 helly Exp $ */ +/* $Id: php_cli.c,v 1.145 2006/02/13 10:23:59 dmitry Exp $ */ #include "php.h" #include "php_globals.h" @@ -106,6 +106,14 @@ #define PHP_MODE_REFLECTION_CLASS 9 #define PHP_MODE_REFLECTION_EXTENSION 10 +#define HARDCODED_INI \ + "html_errors=0\n" \ + "register_argc_argv=1\n" \ + "implicit_flush=1\n" \ + "output_buffering=0\n" \ + "max_execution_time=0\n" + + static char *php_optarg = NULL; static int php_optind = 1; #if (HAVE_LIBREADLINE || HAVE_LIBEDIT) && !defined(COMPILE_DL_READLINE) @@ -335,10 +343,6 @@ zend_hash_update(configuration_hash, name, sizeof(name), tmp, sizeof(zval), (void**)&entry);\ Z_STRVAL_P(entry) = zend_strndup(Z_STRVAL_P(entry), Z_STRLEN_P(entry)) -/* hard coded ini settings must be set in main() */ -#define INI_HARDCODED(name,value)\ - zend_alter_ini_entry(name, sizeof(name), value, strlen(value), PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE); - static void sapi_cli_ini_defaults(HashTable *configuration_hash) { zval *tmp, *entry; @@ -442,29 +446,6 @@ } /* }}} */ -static void define_command_line_ini_entry(char *arg TSRMLS_DC) -{ - char *name, *value; - - name = arg; - value = strchr(arg, '='); - if (value) { - *value = 0; - value++; - } else { - value = "1"; - } - - if (!strcasecmp(name, "extension")) { /* load function module */ - zval extension, zval; - ZVAL_STRING(&extension, value, 0); - php_dl(&extension, MODULE_PERSISTENT, &zval, 1 TSRMLS_CC); - } else { - zend_alter_ini_entry(name, strlen(name)+1, value, strlen(value), PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE); - } -} - - static void php_register_command_line_global_vars(char **arg TSRMLS_DC) { char *var, *val; @@ -608,6 +589,7 @@ int argc = __argc; char **argv = __argv; #endif + int ini_entries_len = 0; #if defined(PHP_WIN32) && defined(_DEBUG) && defined(PHP_WIN32_DEBUG_HEAP) { @@ -651,15 +633,36 @@ setmode(_fileno(stderr), O_BINARY); /* make the stdio mode be binary */ #endif + ini_entries_len = strlen(HARDCODED_INI); + cli_sapi_module.ini_entries = malloc(ini_entries_len+2); + memcpy(cli_sapi_module.ini_entries, HARDCODED_INI, ini_entries_len+1); + cli_sapi_module.ini_entries[ini_entries_len+1] = 0; while ((c = php_getopt(argc, argv, OPTIONS, &php_optarg, &php_optind, 0))!=-1) { switch (c) { - case 'c': - cli_sapi_module.php_ini_path_override = strdup(php_optarg); - break; - case 'n': - cli_sapi_module.php_ini_ignore = 1; - break; + case 'c': + cli_sapi_module.php_ini_path_override = strdup(php_optarg); + break; + case 'n': + cli_sapi_module.php_ini_ignore = 1; + break; + case 'd': { + /* define ini entries on command line */ + int len = strlen(php_optarg); + + if (strchr(php_optarg, '=')) { + cli_sapi_module.ini_entries = realloc(cli_sapi_module.ini_entries, ini_entries_len + len + sizeof("\n\0")); + memcpy(cli_sapi_module.ini_entries + ini_entries_len, php_optarg, len); + memcpy(cli_sapi_module.ini_entries + ini_entries_len + len, "\n\0", sizeof("\n\0")); + ini_entries_len += len + sizeof("\n\0") - 2; + } else { + cli_sapi_module.ini_entries = realloc(cli_sapi_module.ini_entries, ini_entries_len + len + sizeof("=1\n\0")); + memcpy(cli_sapi_module.ini_entries + ini_entries_len, php_optarg, len); + memcpy(cli_sapi_module.ini_entries + ini_entries_len + len, "=1\n\0", sizeof("=1\n\0")); + ini_entries_len += len + sizeof("=1\n\0") - 2; + } + break; + } } } php_optind = orig_optind; @@ -690,7 +693,6 @@ zend_first_try { zend_llist_init(&global_vars, sizeof(char *), NULL, 0); - zend_uv.html_errors = 0; /* tell the engine we're in non-html mode */ CG(in_compilation) = 0; /* not initialized but needed for several options */ EG(uninitialized_zval_ptr) = NULL; @@ -700,20 +702,9 @@ goto out_err; } - /* here is the place for hard coded defaults which cannot be overwritten in the ini file */ - INI_HARDCODED("register_argc_argv", "1"); - INI_HARDCODED("html_errors", "0"); - INI_HARDCODED("implicit_flush", "1"); - INI_HARDCODED("output_buffering", "0"); - INI_HARDCODED("max_execution_time", "0"); - while ((c = php_getopt(argc, argv, OPTIONS, &php_optarg, &php_optind, 0)) != -1) { switch (c) { - case 'd': /* define ini entries on command line */ - define_command_line_ini_entry(php_optarg TSRMLS_CC); - break; - case 'h': /* help & quit */ case '?': if (php_request_startup(TSRMLS_C)==FAILURE) { @@ -1237,6 +1228,9 @@ if (cli_sapi_module.php_ini_path_override) { free(cli_sapi_module.php_ini_path_override); } + if (cli_sapi_module.ini_entries) { + free(cli_sapi_module.ini_entries); + } } zend_end_try(); out: @@ -1253,7 +1247,7 @@ tsrm_shutdown(); #endif - exit(exit_status); + return exit_status; err: zend_ini_deactivate(TSRMLS_C); http://cvs.php.net/viewcvs.cgi/php-src/tests/lang/bug25145.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/tests/lang/bug25145.phpt diff -u php-src/tests/lang/bug25145.phpt:1.2 php-src/tests/lang/bug25145.phpt:1.3 --- php-src/tests/lang/bug25145.phpt:1.2 Fri Aug 29 09:05:11 2003 +++ php-src/tests/lang/bug25145.phpt Mon Feb 13 10:23:59 2006 @@ -20,3 +20,13 @@ } } Done +--UEXPECT-- +array(1) { + [123]=> + array(1) { + [0]=> + unicode(4) "SEGV" + } +} +Done + http://cvs.php.net/viewcvs.cgi/php-src/tests/run-test/test004.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/tests/run-test/test004.phpt diff -u php-src/tests/run-test/test004.phpt:1.2 php-src/tests/run-test/test004.phpt:1.3 --- php-src/tests/run-test/test004.phpt:1.2 Tue Jan 17 12:18:53 2006 +++ php-src/tests/run-test/test004.phpt Mon Feb 13 10:23:59 2006 @@ -1,7 +1,7 @@ --TEST-- INI section allows '=' --INI-- -arg_separator.input== +arg_separator.input="=" --FILE-- <?php var_dump(ini_get('arg_separator.input')); @@ -9,4 +9,4 @@ --EXPECT-- string(1) "=" --UEXPECT-- -unicode(1) "=" \ No newline at end of file +unicode(1) "="
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend.c?r1=1.334&r2=1.335&diff_format=u Index: ZendEngine2/zend.c diff -u ZendEngine2/zend.c:1.334 ZendEngine2/zend.c:1.335 --- ZendEngine2/zend.c:1.334 Mon Feb 13 09:23:13 2006 +++ ZendEngine2/zend.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend.c,v 1.334 2006/02/13 09:23:13 helly Exp $ */ +/* $Id: zend.c,v 1.335 2006/02/13 10:23:57 dmitry Exp $ */ #include "zend.h" #include "zend_extensions.h" @@ -29,7 +29,18 @@ #include "zend_builtin_functions.h" #include "zend_ini.h" #include "zend_unicode.h" -#include "zend_interfaces.h" + +#ifdef ZTS +# define GLOBAL_FUNCTION_TABLE global_function_table +# define GLOBAL_CLASS_TABLE global_class_table +# define GLOBAL_CONSTANTS_TABLE global_constants_table +# define GLOBAL_AUTO_GLOBALS_TABLE global_auto_globals_table +#else +# define GLOBAL_FUNCTION_TABLE CG(function_table) +# define GLOBAL_CLASS_TABLE CG(class_table) +# define GLOBAL_AUTO_GLOBALS_TABLE CG(auto_globals) +# define GLOBAL_CONSTANTS_TABLE EG(zend_constants) +#endif #if defined(ZEND_WIN32) && ZEND_DEBUG BOOL WINAPI IsDebuggerPresent(VOID); @@ -211,16 +222,12 @@ ZEND_API int compiler_globals_id; ZEND_API int executor_globals_id; ZEND_API int alloc_globals_id; -#endif static HashTable *global_function_table = NULL; static HashTable *global_class_table = NULL; static HashTable *global_constants_table = NULL; static HashTable *global_auto_globals_table = NULL; -static HashTable *global_u_function_table = NULL; -static HashTable *global_u_class_table = NULL; -static HashTable *global_u_constants_table = NULL; -static HashTable *global_u_auto_globals_table = NULL; static HashTable *global_persistent_list = NULL; +#endif ZEND_API zend_utility_values zend_uv; @@ -373,7 +380,7 @@ if ( /* UTODO: clean this up */ - (expr->type == IS_STRING && + (expr->type == IS_STRING && (!strcmp(ucnv_getName(ZEND_U_CONVERTER(UG(output_encoding_conv)), &temp), ucnv_getName(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &temp))))) { *use_copy = 0; @@ -648,13 +655,12 @@ static void zval_copy_persistent(zval *zv) { - if (Z_TYPE_P(zv) == IS_UNICODE) { - Z_USTRVAL_P(zv) = zend_ustrndup(Z_USTRVAL_P(zv), Z_USTRLEN_P(zv)); - } else if (Z_TYPE_P(zv) == IS_STRING || Z_TYPE_P(zv) == IS_CONSTANT) { + if (Z_TYPE_P(zv) == IS_STRING || Z_TYPE_P(zv) == IS_CONSTANT) { UChar *ustr; ustr = malloc(UBYTES(Z_STRLEN_P(zv)+1)); u_charsToUChars(Z_STRVAL_P(zv), ustr, Z_STRLEN_P(zv)+1); + free(Z_STRVAL_P(zv)); Z_USTRVAL_P(zv) = ustr; if (Z_TYPE_P(zv) == IS_STRING) Z_TYPE_P(zv) = IS_UNICODE; } @@ -673,14 +679,14 @@ int n = function->common.num_args; while (n > 0) { - --n; - if (function->common.arg_info[n].name) { - free(function->common.arg_info[n].name); - } - if (function->common.arg_info[n].class_name) { + --n; + if (function->common.arg_info[n].name) { + free(function->common.arg_info[n].name); + } + if (function->common.arg_info[n].class_name) { free(function->common.arg_info[n].class_name); } - } + } free(function->common.arg_info); } } @@ -696,15 +702,7 @@ free(c->name); } -static void copy_u_zend_constant(zend_constant *c) -{ - c->name = (char*)zend_ustrndup((UChar*)c->name, c->name_len - 1); - if (!(c->flags & CONST_PERSISTENT)) { - zval_copy_ctor(&c->value); - } -} - -static void function_to_unicode(zend_function *func) +static void function_to_unicode(zend_function *func TSRMLS_DC) { if (func->common.function_name) { UChar *uname; @@ -737,26 +735,22 @@ } } -static void property_info_to_unicode(zend_property_info *info) +static void property_info_to_unicode(zend_property_info *info TSRMLS_DC) { if (info->name) { UChar *uname; uname = malloc(UBYTES(info->name_length+1)); u_charsToUChars(info->name, uname, info->name_length+1); + free(info->name); info->name = (char*)uname; info->h = zend_u_get_hash_value(IS_UNICODE, info->name, info->name_length+1); } } -static void zval_ptr_to_unicode(zval **zv) +static void zval_ptr_to_unicode(zval **zv TSRMLS_DC) { - zval *new_zv = malloc(sizeof(zval)); - - memcpy(new_zv, *zv, sizeof(zval)); - new_zv->refcount = 1; - zval_copy_persistent(new_zv); - *zv = new_zv; + zval_copy_persistent(*zv); } static void const_to_unicode(zend_constant *c) @@ -766,157 +760,36 @@ if (c->name) { uname = malloc(UBYTES(c->name_len)); u_charsToUChars(c->name, uname, c->name_len); + free(c->name); c->name = (char*)uname; } - zval_copy_persistent(&c->value); -} - -static void class_to_unicode(zend_class_entry **ce) -{ - zend_class_entry *new_ce = malloc(sizeof(zend_class_entry)); - zend_property_info tmp_info; - zval* tmp_zval; - - memcpy(new_ce, *ce, sizeof(zend_class_entry)); - (*ce)->u_twin = new_ce; - - /* Convert name to unicode */ - if (new_ce->name) { - UChar *uname = malloc(UBYTES(new_ce->name_length+1)); - - u_charsToUChars(new_ce->name, uname, new_ce->name_length+1); - new_ce->name = (char*)uname; - } - - /* Copy methods */ - zend_u_hash_init_ex(&new_ce->function_table, (*ce)->function_table.nNumOfElements, NULL, ZEND_U_FUNCTION_DTOR, 1, 1, 0); - { - Bucket *p = (*ce)->function_table.pListHead; - while (p != NULL) { - zend_function *src = (zend_function*)p->pData; - zend_function *target; - zend_function tmp_func = *src; - - function_to_unicode(&tmp_func); - - zend_hash_add(&new_ce->function_table, p->key.u.string, p->nKeyLength, &tmp_func, sizeof(zend_function), (void**)&target); - src->common.u_twin = target; - - p = p->pListNext; - } - } -/* - zend_hash_copy(&new_ce->function_table, &(*ce)->function_table, (copy_ctor_func_t) function_to_unicode, &tmp_func, sizeof(zend_function)); -*/ - /* Copy constants */ - zend_u_hash_init_ex(&new_ce->constants_table, (*ce)->constants_table.nNumOfElements, NULL, (*ce)->constants_table.pDestructor, 1, 1, 0); - zend_hash_copy(&new_ce->constants_table, &(*ce)->constants_table, (copy_ctor_func_t) zval_ptr_to_unicode, &tmp_zval, sizeof(zval*)); - - /* Copy properties */ - zend_u_hash_init_ex(&new_ce->properties_info, (*ce)->properties_info.nNumOfElements, NULL, (*ce)->properties_info.pDestructor/*(dtor_func_t)zend_destroy_property_info_internal*/, 1, 1, 0); - zend_hash_copy(&new_ce->properties_info, &(*ce)->properties_info, (copy_ctor_func_t) property_info_to_unicode, &tmp_info, sizeof(zend_property_info)); - - zend_u_hash_init_ex(&new_ce->default_properties, (*ce)->default_properties.nNumOfElements, NULL, (*ce)->default_properties.pDestructor, 1, 1, 0); - zend_hash_copy(&new_ce->default_properties, &(*ce)->default_properties, (copy_ctor_func_t) zval_ptr_to_unicode, &tmp_zval, sizeof(zval*)); - - zend_u_hash_init_ex(&new_ce->default_static_members, (*ce)->default_static_members.nNumOfElements, NULL, (*ce)->default_static_members.pDestructor, 1, 1, 0); - - { - HashPosition pos; - zval **p; + if (Z_TYPE(c->value) == IS_STRING || Z_TYPE(c->value) == IS_CONSTANT) { + UChar *ustr; - zend_hash_internal_pointer_reset_ex(&(*ce)->default_static_members, &pos); - while (zend_hash_get_current_data_ex(&(*ce)->default_static_members, (void**)&p, &pos) == SUCCESS) { - char *str_index; - uint str_length; - ulong num_index; - zval **q; - - zend_hash_get_current_key_ex(&(*ce)->default_static_members, &str_index, &str_length, &num_index, 0, &pos); - if ((*p)->is_ref && - (*ce)->parent && - zend_hash_find(&(*ce)->parent->default_static_members, str_index, str_length, (void**)&q) == SUCCESS && - *p == *q && - zend_hash_find(&new_ce->parent->u_twin->default_static_members, str_index, str_length, (void**)&q) == SUCCESS) { - (*q)->refcount++; - (*q)->is_ref = 1; - zend_hash_add(&new_ce->default_static_members, str_index, str_length, (void**)q, sizeof(zval*), NULL); - } else { - zval *q = *p; - zval_ptr_to_unicode(&q); - q->is_ref = 0; - zend_hash_add(&new_ce->default_static_members, str_index, str_length, (void**)&q, sizeof(zval*), NULL); - } - zend_hash_move_forward_ex(&(*ce)->default_static_members, &pos); - } + ustr = malloc(UBYTES(Z_STRLEN(c->value)+1)); + u_charsToUChars(Z_STRVAL(c->value), ustr, Z_STRLEN(c->value)+1); + Z_USTRVAL(c->value) = ustr; + if (Z_TYPE(c->value) == IS_STRING) Z_TYPE(c->value) = IS_UNICODE; } - - *ce = new_ce; } -static void fix_classes(HashTable *ht) { - Bucket *p = ht->pListHead; - Bucket *q; - - /* Fix parent classes */ - while (p != NULL) { - zend_class_entry *ce = *(zend_class_entry**)p->pData; - - if (ce->parent) { - ce->parent = ce->parent->u_twin; - } - if (ce->num_interfaces > 0 && ce->interfaces) { - int i = sizeof(zend_class_entry*)*ce->num_interfaces; - zend_class_entry **new_interfaces; - - new_interfaces = (zend_class_entry**)malloc(i); - memcpy(new_interfaces, ce->interfaces, i); - ce->interfaces = new_interfaces; - for (i = 0; i < ce->num_interfaces; i++) { - ce->interfaces[i] = ce->interfaces[i]->u_twin; - } - } - - q = ce->function_table.pListHead; - while (q != NULL) { - zend_function *f = (zend_function*)q->pData; - - if (f->common.scope) { - f->common.scope = f->common.scope->u_twin; - } - if (f->common.prototype) { - f->common.prototype = f->common.prototype->common.u_twin; - } - q = q->pListNext; - } - - if (ce->constructor) { - ce->constructor = ce->constructor->common.u_twin; - } else if (ce->destructor) { - ce->destructor = ce->destructor->common.u_twin; - } else if (ce->clone) { - ce->clone = ce->clone->common.u_twin; - } else if (ce->__get) { - ce->__get = ce->__get->common.u_twin; - } else if (ce->__set) { - ce->__set = ce->__set->common.u_twin; - } else if (ce->__unset) { - ce->__unset = ce->__unset->common.u_twin; - } else if (ce->__isset) { - ce->__isset = ce->__isset->common.u_twin; - } else if (ce->__call) { - ce->__call = ce->__call->common.u_twin; - } else if (ce->__tostring) { - ce->__tostring = ce->__tostring->common.u_twin; - } else if (ce->serialize_func) { - ce->serialize_func = ce->serialize_func->common.u_twin; - } else if (ce->unserialize_func) { - ce->unserialize_func = ce->unserialize_func->common.u_twin; - } +static void class_to_unicode(zend_class_entry **ce TSRMLS_DC) +{ + /* Convert name to unicode */ + if ((*ce)->name) { + UChar *uname = malloc(UBYTES((*ce)->name_length+1)); - p = p->pListNext; + u_charsToUChars((*ce)->name, uname, (*ce)->name_length+1); + free((*ce)->name); + (*ce)->name = (char*)uname; } + zend_hash_to_unicode(&(*ce)->function_table, (apply_func_t)function_to_unicode TSRMLS_CC); + (*ce)->function_table.pDestructor = ZEND_U_FUNCTION_DTOR; + zend_hash_to_unicode(&(*ce)->constants_table, (apply_func_t)zval_ptr_to_unicode TSRMLS_CC); + zend_hash_to_unicode(&(*ce)->properties_info, (apply_func_t)property_info_to_unicode TSRMLS_CC); + zend_hash_to_unicode(&(*ce)->default_properties, (apply_func_t)zval_ptr_to_unicode TSRMLS_CC); + zend_hash_to_unicode(&(*ce)->default_static_members, (apply_func_t)zval_ptr_to_unicode TSRMLS_CC); } #ifdef ZTS @@ -927,46 +800,23 @@ compiler_globals->compiled_filename = NULL; - compiler_globals->global_function_table = compiler_globals->function_table = (HashTable *) malloc(sizeof(HashTable)); - zend_u_hash_init_ex(compiler_globals->function_table, 100, NULL, ZEND_FUNCTION_DTOR, 1, 0, 0); + compiler_globals->function_table = (HashTable *) malloc(sizeof(HashTable)); + zend_u_hash_init_ex(compiler_globals->function_table, 100, NULL, ZEND_FUNCTION_DTOR, 1, UG(unicode), 0); zend_hash_copy(compiler_globals->function_table, global_function_table, NULL, &tmp_func, sizeof(zend_function)); - if (global_u_function_table) { - compiler_globals->global_u_function_table = (HashTable *) malloc(sizeof(HashTable)); - zend_u_hash_init_ex(compiler_globals->global_u_function_table, 100, NULL, ZEND_FUNCTION_DTOR, 1, 1, 0); - zend_hash_copy(compiler_globals->global_u_function_table, global_u_function_table, NULL, &tmp_func, sizeof(zend_function)); - } else { - compiler_globals->global_u_function_table = 0; - } - - compiler_globals->global_class_table = compiler_globals->class_table = (HashTable *) malloc(sizeof(HashTable)); - zend_u_hash_init_ex(compiler_globals->class_table, 10, NULL, ZEND_CLASS_DTOR, 1, 0, 0); + compiler_globals->class_table = (HashTable *) malloc(sizeof(HashTable)); + zend_u_hash_init_ex(compiler_globals->class_table, 10, NULL, ZEND_CLASS_DTOR, 1, UG(unicode), 0); zend_hash_copy(compiler_globals->class_table, global_class_table, (copy_ctor_func_t) zend_class_add_ref, &tmp_class, sizeof(zend_class_entry *)); - if (global_u_class_table) { - compiler_globals->global_u_class_table = (HashTable *) malloc(sizeof(HashTable)); - zend_u_hash_init_ex(compiler_globals->global_u_class_table, 10, NULL, ZEND_CLASS_DTOR, 1, 1, 0); - zend_hash_copy(compiler_globals->global_u_class_table, global_u_class_table, (copy_ctor_func_t) zend_class_add_ref, &tmp_class, sizeof(zend_class_entry *)); - } else { - compiler_globals->global_u_class_table = NULL; - } zend_set_default_compile_time_values(TSRMLS_C); CG(interactive) = 0; CG(literal_type) = IS_STRING; - compiler_globals->global_auto_globals_table = compiler_globals->auto_globals = (HashTable *) malloc(sizeof(HashTable)); - zend_u_hash_init_ex(compiler_globals->auto_globals, 8, NULL, NULL, 1, 0, 0); + compiler_globals->auto_globals = (HashTable *) malloc(sizeof(HashTable)); + zend_u_hash_init_ex(compiler_globals->auto_globals, 8, NULL, NULL, 1, UG(unicode), 0); zend_hash_copy(compiler_globals->auto_globals, global_auto_globals_table, NULL, NULL, sizeof(zend_auto_global) /* empty element */); - if (global_u_auto_globals_table) { - compiler_globals->global_u_auto_globals_table = (HashTable *) malloc(sizeof(HashTable)); - zend_u_hash_init_ex(compiler_globals->global_u_auto_globals_table, 8, NULL, NULL, 1, 1, 0); - zend_hash_copy(compiler_globals->global_u_auto_globals_table, global_u_auto_globals_table, NULL, NULL, sizeof(zend_auto_global) /* empty element */); - } else { - compiler_globals->global_u_auto_globals_table = NULL; - } - compiler_globals->last_static_member = zend_hash_num_elements(compiler_globals->class_table); if (compiler_globals->last_static_member) { compiler_globals->static_members = (HashTable**)calloc(compiler_globals->last_static_member, sizeof(HashTable*)); @@ -978,38 +828,17 @@ static void compiler_globals_dtor(zend_compiler_globals *compiler_globals TSRMLS_DC) { - if (compiler_globals->function_table != global_function_table && - compiler_globals->function_table != global_u_function_table) { - if (compiler_globals->global_function_table) { - zend_hash_destroy(compiler_globals->global_function_table); - free(compiler_globals->global_function_table); - } - if (compiler_globals->global_u_function_table) { - zend_hash_destroy(compiler_globals->global_u_function_table); - free(compiler_globals->global_u_function_table); - } - } - if (compiler_globals->class_table != global_class_table && - compiler_globals->class_table != global_u_class_table) { - if (compiler_globals->global_class_table) { - zend_hash_destroy(compiler_globals->global_class_table); - free(compiler_globals->global_class_table); - } - if (compiler_globals->global_u_class_table) { - zend_hash_destroy(compiler_globals->global_u_class_table); - free(compiler_globals->global_u_class_table); - } - } - if (compiler_globals->auto_globals != global_auto_globals_table && - compiler_globals->auto_globals != global_u_auto_globals_table) { - if (compiler_globals->global_auto_globals_table) { - zend_hash_destroy(compiler_globals->global_auto_globals_table); - free(compiler_globals->global_auto_globals_table); - } - if (compiler_globals->global_u_auto_globals_table) { - zend_hash_destroy(compiler_globals->global_u_auto_globals_table); - free(compiler_globals->global_u_auto_globals_table); - } + if (compiler_globals->function_table != GLOBAL_FUNCTION_TABLE) { + zend_hash_destroy(compiler_globals->function_table); + free(compiler_globals->function_table); + } + if (compiler_globals->class_table != GLOBAL_CLASS_TABLE) { + zend_hash_destroy(compiler_globals->class_table); + free(compiler_globals->class_table); + } + if (compiler_globals->auto_globals != GLOBAL_AUTO_GLOBALS_TABLE) { + zend_hash_destroy(compiler_globals->auto_globals); + free(compiler_globals->auto_globals); } if (compiler_globals->static_members) { free(compiler_globals->static_members); @@ -1020,20 +849,8 @@ static void executor_globals_ctor(zend_executor_globals *executor_globals TSRMLS_DC) { - zend_constant tmp_const; - zend_startup_constants(TSRMLS_C); - zend_copy_constants(EG(zend_constants), global_constants_table); - EG(global_constants_table) = EG(zend_constants); - - if (global_u_constants_table) { - EG(global_u_constants_table) = (HashTable *) malloc(sizeof(HashTable)); - zend_u_hash_init_ex(EG(global_u_constants_table), global_u_constants_table->nNumOfElements, NULL, ZEND_CONSTANT_DTOR, 1, 1, 0); - zend_hash_copy(EG(global_u_constants_table), global_u_constants_table, (copy_ctor_func_t) copy_u_zend_constant, &tmp_const, sizeof(zend_constant)); - } else { - EG(global_u_constants_table) = NULL; - } - + zend_copy_constants(EG(zend_constants), GLOBAL_CONSTANTS_TABLE); zend_init_rsrc_plist(TSRMLS_C); EG(lambda_count)=0; EG(user_error_handler) = NULL; @@ -1051,16 +868,9 @@ if (&executor_globals->persistent_list != global_persistent_list) { zend_destroy_rsrc_list(&executor_globals->persistent_list TSRMLS_CC); } - if (executor_globals->global_constants_table != global_constants_table && - executor_globals->global_u_constants_table != global_u_function_table) { - if (executor_globals->global_constants_table) { - zend_hash_destroy(executor_globals->global_constants_table); - free(executor_globals->global_constants_table); - } - if (executor_globals->global_u_constants_table) { - zend_hash_destroy(executor_globals->global_u_constants_table); - free(executor_globals->global_u_constants_table); - } + if (executor_globals->zend_constants != GLOBAL_CONSTANTS_TABLE) { + zend_hash_destroy(executor_globals->zend_constants); + free(executor_globals->zend_constants); } } @@ -1082,6 +892,7 @@ start_memory_manager(TSRMLS_C); } + #if defined(__FreeBSD__) || defined(__DragonFly__) /* FreeBSD and DragonFly floating point precision fix */ #include <floatingpoint.h> @@ -1201,15 +1012,15 @@ zend_version_info = strdup(ZEND_CORE_VERSION_INFO); zend_version_info_length = sizeof(ZEND_CORE_VERSION_INFO)-1; - global_function_table = (HashTable *) malloc(sizeof(HashTable)); - global_class_table = (HashTable *) malloc(sizeof(HashTable)); - global_auto_globals_table = (HashTable *) malloc(sizeof(HashTable)); - global_constants_table = (HashTable *) malloc(sizeof(HashTable)); - - zend_hash_init_ex(global_function_table, 100, NULL, ZEND_FUNCTION_DTOR, 1, 0); - zend_hash_init_ex(global_class_table, 10, NULL, ZEND_CLASS_DTOR, 1, 0); - zend_hash_init_ex(global_auto_globals_table, 8, NULL, (dtor_func_t) zend_auto_global_dtor, 1, 0); - zend_hash_init_ex(global_constants_table, 20, NULL, ZEND_CONSTANT_DTOR, 1, 0); + GLOBAL_FUNCTION_TABLE = (HashTable *) malloc(sizeof(HashTable)); + GLOBAL_CLASS_TABLE = (HashTable *) malloc(sizeof(HashTable)); + GLOBAL_AUTO_GLOBALS_TABLE = (HashTable *) malloc(sizeof(HashTable)); + GLOBAL_CONSTANTS_TABLE = (HashTable *) malloc(sizeof(HashTable)); + + zend_hash_init_ex(GLOBAL_FUNCTION_TABLE, 100, NULL, ZEND_FUNCTION_DTOR, 1, 0); + zend_hash_init_ex(GLOBAL_CLASS_TABLE, 10, NULL, ZEND_CLASS_DTOR, 1, 0); + zend_hash_init_ex(GLOBAL_AUTO_GLOBALS_TABLE, 8, NULL, (dtor_func_t) zend_auto_global_dtor, 1, 0); + zend_hash_init_ex(GLOBAL_CONSTANTS_TABLE, 20, NULL, ZEND_CONSTANT_DTOR, 1, 0); zend_hash_init_ex(&module_registry, 50, NULL, ZEND_MODULE_DTOR, 1, 0); zend_init_rsrc_list_dtors(); @@ -1235,22 +1046,16 @@ compiler_globals->function_table = (HashTable *) malloc(sizeof(HashTable)); compiler_globals->class_table = (HashTable *) malloc(sizeof(HashTable)); - *compiler_globals->function_table = *global_function_table; - *compiler_globals->class_table = *global_class_table; - compiler_globals->auto_globals = global_auto_globals_table; + *compiler_globals->function_table = *GLOBAL_FUNCTION_TABLE; + *compiler_globals->class_table = *GLOBAL_CLASS_TABLE; + compiler_globals->auto_globals = GLOBAL_AUTO_GLOBALS_TABLE; zend_hash_destroy(executor_globals->zend_constants); - *executor_globals->zend_constants = *global_constants_table; + *executor_globals->zend_constants = *GLOBAL_CONSTANTS_TABLE; #else unicode_globals_ctor(&unicode_globals TSRMLS_CC); scanner_globals_ctor(&ini_scanner_globals TSRMLS_CC); scanner_globals_ctor(&language_scanner_globals TSRMLS_CC); - - CG(function_table) = global_function_table; - CG(class_table) = global_class_table; - CG(auto_globals) = global_auto_globals_table; - EG(zend_constants) = global_constants_table; - zend_set_default_compile_time_values(TSRMLS_C); EG(user_error_handler) = NULL; EG(user_exception_handler) = NULL; @@ -1261,7 +1066,6 @@ #ifndef ZTS zend_init_rsrc_plist(TSRMLS_C); - global_persistent_list = &EG(persistent_list); #endif if (start_builtin_functions) { @@ -1290,44 +1094,34 @@ */ void zend_post_startup(TSRMLS_D) { - UConverter *old_runtime_encoding_conv; - UErrorCode status = U_ZERO_ERROR; - zend_function tmp_func; - zend_class_entry *tmp_class; - zend_constant tmp_const; #ifdef ZTS zend_compiler_globals *compiler_globals = ts_resource(compiler_globals_id); zend_executor_globals *executor_globals = ts_resource(executor_globals_id); - *global_function_table = *compiler_globals->function_table; - *global_class_table = *compiler_globals->class_table; - *global_constants_table = *executor_globals->zend_constants; + *GLOBAL_FUNCTION_TABLE = *compiler_globals->function_table; + *GLOBAL_CLASS_TABLE = *compiler_globals->class_table; + *GLOBAL_CONSTANTS_TABLE = *executor_globals->zend_constants; #endif /* Make copies of HashTables with UNICODE */ - old_runtime_encoding_conv = UG(runtime_encoding_conv); - UG(runtime_encoding_conv) = ucnv_open("ASCII", &status); - - global_u_function_table = (HashTable *) malloc(sizeof(HashTable)); - zend_u_hash_init_ex(global_u_function_table, global_function_table->nNumOfElements, NULL, ZEND_U_FUNCTION_DTOR, 1, 1, 0); - zend_hash_copy(global_u_function_table, global_function_table, (copy_ctor_func_t) function_to_unicode, &tmp_func, sizeof(zend_function)); - - global_u_class_table = (HashTable *) malloc(sizeof(HashTable)); - zend_u_hash_init_ex(global_u_class_table, global_class_table->nNumOfElements, NULL, ZEND_CLASS_DTOR, 1, 1, 0); - zend_hash_copy(global_u_class_table, global_class_table, (copy_ctor_func_t) class_to_unicode, &tmp_class, sizeof(zend_class_entry *)); - fix_classes(global_u_class_table); - - global_u_auto_globals_table = (HashTable *) malloc(sizeof(HashTable)); - zend_u_hash_init_ex(global_u_auto_globals_table, global_auto_globals_table->nNumOfElements, NULL, NULL, 1, 1, 0); - zend_hash_copy(global_u_auto_globals_table, global_auto_globals_table, NULL, NULL, sizeof(zend_auto_global)); - - global_u_constants_table = (HashTable *) malloc(sizeof(HashTable)); - zend_u_hash_init_ex(global_u_constants_table, global_constants_table->nNumOfElements, NULL, ZEND_U_CONSTANT_DTOR, 1, 1, 0); - zend_hash_copy(global_u_constants_table, global_constants_table, (copy_ctor_func_t) const_to_unicode, &tmp_const, sizeof(zend_constant)); + if (UG(unicode)) { + UConverter *old_runtime_encoding_conv; + UErrorCode status = U_ZERO_ERROR; + + old_runtime_encoding_conv = UG(runtime_encoding_conv); + UG(runtime_encoding_conv) = ucnv_open("ASCII", &status); + + zend_hash_to_unicode(GLOBAL_FUNCTION_TABLE, (apply_func_t)function_to_unicode TSRMLS_CC); + GLOBAL_FUNCTION_TABLE->pDestructor = ZEND_U_FUNCTION_DTOR; + zend_hash_to_unicode(GLOBAL_CLASS_TABLE, (apply_func_t)class_to_unicode TSRMLS_CC); + zend_hash_to_unicode(GLOBAL_AUTO_GLOBALS_TABLE, NULL TSRMLS_CC); + zend_hash_to_unicode(GLOBAL_CONSTANTS_TABLE, (apply_func_t)const_to_unicode TSRMLS_CC); + GLOBAL_CONSTANTS_TABLE->pDestructor = ZEND_U_CONSTANT_DTOR; - ucnv_close(UG(runtime_encoding_conv)); - UG(runtime_encoding_conv) = old_runtime_encoding_conv; + ucnv_close(UG(runtime_encoding_conv)); + UG(runtime_encoding_conv) = old_runtime_encoding_conv; + } #ifdef ZTS zend_destroy_rsrc_list(&EG(persistent_list) TSRMLS_CC); @@ -1347,54 +1141,29 @@ #ifdef ZEND_WIN32 zend_shutdown_timeout_thread(); #endif - if (global_persistent_list) { - zend_destroy_rsrc_list(global_persistent_list TSRMLS_CC); - } + zend_destroy_rsrc_list(&EG(persistent_list) TSRMLS_CC); zend_hash_graceful_reverse_destroy(&module_registry); - zend_hash_destroy(global_function_table); - zend_hash_destroy(global_class_table); - if (global_u_function_table) { - zend_hash_destroy(global_u_function_table); - } - if (global_u_class_table) { - zend_hash_destroy(global_u_class_table); - } + zend_hash_destroy(GLOBAL_FUNCTION_TABLE); + zend_hash_destroy(GLOBAL_CLASS_TABLE); - zend_hash_destroy(global_auto_globals_table); - free(global_auto_globals_table); - if (global_u_auto_globals_table) { - zend_hash_destroy(global_u_auto_globals_table); - free(global_u_auto_globals_table); - } + zend_hash_destroy(GLOBAL_AUTO_GLOBALS_TABLE); + free(GLOBAL_AUTO_GLOBALS_TABLE); zend_shutdown_extensions(TSRMLS_C); free(zend_version_info); - zend_hash_destroy(global_constants_table); - free(global_constants_table); - if (global_u_constants_table) { - zend_hash_destroy(global_u_constants_table); - free(global_u_constants_table); - } - - free(global_function_table); - free(global_class_table); - if (global_u_function_table) { - free(global_u_function_table); - } - if (global_u_class_table) { - free(global_u_class_table); - } + free(GLOBAL_FUNCTION_TABLE); + free(GLOBAL_CLASS_TABLE); + + zend_hash_destroy(GLOBAL_CONSTANTS_TABLE); + free(GLOBAL_CONSTANTS_TABLE); + #ifdef ZTS - global_function_table = NULL; - global_u_function_table = NULL; - global_class_table = NULL; - global_u_class_table = NULL; - global_auto_globals_table = NULL; - global_u_auto_globals_table = NULL; - global_constants_table = NULL; - global_u_constants_table = NULL; + GLOBAL_FUNCTION_TABLE = NULL; + GLOBAL_CLASS_TABLE = NULL; + GLOBAL_AUTO_GLOBALS_TABLE = NULL; + GLOBAL_CONSTANTS_TABLE = NULL; #else unicode_globals_dtor(&unicode_globals TSRMLS_CC); #endif @@ -1489,19 +1258,7 @@ void zend_activate(TSRMLS_D) { -#ifdef ZTS - CG(function_table) = UG(unicode)?CG(global_u_function_table):CG(global_function_table); - CG(class_table) = UG(unicode)?CG(global_u_class_table):CG(global_class_table); - CG(auto_globals) = UG(unicode)?CG(global_u_auto_globals_table):CG(global_auto_globals_table); - EG(zend_constants) = UG(unicode)?EG(global_u_constants_table):EG(global_constants_table); -#else - CG(function_table) = UG(unicode)?global_u_function_table:global_function_table; - CG(class_table) = UG(unicode)?global_u_class_table:global_class_table; - CG(auto_globals) = UG(unicode)?global_u_auto_globals_table:global_auto_globals_table; - EG(zend_constants) = UG(unicode)?global_u_constants_table:global_constants_table; -#endif init_unicode_request_globals(TSRMLS_C); - init_unicode_strings(); init_compiler(TSRMLS_C); init_executor(TSRMLS_C); @@ -1730,7 +1487,7 @@ if (!EG(user_error_handler)) { EG(user_error_handler) = orig_user_error_handler; - } + } else { zval_ptr_dtor(&orig_user_error_handler); } http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend.h?r1=1.309&r2=1.310&diff_format=u Index: ZendEngine2/zend.h diff -u ZendEngine2/zend.h:1.309 ZendEngine2/zend.h:1.310 --- ZendEngine2/zend.h:1.309 Sun Feb 5 23:26:55 2006 +++ ZendEngine2/zend.h Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend.h,v 1.309 2006/02/05 23:26:55 helly Exp $ */ +/* $Id: zend.h,v 1.310 2006/02/13 10:23:57 dmitry Exp $ */ #ifndef ZEND_H #define ZEND_H @@ -373,8 +373,6 @@ char *doc_comment; zend_uint doc_comment_len; - zend_class_entry *u_twin; - struct _zend_module_entry *module; }; @@ -541,7 +539,7 @@ void zenderror(char *error); /* The following #define is used for code duality in PHP for Engine 1 & 2 */ -#define ZEND_STANDARD_CLASS_DEF_PTR U_CLASS_ENTRY(zend_standard_class_def) +#define ZEND_STANDARD_CLASS_DEF_PTR zend_standard_class_def extern ZEND_API zend_class_entry *zend_standard_class_def; extern ZEND_API zend_utility_values zend_uv; extern ZEND_API zval zval_used_for_init; http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_API.c?r1=1.338&r2=1.339&diff_format=u Index: ZendEngine2/zend_API.c diff -u ZendEngine2/zend_API.c:1.338 ZendEngine2/zend_API.c:1.339 --- ZendEngine2/zend_API.c:1.338 Mon Feb 6 20:36:51 2006 +++ ZendEngine2/zend_API.c Mon Feb 13 10:23:57 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_API.c,v 1.338 2006/02/06 20:36:51 tony2001 Exp $ */ +/* $Id: zend_API.c,v 1.339 2006/02/13 10:23:57 dmitry Exp $ */ #include "zend.h" #include "zend_execute.h" @@ -1164,7 +1164,7 @@ ZEND_API int _object_init(zval *arg ZEND_FILE_LINE_DC TSRMLS_DC) { - return _object_init_ex(arg, U_CLASS_ENTRY(zend_standard_class_def) ZEND_FILE_LINE_RELAY_CC TSRMLS_CC); + return _object_init_ex(arg, zend_standard_class_def ZEND_FILE_LINE_RELAY_CC TSRMLS_CC); } http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_API.h?r1=1.229&r2=1.230&diff_format=u Index: ZendEngine2/zend_API.h diff -u ZendEngine2/zend_API.h:1.229 ZendEngine2/zend_API.h:1.230 --- ZendEngine2/zend_API.h:1.229 Tue Jan 17 12:18:51 2006 +++ ZendEngine2/zend_API.h Mon Feb 13 10:23:57 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_API.h,v 1.229 2006/01/17 12:18:51 dmitry Exp $ */ +/* $Id: zend_API.h,v 1.230 2006/02/13 10:23:57 dmitry Exp $ */ #ifndef ZEND_API_H #define ZEND_API_H @@ -114,8 +114,6 @@ #endif -#define U_CLASS_ENTRY(ce) ((UG(unicode)&&ce)?ce->u_twin:ce) - #define INIT_CLASS_ENTRY(class_container, class_name, functions) INIT_OVERLOADED_CLASS_ENTRY(class_container, class_name, functions, NULL, NULL, NULL) #define INIT_OVERLOADED_CLASS_ENTRY_EX(class_container, class_name, functions, handle_fcall, handle_propget, handle_propset, handle_propunset, handle_propisset) \ @@ -145,7 +143,6 @@ class_container.interfaces = NULL; \ class_container.get_iterator = NULL; \ class_container.iterator_funcs.funcs = NULL; \ - class_container.u_twin = NULL; \ class_container.module = NULL; \ } http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_compile.h?r1=1.329&r2=1.330&diff_format=u Index: ZendEngine2/zend_compile.h diff -u ZendEngine2/zend_compile.h:1.329 ZendEngine2/zend_compile.h:1.330 --- ZendEngine2/zend_compile.h:1.329 Sun Feb 5 23:26:55 2006 +++ ZendEngine2/zend_compile.h Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.h,v 1.329 2006/02/05 23:26:55 helly Exp $ */ +/* $Id: zend_compile.h,v 1.330 2006/02/13 10:23:57 dmitry Exp $ */ #ifndef ZEND_COMPILE_H #define ZEND_COMPILE_H @@ -179,7 +179,6 @@ zend_arg_info *arg_info; zend_bool pass_rest_by_reference; unsigned char return_reference; - union _zend_function *u_twin; /* END of common elements */ zend_uint *refcount; @@ -234,7 +233,6 @@ zend_arg_info *arg_info; zend_bool pass_rest_by_reference; unsigned char return_reference; - union _zend_function *u_twin; /* END of common elements */ void (*handler)(INTERNAL_FUNCTION_PARAMETERS); @@ -257,7 +255,6 @@ zend_arg_info *arg_info; zend_bool pass_rest_by_reference; unsigned char return_reference; - union _zend_function *u_twin; } common; zend_op_array op_array; http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_exceptions.c?r1=1.95&r2=1.96&diff_format=u Index: ZendEngine2/zend_exceptions.c diff -u ZendEngine2/zend_exceptions.c:1.95 ZendEngine2/zend_exceptions.c:1.96 --- ZendEngine2/zend_exceptions.c:1.95 Tue Jan 17 12:18:51 2006 +++ ZendEngine2/zend_exceptions.c Mon Feb 13 10:23:57 2006 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_exceptions.c,v 1.95 2006/01/17 12:18:51 dmitry Exp $ */ +/* $Id: zend_exceptions.c,v 1.96 2006/02/13 10:23:57 dmitry Exp $ */ #include "zend.h" #include "zend_API.h" @@ -93,9 +93,9 @@ trace->refcount = 0; zend_fetch_debug_backtrace(trace, skip_top_traces, 0 TSRMLS_CC); - zend_update_property_rt_string(U_CLASS_ENTRY(default_exception_ce), &obj, "file", sizeof("file")-1, zend_get_executed_filename(TSRMLS_C) TSRMLS_CC); - zend_update_property_long(U_CLASS_ENTRY(default_exception_ce), &obj, "line", sizeof("line")-1, zend_get_executed_lineno(TSRMLS_C) TSRMLS_CC); - zend_update_property(U_CLASS_ENTRY(default_exception_ce), &obj, "trace", sizeof("trace")-1, trace TSRMLS_CC); + zend_update_property_rt_string(default_exception_ce, &obj, "file", sizeof("file")-1, zend_get_executed_filename(TSRMLS_C) TSRMLS_CC); + zend_update_property_long(default_exception_ce, &obj, "line", sizeof("line")-1, zend_get_executed_lineno(TSRMLS_C) TSRMLS_CC); + zend_update_property(default_exception_ce, &obj, "trace", sizeof("trace")-1, trace TSRMLS_CC); return obj.value.obj; } @@ -139,22 +139,22 @@ if (message) { if (message_type == IS_UNICODE) { - zend_update_property_unicodel(U_CLASS_ENTRY(default_exception_ce), object, "message", sizeof("message")-1, message, message_len TSRMLS_CC); + zend_update_property_unicodel(default_exception_ce, object, "message", sizeof("message")-1, message, message_len TSRMLS_CC); } else if (UG(unicode)) { UErrorCode status = U_ZERO_ERROR; UChar *u_str; int32_t u_len; zend_convert_to_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &u_str, &u_len, message, message_len, &status); - zend_update_property_unicodel(U_CLASS_ENTRY(default_exception_ce), object, "message", sizeof("message")-1, u_str, u_len TSRMLS_CC); + zend_update_property_unicodel(default_exception_ce, object, "message", sizeof("message")-1, u_str, u_len TSRMLS_CC); efree(u_str); } else { - zend_update_property_stringl(U_CLASS_ENTRY(default_exception_ce), object, "message", sizeof("message")-1, message, message_len TSRMLS_CC); + zend_update_property_stringl(default_exception_ce, object, "message", sizeof("message")-1, message, message_len TSRMLS_CC); } } if (code) { - zend_update_property_long(U_CLASS_ENTRY(default_exception_ce), object, "code", sizeof("code")-1, code TSRMLS_CC); + zend_update_property_long(default_exception_ce, object, "code", sizeof("code")-1, code TSRMLS_CC); } } /* }}} */ @@ -178,36 +178,36 @@ if (message) { if (message_type == IS_UNICODE) { - zend_update_property_unicodel(U_CLASS_ENTRY(default_exception_ce), object, "message", sizeof("message")-1, message, message_len TSRMLS_CC); + zend_update_property_unicodel(default_exception_ce, object, "message", sizeof("message")-1, message, message_len TSRMLS_CC); } else if (UG(unicode)) { UErrorCode status = U_ZERO_ERROR; UChar *u_str; int32_t u_len; zend_convert_to_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &u_str, &u_len, message, message_len, &status); - zend_update_property_unicodel(U_CLASS_ENTRY(default_exception_ce), object, "message", sizeof("message")-1, u_str, u_len TSRMLS_CC); + zend_update_property_unicodel(default_exception_ce, object, "message", sizeof("message")-1, u_str, u_len TSRMLS_CC); efree(u_str); } else { - zend_update_property_stringl(U_CLASS_ENTRY(default_exception_ce), object, "message", sizeof("message")-1, message, message_len TSRMLS_CC); + zend_update_property_stringl(default_exception_ce, object, "message", sizeof("message")-1, message, message_len TSRMLS_CC); } } if (code) { - zend_update_property_long(U_CLASS_ENTRY(default_exception_ce), object, "code", sizeof("code")-1, code TSRMLS_CC); + zend_update_property_long(default_exception_ce, object, "code", sizeof("code")-1, code TSRMLS_CC); } - zend_update_property_long(U_CLASS_ENTRY(default_exception_ce), object, "severity", sizeof("severity")-1, severity TSRMLS_CC); + zend_update_property_long(default_exception_ce, object, "severity", sizeof("severity")-1, severity TSRMLS_CC); if (argc >= 4) { if (file_type == IS_UNICODE) { - zend_update_property_unicodel(U_CLASS_ENTRY(default_exception_ce), object, "file", sizeof("file")-1, filename, filename_len TSRMLS_CC); + zend_update_property_unicodel(default_exception_ce, object, "file", sizeof("file")-1, filename, filename_len TSRMLS_CC); } else { - zend_update_property_stringl(U_CLASS_ENTRY(default_exception_ce), object, "file", sizeof("file")-1, filename, filename_len TSRMLS_CC); + zend_update_property_stringl(default_exception_ce, object, "file", sizeof("file")-1, filename, filename_len TSRMLS_CC); } if (argc < 5) { lineno = 0; /* invalidate lineno */ } - zend_update_property_long(U_CLASS_ENTRY(default_exception_ce), object, "line", sizeof("line")-1, lineno TSRMLS_CC); + zend_update_property_long(default_exception_ce, object, "line", sizeof("line")-1, lineno TSRMLS_CC); } } /* }}} */ @@ -221,7 +221,7 @@ { zval *value; - value = zend_read_property(U_CLASS_ENTRY(default_exception_ce), object, name, name_len, 0 TSRMLS_CC); + value = zend_read_property(default_exception_ce, object, name, name_len, 0 TSRMLS_CC); *return_value = *value; zval_copy_ctor(return_value); @@ -524,7 +524,7 @@ char *res = estrdup(""), **str = &res, *s_tmp; int res_len = 0, *len = &res_len, num = 0; - trace = zend_read_property(U_CLASS_ENTRY(default_exception_ce), getThis(), "trace", sizeof("trace")-1, 1 TSRMLS_CC); + trace = zend_read_property(default_exception_ce, getThis(), "trace", sizeof("trace")-1, 1 TSRMLS_CC); zend_hash_apply_with_arguments(Z_ARRVAL_P(trace), (apply_func_args_t)_build_trace_string, 3, str, len, &num); s_tmp = emalloc(1 + MAX_LENGTH_OF_LONG + 7 + 1); @@ -596,7 +596,7 @@ /* We store the result in the private property string so we can access * the result in uncaught exception handlers without memleaks. */ - zend_update_property_string(U_CLASS_ENTRY(default_exception_ce), getThis(), "string", sizeof("string")-1, str TSRMLS_CC); + zend_update_property_string(default_exception_ce, getThis(), "string", sizeof("string")-1, str TSRMLS_CC); if (trace) { zval_ptr_dtor(&trace); @@ -678,12 +678,12 @@ ZEND_API zend_class_entry *zend_exception_get_default(TSRMLS_D) { - return U_CLASS_ENTRY(default_exception_ce); + return default_exception_ce; } ZEND_API zend_class_entry *zend_get_error_exception(TSRMLS_D) { - return U_CLASS_ENTRY(error_exception_ce); + return error_exception_ce; } @@ -693,21 +693,21 @@ MAKE_STD_ZVAL(ex); if (exception_ce) { - if (!instanceof_function(exception_ce, U_CLASS_ENTRY(default_exception_ce) TSRMLS_CC)) { + if (!instanceof_function(exception_ce, default_exception_ce TSRMLS_CC)) { zend_error(E_NOTICE, "Exceptions must be derived from the Exception base class"); - exception_ce = U_CLASS_ENTRY(default_exception_ce); + exception_ce = default_exception_ce; } } else { - exception_ce = U_CLASS_ENTRY(default_exception_ce); + exception_ce = default_exception_ce; } object_init_ex(ex, exception_ce); if (message) { - zend_update_property_rt_string(U_CLASS_ENTRY(default_exception_ce), ex, "message", sizeof("message")-1, message TSRMLS_CC); + zend_update_property_rt_string(default_exception_ce, ex, "message", sizeof("message")-1, message TSRMLS_CC); } if (code) { - zend_update_property_long(U_CLASS_ENTRY(default_exception_ce), ex, "code", sizeof("code")-1, code TSRMLS_CC); + zend_update_property_long(default_exception_ce, ex, "code", sizeof("code")-1, code TSRMLS_CC); } zend_throw_exception_internal(ex TSRMLS_CC); @@ -733,7 +733,7 @@ ZEND_API zval * zend_throw_error_exception(zend_class_entry *exception_ce, char *message, long code, int severity TSRMLS_DC) { zval *ex = zend_throw_exception(exception_ce, message, code TSRMLS_CC); - zend_update_property_long(U_CLASS_ENTRY(default_exception_ce), ex, "severity", sizeof("severity")-1, severity TSRMLS_CC); + zend_update_property_long(default_exception_ce, ex, "severity", sizeof("severity")-1, severity TSRMLS_CC); return ex; } @@ -750,7 +750,7 @@ ZEND_API void zend_exception_error(zval *exception TSRMLS_DC) { zend_class_entry *ce_exception = Z_OBJCE_P(exception); - if (instanceof_function(ce_exception, U_CLASS_ENTRY(default_exception_ce) TSRMLS_CC)) { + if (instanceof_function(ce_exception, default_exception_ce TSRMLS_CC)) { zval *str, *file, *line; EG(exception) = NULL; @@ -760,16 +760,16 @@ if (Z_TYPE_P(str) != IS_STRING) { zend_error(E_WARNING, "%v::__toString() must return a string", ce_exception->name); } else { - zend_update_property_string(U_CLASS_ENTRY(default_exception_ce), exception, "string", sizeof("string")-1, EG(exception) ? ce_exception->name : Z_STRVAL_P(str) TSRMLS_CC); + zend_update_property_string(default_exception_ce, exception, "string", sizeof("string")-1, EG(exception) ? ce_exception->name : Z_STRVAL_P(str) TSRMLS_CC); } } zval_ptr_dtor(&str); if (EG(exception)) { /* do the best we can to inform about the inner exception */ - if (instanceof_function(ce_exception, U_CLASS_ENTRY(default_exception_ce) TSRMLS_CC)) { - file = zend_read_property(U_CLASS_ENTRY(default_exception_ce), EG(exception), "file", sizeof("file")-1, 1 TSRMLS_CC); - line = zend_read_property(U_CLASS_ENTRY(default_exception_ce), EG(exception), "line", sizeof("line")-1, 1 TSRMLS_CC); + if (instanceof_function(ce_exception, default_exception_ce TSRMLS_CC)) { + file = zend_read_property(default_exception_ce, EG(exception), "file", sizeof("file")-1, 1 TSRMLS_CC); + line = zend_read_property(default_exception_ce, EG(exception), "line", sizeof("line")-1, 1 TSRMLS_CC); } else { file = NULL; line = NULL; @@ -777,9 +777,9 @@ zend_error_va(E_WARNING, file ? Z_STRVAL_P(file) : NULL, line ? Z_LVAL_P(line) : 0, "Uncaught %v in exception handling during call to %v::__tostring()", Z_OBJCE_P(EG(exception))->name, ce_exception->name); } - str = zend_read_property(U_CLASS_ENTRY(default_exception_ce), exception, "string", sizeof("string")-1, 1 TSRMLS_CC); - file = zend_read_property(U_CLASS_ENTRY(default_exception_ce), exception, "file", sizeof("file")-1, 1 TSRMLS_CC); - line = zend_read_property(U_CLASS_ENTRY(default_exception_ce), exception, "line", sizeof("line")-1, 1 TSRMLS_CC); + str = zend_read_property(default_exception_ce, exception, "string", sizeof("string")-1, 1 TSRMLS_CC); + file = zend_read_property(default_exception_ce, exception, "file", sizeof("file")-1, 1 TSRMLS_CC); + line = zend_read_property(default_exception_ce, exception, "line", sizeof("line")-1, 1 TSRMLS_CC); if (Z_TYPE_P(file) == IS_UNICODE) { zval copy; @@ -806,7 +806,7 @@ exception_ce = Z_OBJCE_P(exception); - if (!exception_ce || !instanceof_function(exception_ce, U_CLASS_ENTRY(default_exception_ce) TSRMLS_CC)) { + if (!exception_ce || !instanceof_function(exception_ce, default_exception_ce TSRMLS_CC)) { zend_error(E_ERROR, "Exceptions must be valid objects derived from the Exception base class"); } zend_throw_exception_internal(exception TSRMLS_CC); http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_globals.h?r1=1.145&r2=1.146&diff_format=u Index: ZendEngine2/zend_globals.h diff -u ZendEngine2/zend_globals.h:1.145 ZendEngine2/zend_globals.h:1.146 --- ZendEngine2/zend_globals.h:1.145 Wed Jan 4 23:52:06 2006 +++ ZendEngine2/zend_globals.h Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_globals.h,v 1.145 2006/01/04 23:52:06 andi Exp $ */ +/* $Id: zend_globals.h,v 1.146 2006/02/13 10:23:57 dmitry Exp $ */ #ifndef ZEND_GLOBALS_H #define ZEND_GLOBALS_H @@ -137,13 +137,6 @@ char *script_encoding; #ifdef ZTS - HashTable *global_function_table; - HashTable *global_class_table; - HashTable *global_auto_globals_table; - HashTable *global_u_function_table; - HashTable *global_u_class_table; - HashTable *global_u_auto_globals_table; - HashTable **static_members; int last_static_member; #endif @@ -236,11 +229,6 @@ zend_property_info std_property_info; -#ifdef ZTS - HashTable *global_constants_table; - HashTable *global_u_constants_table; -#endif - void *reserved[ZEND_MAX_RESERVED_RESOURCES]; }; http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_hash.c?r1=1.129&r2=1.130&diff_format=u Index: ZendEngine2/zend_hash.c diff -u ZendEngine2/zend_hash.c:1.129 ZendEngine2/zend_hash.c:1.130 --- ZendEngine2/zend_hash.c:1.129 Mon Feb 6 20:36:51 2006 +++ ZendEngine2/zend_hash.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_hash.c,v 1.129 2006/02/06 20:36:51 tony2001 Exp $ */ +/* $Id: zend_hash.c,v 1.130 2006/02/13 10:23:57 dmitry Exp $ */ #include "zend.h" #include "zend_operators.h" @@ -49,16 +49,16 @@ #define UNICODE_KEY(ht, type, arKey, nKeyLength, tmp) \ if (ht->unicode && type == IS_STRING) { \ - UErrorCode status = U_ZERO_ERROR; \ + UErrorCode status = U_ZERO_ERROR; \ UChar *u = NULL; \ int32_t u_len; \ TSRMLS_FETCH(); \ zend_convert_to_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &u, &u_len, (char*)arKey, nKeyLength-1, &status); \ - if (U_FAILURE(status)) { \ + if (U_FAILURE(status)) { \ /* UTODO: */ \ - } \ - type = IS_UNICODE; \ - tmp = arKey = u; \ + } \ + type = IS_UNICODE; \ + tmp = arKey = u; \ } @@ -1781,6 +1781,57 @@ p = p->pListLast; } } + +ZEND_API void zend_hash_to_unicode(HashTable *ht, apply_func_t apply_func TSRMLS_DC) +{ + Bucket **p; + uint nIndex; + + IS_CONSISTENT(ht); + if (ht->unicode) { + return; + } + + ht->unicode = 1; + memset(ht->arBuckets, 0, ht->nTableSize * sizeof(Bucket *)); + p = &ht->pListHead; + while ((*p) != NULL) { + if ((*p)->key.type == IS_STRING) { + UErrorCode status = U_ZERO_ERROR; + UChar *u = NULL; + int32_t u_len; + Bucket *q; + + zend_convert_to_unicode(ZEND_U_CONVERTER(UG(runtime_encoding_conv)), &u, &u_len, (char*)(*p)->key.u.string, (*p)->nKeyLength-1, &status); + + q = (Bucket *) pemalloc(sizeof(Bucket)-sizeof(q->key.u)+((u_len+1)*2), ht->persistent); + memcpy(q, *p, sizeof(Bucket)-sizeof(q->key.u)); + memcpy(q->key.u.unicode, u, (u_len+1)*2); + q->key.type = IS_UNICODE; + q->nKeyLength = u_len+1; + q->h = zend_u_inline_hash_func(IS_UNICODE, (void*)q->key.u.unicode, q->nKeyLength); + if ((*p)->pData == &(*p)->pDataPtr) { + q->pData = &q->pDataPtr; + } + efree(u); + pefree(*p, ht->persistent); + *p = q; + if (q->pListNext) { + q->pListNext->pListLast = q; + } else { + ht->pListTail = q; + } + } + nIndex = (*p)->h & ht->nTableMask; + CONNECT_TO_BUCKET_DLLIST(*p, ht->arBuckets[nIndex]); + ht->arBuckets[nIndex] = *p; + if (apply_func) { + apply_func((*p)->pData TSRMLS_CC); + } + p = &(*p)->pListNext; + } +} + #endif /* http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_hash.h?r1=1.82&r2=1.83&diff_format=u Index: ZendEngine2/zend_hash.h diff -u ZendEngine2/zend_hash.h:1.82 ZendEngine2/zend_hash.h:1.83 --- ZendEngine2/zend_hash.h:1.82 Tue Jan 17 12:18:52 2006 +++ ZendEngine2/zend_hash.h Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_hash.h,v 1.82 2006/01/17 12:18:52 dmitry Exp $ */ +/* $Id: zend_hash.h,v 1.83 2006/02/13 10:23:57 dmitry Exp $ */ #ifndef ZEND_HASH_H #define ZEND_HASH_H @@ -175,6 +175,7 @@ */ ZEND_API void zend_hash_reverse_apply(HashTable *ht, apply_func_t apply_func TSRMLS_DC); +ZEND_API void zend_hash_to_unicode(HashTable *ht, apply_func_t apply_func TSRMLS_DC); /* Deletes */ ZEND_API int zend_hash_del_key_or_index(HashTable *ht, char *arKey, uint nKeyLength, ulong h, int flag); http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_ini.h?r1=1.35&r2=1.36&diff_format=u Index: ZendEngine2/zend_ini.h diff -u ZendEngine2/zend_ini.h:1.35 ZendEngine2/zend_ini.h:1.36 --- ZendEngine2/zend_ini.h:1.35 Wed Jan 4 23:52:06 2006 +++ ZendEngine2/zend_ini.h Mon Feb 13 10:23:57 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_ini.h,v 1.35 2006/01/04 23:52:06 andi Exp $ */ +/* $Id: zend_ini.h,v 1.36 2006/02/13 10:23:57 dmitry Exp $ */ #ifndef ZEND_INI_H #define ZEND_INI_H @@ -193,6 +193,7 @@ typedef void (*zend_ini_parser_cb_t)(zval *arg1, zval *arg2, int callback_type, void *arg); BEGIN_EXTERN_C() ZEND_API int zend_parse_ini_file(zend_file_handle *fh, zend_bool unbuffered_errors, zend_ini_parser_cb_t ini_parser_cb, void *arg); +ZEND_API int zend_parse_ini_string(char *str, zend_bool unbuffered_errors, zend_ini_parser_cb_t ini_parser_cb, void *arg); END_EXTERN_C() #define ZEND_INI_PARSER_ENTRY 1 http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_ini_parser.y?r1=1.42&r2=1.43&diff_format=u Index: ZendEngine2/zend_ini_parser.y diff -u ZendEngine2/zend_ini_parser.y:1.42 ZendEngine2/zend_ini_parser.y:1.43 --- ZendEngine2/zend_ini_parser.y:1.42 Wed Jan 4 23:52:06 2006 +++ ZendEngine2/zend_ini_parser.y Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_ini_parser.y,v 1.42 2006/01/04 23:52:06 andi Exp $ */ +/* $Id: zend_ini_parser.y,v 1.43 2006/02/13 10:23:57 dmitry Exp $ */ #define DEBUG_CFG_PARSER 0 #include "zend.h" @@ -157,10 +157,14 @@ TSRMLS_FETCH(); currently_parsed_filename = zend_ini_scanner_get_filename(TSRMLS_C); - error_buf_len = 128+strlen(currently_parsed_filename); /* should be more than enough */ - error_buf = (char *) emalloc(error_buf_len); + if (currently_parsed_filename) { + error_buf_len = 128+strlen(currently_parsed_filename); /* should be more than enough */ + error_buf = (char *) emalloc(error_buf_len); - sprintf(error_buf, "Error parsing %s on line %d\n", currently_parsed_filename, zend_ini_scanner_get_lineno(TSRMLS_C)); + sprintf(error_buf, "Error parsing %s on line %d\n", currently_parsed_filename, zend_ini_scanner_get_lineno(TSRMLS_C)); + } else { + error_buf = estrdup("Invalid configuration directive\n"); + } if (CG(ini_parser_unbuffered_errors)) { #ifdef PHP_WIN32 @@ -202,6 +206,30 @@ } +ZEND_API int zend_parse_ini_string(char *str, zend_bool unbuffered_errors, zend_ini_parser_cb_t ini_parser_cb, void *arg) +{ + int len; + zend_ini_parser_param ini_parser_param; + TSRMLS_FETCH(); + + ini_parser_param.ini_parser_cb = ini_parser_cb; + ini_parser_param.arg = arg; + + CG(ini_parser_param) = &ini_parser_param; + if (zend_ini_prepare_string_for_scanning(str TSRMLS_CC)==FAILURE) { + return FAILURE; + } + + CG(ini_parser_unbuffered_errors) = unbuffered_errors; + + if (ini_parse(TSRMLS_C)) { + return SUCCESS; + } else { + return FAILURE; + } +} + + %} %pure_parser http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_ini_scanner.h?r1=1.15&r2=1.16&diff_format=u Index: ZendEngine2/zend_ini_scanner.h diff -u ZendEngine2/zend_ini_scanner.h:1.15 ZendEngine2/zend_ini_scanner.h:1.16 --- ZendEngine2/zend_ini_scanner.h:1.15 Wed Jan 4 23:52:06 2006 +++ ZendEngine2/zend_ini_scanner.h Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_ini_scanner.h,v 1.15 2006/01/04 23:52:06 andi Exp $ */ +/* $Id: zend_ini_scanner.h,v 1.16 2006/02/13 10:23:57 dmitry Exp $ */ #ifndef _ZEND_INI_SCANNER_H #define _ZEND_INI_SCANNER_H @@ -26,6 +26,7 @@ int zend_ini_scanner_get_lineno(TSRMLS_D); char *zend_ini_scanner_get_filename(TSRMLS_D); int zend_ini_open_file_for_scanning(zend_file_handle *fh TSRMLS_DC); +int zend_ini_prepare_string_for_scanning(char *str TSRMLS_DC); void zend_ini_close_file(zend_file_handle *fh TSRMLS_DC); int ini_lex(zval *ini_lval TSRMLS_DC); END_EXTERN_C() http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_ini_scanner.l?r1=1.44&r2=1.45&diff_format=u Index: ZendEngine2/zend_ini_scanner.l diff -u ZendEngine2/zend_ini_scanner.l:1.44 ZendEngine2/zend_ini_scanner.l:1.45 --- ZendEngine2/zend_ini_scanner.l:1.44 Tue Jan 17 19:56:41 2006 +++ ZendEngine2/zend_ini_scanner.l Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_ini_scanner.l,v 1.44 2006/01/17 19:56:41 iliaa Exp $ */ +/* $Id: zend_ini_scanner.l,v 1.45 2006/02/13 10:23:57 dmitry Exp $ */ #define yyleng SCNG(yy_leng) #define yytext SCNG(yy_text) @@ -87,6 +87,16 @@ } +int zend_ini_prepare_string_for_scanning(char *str TSRMLS_DC) +{ + int len = strlen(str); + + yyin = NULL; + yy_scan_buffer(str, len + 2 TSRMLS_CC); + ini_filename = NULL; + return SUCCESS; +} + void zend_ini_close_file(zend_file_handle *fh TSRMLS_DC) { zend_stream_close(fh); http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_interfaces.c?r1=1.45&r2=1.46&diff_format=u Index: ZendEngine2/zend_interfaces.c diff -u ZendEngine2/zend_interfaces.c:1.45 ZendEngine2/zend_interfaces.c:1.46 --- ZendEngine2/zend_interfaces.c:1.45 Mon Feb 6 01:58:45 2006 +++ ZendEngine2/zend_interfaces.c Mon Feb 13 10:23:57 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_interfaces.c,v 1.45 2006/02/06 01:58:45 helly Exp $ */ +/* $Id: zend_interfaces.c,v 1.46 2006/02/13 10:23:57 dmitry Exp $ */ #include "zend.h" #include "zend_API.h" @@ -325,11 +325,11 @@ return SUCCESS; } for (i = 0; i < class_type->num_interfaces; i++) { - if (class_type->interfaces[i] == U_CLASS_ENTRY(zend_ce_aggregate) || class_type->interfaces[i] == U_CLASS_ENTRY(zend_ce_iterator)) { + if (class_type->interfaces[i] == zend_ce_aggregate || class_type->interfaces[i] == zend_ce_iterator) { return SUCCESS; } } - zend_error(E_CORE_ERROR, "Class %v must implement interface %s as part of either %s or %s", + zend_error(E_CORE_ERROR, "Class %v must implement interface %v as part of either %v or %v", class_type->name, zend_ce_traversable->name, zend_ce_iterator->name, @@ -351,10 +351,10 @@ /* c-level get_iterator cannot be changed (exception being only Traversable is implmented) */ if (class_type->num_interfaces) { for (i = 0; i < class_type->num_interfaces; i++) { - if (class_type->interfaces[i] == U_CLASS_ENTRY(zend_ce_iterator)) { + if (class_type->interfaces[i] == zend_ce_iterator) { return FAILURE; } - if (class_type->interfaces[i] == U_CLASS_ENTRY(zend_ce_traversable)) { + if (class_type->interfaces[i] == zend_ce_traversable) { t = i; } } http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_object_handlers.c?r1=1.156&r2=1.157&diff_format=u Index: ZendEngine2/zend_object_handlers.c diff -u ZendEngine2/zend_object_handlers.c:1.156 ZendEngine2/zend_object_handlers.c:1.157 --- ZendEngine2/zend_object_handlers.c:1.156 Sun Jan 22 18:55:02 2006 +++ ZendEngine2/zend_object_handlers.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_object_handlers.c,v 1.156 2006/01/22 18:55:02 helly Exp $ */ +/* $Id: zend_object_handlers.c,v 1.157 2006/02/13 10:23:57 dmitry Exp $ */ #include "zend.h" #include "zend_globals.h" @@ -436,7 +436,7 @@ zend_class_entry *ce = Z_OBJCE_P(object); zval *retval; - if (instanceof_function_ex(ce, U_CLASS_ENTRY(zend_ce_arrayaccess), 1 TSRMLS_CC)) { + if (instanceof_function_ex(ce, zend_ce_arrayaccess, 1 TSRMLS_CC)) { if(offset == NULL) { /* [] construct */ ALLOC_INIT_ZVAL(offset); @@ -469,7 +469,7 @@ { zend_class_entry *ce = Z_OBJCE_P(object); - if (instanceof_function_ex(ce, U_CLASS_ENTRY(zend_ce_arrayaccess), 1 TSRMLS_CC)) { + if (instanceof_function_ex(ce, zend_ce_arrayaccess, 1 TSRMLS_CC)) { if (!offset) { ALLOC_INIT_ZVAL(offset); } else { @@ -489,7 +489,7 @@ zval *retval; int result; - if (instanceof_function_ex(ce, U_CLASS_ENTRY(zend_ce_arrayaccess), 1 TSRMLS_CC)) { + if (instanceof_function_ex(ce, zend_ce_arrayaccess, 1 TSRMLS_CC)) { SEPARATE_ARG_IF_REF(offset); zend_call_method_with_1_params(&object, ce, NULL, "offsetexists", &retval, offset); if (retval) { @@ -603,7 +603,7 @@ { zend_class_entry *ce = Z_OBJCE_P(object); - if (instanceof_function_ex(ce, U_CLASS_ENTRY(zend_ce_arrayaccess), 1 TSRMLS_CC)) { + if (instanceof_function_ex(ce, zend_ce_arrayaccess, 1 TSRMLS_CC)) { SEPARATE_ARG_IF_REF(offset); zend_call_method_with_1_params(&object, ce, NULL, "offsetunset", NULL, offset); zval_ptr_dtor(&offset); http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_operators.c?r1=1.230&r2=1.231&diff_format=u Index: ZendEngine2/zend_operators.c diff -u ZendEngine2/zend_operators.c:1.230 ZendEngine2/zend_operators.c:1.231 --- ZendEngine2/zend_operators.c:1.230 Thu Feb 9 23:23:02 2006 +++ ZendEngine2/zend_operators.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_operators.c,v 1.230 2006/02/09 23:23:02 andrei Exp $ */ +/* $Id: zend_operators.c,v 1.231 2006/02/13 10:23:57 dmitry Exp $ */ #include <ctype.h> @@ -838,7 +838,7 @@ switch (op->type) { case IS_ARRAY: { - object_and_properties_init(op, U_CLASS_ENTRY(zend_standard_class_def), op->value.ht); + object_and_properties_init(op, zend_standard_class_def, op->value.ht); return; break; } http://cvs.php.net/viewcvs.cgi/php-src/ext/com_dotnet/com_misc.c?r1=1.10&r2=1.11&diff_format=u Index: php-src/ext/com_dotnet/com_misc.c diff -u php-src/ext/com_dotnet/com_misc.c:1.10 php-src/ext/com_dotnet/com_misc.c:1.11 --- php-src/ext/com_dotnet/com_misc.c:1.10 Sun Jan 1 13:09:48 2006 +++ php-src/ext/com_dotnet/com_misc.c Mon Feb 13 10:23:57 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: com_misc.c,v 1.10 2006/01/01 13:09:48 sniper Exp $ */ +/* $Id: com_misc.c,v 1.11 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -36,7 +36,7 @@ message = php_win_err(code); free_msg = 1; } - zend_throw_exception(U_CLASS_ENTRY(php_com_exception_class_entry), message, (long)code TSRMLS_CC); + zend_throw_exception(php_com_exception_class_entry, message, (long)code TSRMLS_CC); if (free_msg) { LocalFree(message); } http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/attr.c?r1=1.21&r2=1.22&diff_format=u Index: php-src/ext/dom/attr.c diff -u php-src/ext/dom/attr.c:1.21 php-src/ext/dom/attr.c:1.22 --- php-src/ext/dom/attr.c:1.21 Sun Jan 1 13:09:49 2006 +++ php-src/ext/dom/attr.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: attr.c,v 1.21 2006/01/01 13:09:49 sniper Exp $ */ +/* $Id: attr.c,v 1.22 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -54,8 +54,8 @@ char *name, *value = NULL; int name_len, value_len, name_valid; - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(dom_domexception_class_entry) TSRMLS_CC); - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|s", &id, U_CLASS_ENTRY(dom_attr_class_entry), &name, &name_len, &value, &value_len) == FAILURE) { + php_set_error_handling(EH_THROW, dom_domexception_class_entry TSRMLS_CC); + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|s", &id, dom_attr_class_entry, &name, &name_len, &value, &value_len) == FAILURE) { php_std_error_handling(); return; } @@ -263,7 +263,7 @@ dom_object *intern; xmlAttrPtr attrp; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, U_CLASS_ENTRY(dom_attr_class_entry)) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_attr_class_entry) == FAILURE) { return; } http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/cdatasection.c?r1=1.13&r2=1.14&diff_format=u Index: php-src/ext/dom/cdatasection.c diff -u php-src/ext/dom/cdatasection.c:1.13 php-src/ext/dom/cdatasection.c:1.14 --- php-src/ext/dom/cdatasection.c:1.13 Sun Jan 1 13:09:49 2006 +++ php-src/ext/dom/cdatasection.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: cdatasection.c,v 1.13 2006/01/01 13:09:49 sniper Exp $ */ +/* $Id: cdatasection.c,v 1.14 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -50,8 +50,8 @@ char *value = NULL; int value_len; - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(dom_domexception_class_entry) TSRMLS_CC); - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_cdatasection_class_entry), &value, &value_len) == FAILURE) { + php_set_error_handling(EH_THROW, dom_domexception_class_entry TSRMLS_CC); + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_cdatasection_class_entry, &value, &value_len) == FAILURE) { php_std_error_handling(); return; } http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/characterdata.c?r1=1.17&r2=1.18&diff_format=u Index: php-src/ext/dom/characterdata.c diff -u php-src/ext/dom/characterdata.c:1.17 php-src/ext/dom/characterdata.c:1.18 --- php-src/ext/dom/characterdata.c:1.17 Sun Jan 1 13:09:49 2006 +++ php-src/ext/dom/characterdata.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: characterdata.c,v 1.17 2006/01/01 13:09:49 sniper Exp $ */ +/* $Id: characterdata.c,v 1.18 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -154,7 +154,7 @@ int length; dom_object *intern; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oll", &id, U_CLASS_ENTRY(dom_characterdata_class_entry), &offset, &count) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oll", &id, dom_characterdata_class_entry, &offset, &count) == FAILURE) { return; } @@ -202,7 +202,7 @@ char *arg; int arg_len; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_characterdata_class_entry), &arg, &arg_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_characterdata_class_entry, &arg, &arg_len) == FAILURE) { return; } @@ -229,7 +229,7 @@ int length, arg_len; dom_object *intern; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ols", &id, U_CLASS_ENTRY(dom_characterdata_class_entry), &offset, &arg, &arg_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ols", &id, dom_characterdata_class_entry, &offset, &arg, &arg_len) == FAILURE) { return; } @@ -277,7 +277,7 @@ int length; dom_object *intern; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oll", &id, U_CLASS_ENTRY(dom_characterdata_class_entry), &offset, &count) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oll", &id, dom_characterdata_class_entry, &offset, &count) == FAILURE) { return; } @@ -334,7 +334,7 @@ int length, arg_len; dom_object *intern; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Olls", &id, U_CLASS_ENTRY(dom_characterdata_class_entry), &offset, &count, &arg, &arg_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Olls", &id, dom_characterdata_class_entry, &offset, &count, &arg, &arg_len) == FAILURE) { return; } http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/comment.c?r1=1.13&r2=1.14&diff_format=u Index: php-src/ext/dom/comment.c diff -u php-src/ext/dom/comment.c:1.13 php-src/ext/dom/comment.c:1.14 --- php-src/ext/dom/comment.c:1.13 Sun Jan 1 13:09:49 2006 +++ php-src/ext/dom/comment.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: comment.c,v 1.13 2006/01/01 13:09:49 sniper Exp $ */ +/* $Id: comment.c,v 1.14 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -50,8 +50,8 @@ char *value = NULL; int value_len; - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(dom_domexception_class_entry) TSRMLS_CC); - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|s", &id, U_CLASS_ENTRY(dom_comment_class_entry), &value, &value_len) == FAILURE) { + php_set_error_handling(EH_THROW, dom_domexception_class_entry TSRMLS_CC); + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|s", &id, dom_comment_class_entry, &value, &value_len) == FAILURE) { php_std_error_handling(); return; } http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/document.c?r1=1.74&r2=1.75&diff_format=u Index: php-src/ext/dom/document.c diff -u php-src/ext/dom/document.c:1.74 php-src/ext/dom/document.c:1.75 --- php-src/ext/dom/document.c:1.74 Tue Jan 17 12:18:52 2006 +++ php-src/ext/dom/document.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: document.c,v 1.74 2006/01/17 12:18:52 dmitry Exp $ */ +/* $Id: document.c,v 1.75 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -774,7 +774,7 @@ int ret, name_len, value_len; char *name, *value = NULL; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|s", &id, U_CLASS_ENTRY(dom_document_class_entry), &name, &name_len, &value, &value_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|s", &id, dom_document_class_entry, &name, &name_len, &value, &value_len) == FAILURE) { return; } @@ -807,7 +807,7 @@ dom_object *intern; int ret; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, U_CLASS_ENTRY(dom_document_class_entry)) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_document_class_entry) == FAILURE) { return; } @@ -836,7 +836,7 @@ dom_object *intern; char *value; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_document_class_entry), &value, &value_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &value, &value_len) == FAILURE) { return; } @@ -865,7 +865,7 @@ dom_object *intern; char *value; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_document_class_entry), &value, &value_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &value, &value_len) == FAILURE) { return; } @@ -894,7 +894,7 @@ dom_object *intern; char *value; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_document_class_entry), &value, &value_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &value, &value_len) == FAILURE) { return; } @@ -923,7 +923,7 @@ dom_object *intern; char *name, *value = NULL; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|s", &id, U_CLASS_ENTRY(dom_document_class_entry), &name, &name_len, &value, &value_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|s", &id, dom_document_class_entry, &name, &name_len, &value, &value_len) == FAILURE) { return; } @@ -959,7 +959,7 @@ dom_object *intern; char *name; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_document_class_entry), &name, &name_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &name, &name_len) == FAILURE) { return; } @@ -994,7 +994,7 @@ int ret, name_len; char *name; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_document_class_entry), &name, &name_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &name, &name_len) == FAILURE) { return; } @@ -1028,7 +1028,7 @@ char *name; xmlChar *local; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_document_class_entry), &name, &name_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &name, &name_len) == FAILURE) { return; } @@ -1056,7 +1056,7 @@ int ret; long recursive = 0; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO|l", &id, U_CLASS_ENTRY(dom_document_class_entry), &node, U_CLASS_ENTRY(dom_node_class_entry), &recursive) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO|l", &id, dom_document_class_entry, &node, dom_node_class_entry, &recursive) == FAILURE) { return; } @@ -1101,7 +1101,7 @@ int errorcode; dom_object *intern; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!s|s", &id, U_CLASS_ENTRY(dom_document_class_entry), &uri, &uri_len, &name, &name_len, &value, &value_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!s|s", &id, dom_document_class_entry, &uri, &uri_len, &name, &name_len, &value, &value_len) == FAILURE) { return; } @@ -1165,7 +1165,7 @@ dom_object *intern; int errorcode; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!s", &id, U_CLASS_ENTRY(dom_document_class_entry), &uri, &uri_len, &name, &name_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!s", &id, dom_document_class_entry, &uri, &uri_len, &name, &name_len) == FAILURE) { return; } @@ -1228,7 +1228,7 @@ char *uri, *name; xmlChar *local, *nsuri; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oss", &id, U_CLASS_ENTRY(dom_document_class_entry), &uri, &uri_len, &name, &name_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oss", &id, dom_document_class_entry, &uri, &uri_len, &name, &name_len) == FAILURE) { return; } @@ -1256,7 +1256,7 @@ dom_object *intern; char *idname; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_document_class_entry), &idname, &idname_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &idname, &idname_len) == FAILURE) { return; } @@ -1295,7 +1295,7 @@ xmlDocPtr docp; dom_object *intern; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, U_CLASS_ENTRY(dom_document_class_entry)) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_document_class_entry) == FAILURE) { return; } @@ -1326,8 +1326,8 @@ char *encoding, *version = NULL; int encoding_len = 0, version_len = 0, refcount; - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(dom_domexception_class_entry) TSRMLS_CC); - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|ss", &id, U_CLASS_ENTRY(dom_document_class_entry), &version, &version_len, &encoding, &encoding_len) == FAILURE) { + php_set_error_handling(EH_THROW, dom_domexception_class_entry TSRMLS_CC); + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|ss", &id, dom_document_class_entry, &version, &version_len, &encoding, &encoding_len) == FAILURE) { php_std_error_handling(); return; } @@ -1534,7 +1534,7 @@ long options = 0; id = getThis(); - if (id != NULL && ! instanceof_function(Z_OBJCE_P(id), U_CLASS_ENTRY(dom_document_class_entry) TSRMLS_CC)) { + if (id != NULL && ! instanceof_function(Z_OBJCE_P(id), dom_document_class_entry TSRMLS_CC)) { id = NULL; } @@ -1613,7 +1613,7 @@ char *file; long options = 0; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|l", &id, U_CLASS_ENTRY(dom_document_class_entry), &file, &file_len, &options) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|l", &id, dom_document_class_entry, &file, &file_len, &options) == FAILURE) { return; } @@ -1659,7 +1659,7 @@ int size, format, saveempty; long options = 0; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|O!l", &id, U_CLASS_ENTRY(dom_document_class_entry), &nodep, U_CLASS_ENTRY(dom_node_class_entry), &options) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|O!l", &id, dom_document_class_entry, &nodep, dom_node_class_entry, &options) == FAILURE) { return; } @@ -1758,7 +1758,7 @@ int err; dom_object *intern; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|l", &id, U_CLASS_ENTRY(dom_document_class_entry), &flags) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|l", &id, dom_document_class_entry, &flags) == FAILURE) { return; } @@ -1797,7 +1797,7 @@ dom_object *intern; xmlValidCtxt *cvp; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, U_CLASS_ENTRY(dom_document_class_entry)) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_document_class_entry) == FAILURE) { return; } @@ -1839,7 +1839,7 @@ int is_valid; char resolved_path[MAXPATHLEN + 1]; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_document_class_entry), &source, &source_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &source, &source_len) == FAILURE) { return; } @@ -1929,7 +1929,7 @@ int is_valid; char resolved_path[MAXPATHLEN + 1]; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_document_class_entry), &source, &source_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &source, &source_len) == FAILURE) { return; } @@ -2053,7 +2053,7 @@ if (!newdoc) RETURN_FALSE; - if (id != NULL && instanceof_function(Z_OBJCE_P(id), U_CLASS_ENTRY(dom_document_class_entry) TSRMLS_CC)) { + if (id != NULL && instanceof_function(Z_OBJCE_P(id), dom_document_class_entry TSRMLS_CC)) { intern = (dom_object *)zend_object_store_get_object(id TSRMLS_CC); if (intern != NULL) { docp = (xmlDocPtr) dom_object_get_node(intern); @@ -2110,7 +2110,7 @@ dom_doc_propsptr doc_props; char *file; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_document_class_entry), &file, &file_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &file, &file_len) == FAILURE) { return; } @@ -2145,7 +2145,7 @@ xmlChar *mem; int size; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, U_CLASS_ENTRY(dom_document_class_entry)) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_document_class_entry) == FAILURE) { return; } @@ -2176,7 +2176,7 @@ dom_object *intern; zend_uchar type1, type2; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oss!", &id, U_CLASS_ENTRY(dom_document_class_entry), &baseclass, &baseclass_len, &extendedclass, &extendedclass_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oss!", &id, dom_document_class_entry, &baseclass, &baseclass_len, &extendedclass, &extendedclass_len) == FAILURE) { return; } @@ -2189,7 +2189,7 @@ basece = *pce; } - if (basece == NULL || ! instanceof_function(basece, U_CLASS_ENTRY(dom_node_class_entry) TSRMLS_CC)) { + if (basece == NULL || ! instanceof_function(basece, dom_node_class_entry TSRMLS_CC)) { php_error_docref(NULL TSRMLS_CC, E_ERROR, "Class %s is not derived from DOMNode.", baseclass); return; } http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/documentfragment.c?r1=1.17&r2=1.18&diff_format=u Index: php-src/ext/dom/documentfragment.c diff -u php-src/ext/dom/documentfragment.c:1.17 php-src/ext/dom/documentfragment.c:1.18 --- php-src/ext/dom/documentfragment.c:1.17 Sun Jan 1 13:09:49 2006 +++ php-src/ext/dom/documentfragment.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: documentfragment.c,v 1.17 2006/01/01 13:09:49 sniper Exp $ */ +/* $Id: documentfragment.c,v 1.18 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -49,7 +49,7 @@ xmlNodePtr nodep = NULL, oldnode = NULL; dom_object *intern; - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(dom_domexception_class_entry) TSRMLS_CC); + php_set_error_handling(EH_THROW, dom_domexception_class_entry TSRMLS_CC); if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_documentfragment_class_entry) == FAILURE) { php_std_error_handling(); return; http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/dom_iterators.c?r1=1.13&r2=1.14&diff_format=u Index: php-src/ext/dom/dom_iterators.c diff -u php-src/ext/dom/dom_iterators.c:1.13 php-src/ext/dom/dom_iterators.c:1.14 --- php-src/ext/dom/dom_iterators.c:1.13 Tue Feb 7 11:48:37 2006 +++ php-src/ext/dom/dom_iterators.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dom_iterators.c,v 1.13 2006/02/07 11:48:37 rrichards Exp $ */ +/* $Id: dom_iterators.c,v 1.14 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -161,7 +161,7 @@ object = (zval *)iterator->intern.data; - if (instanceof_function(Z_OBJCE_P(object), U_CLASS_ENTRY(dom_nodelist_class_entry) TSRMLS_CC)) { + if (instanceof_function(Z_OBJCE_P(object), dom_nodelist_class_entry TSRMLS_CC)) { *int_key = iter->index - 1; return HASH_KEY_IS_LONG; } else { http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/domexception.c?r1=1.13&r2=1.14&diff_format=u Index: php-src/ext/dom/domexception.c diff -u php-src/ext/dom/domexception.c:1.13 php-src/ext/dom/domexception.c:1.14 --- php-src/ext/dom/domexception.c:1.13 Sun Jan 1 13:09:49 2006 +++ php-src/ext/dom/domexception.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: domexception.c,v 1.13 2006/01/01 13:09:49 sniper Exp $ */ +/* $Id: domexception.c,v 1.14 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -45,7 +45,7 @@ void php_dom_throw_error_with_message(int error_code, char *error_message, int strict_error TSRMLS_DC) { if (strict_error == 1) { - zend_throw_exception(U_CLASS_ENTRY(dom_domexception_class_entry), error_message, error_code TSRMLS_CC); + zend_throw_exception(dom_domexception_class_entry, error_message, error_code TSRMLS_CC); } else { php_libxml_issue_error(E_WARNING, error_message TSRMLS_CC); } http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/domimplementation.c?r1=1.17&r2=1.18&diff_format=u Index: php-src/ext/dom/domimplementation.c diff -u php-src/ext/dom/domimplementation.c:1.17 php-src/ext/dom/domimplementation.c:1.18 --- php-src/ext/dom/domimplementation.c:1.17 Sun Jan 1 13:09:49 2006 +++ php-src/ext/dom/domimplementation.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: domimplementation.c,v 1.17 2006/01/01 13:09:49 sniper Exp $ */ +/* $Id: domimplementation.c,v 1.18 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -134,7 +134,7 @@ char *prefix = NULL, *localname = NULL; dom_object *doctobj; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|ssO", &uri, &uri_len, &name, &name_len, &node, U_CLASS_ENTRY(dom_documenttype_class_entry)) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|ssO", &uri, &uri_len, &name, &name_len, &node, dom_documenttype_class_entry) == FAILURE) { return; } http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/element.c?r1=1.41&r2=1.42&diff_format=u Index: php-src/ext/dom/element.c diff -u php-src/ext/dom/element.c:1.41 php-src/ext/dom/element.c:1.42 --- php-src/ext/dom/element.c:1.41 Sun Jan 1 13:09:49 2006 +++ php-src/ext/dom/element.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: element.c,v 1.41 2006/01/01 13:09:49 sniper Exp $ */ +/* $Id: element.c,v 1.42 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -71,8 +71,8 @@ int name_len, value_len = 0, name_valid; xmlNsPtr nsptr = NULL; - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(dom_domexception_class_entry) TSRMLS_CC); - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|s!s", &id, U_CLASS_ENTRY(dom_element_class_entry), &name, &name_len, &value, &value_len, &uri, &uri_len) == FAILURE) { + php_set_error_handling(EH_THROW, dom_domexception_class_entry TSRMLS_CC); + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|s!s", &id, dom_element_class_entry, &name, &name_len, &value, &value_len, &uri, &uri_len) == FAILURE) { php_std_error_handling(); return; } @@ -202,7 +202,7 @@ dom_object *intern; int name_len; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_element_class_entry), &name, &name_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_element_class_entry, &name, &name_len) == FAILURE) { return; } @@ -233,7 +233,7 @@ char *name, *value; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oss", &id, U_CLASS_ENTRY(dom_element_class_entry), &name, &name_len, &value, &value_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oss", &id, dom_element_class_entry, &name, &name_len, &value, &value_len) == FAILURE) { return; } @@ -278,7 +278,7 @@ int name_len; char *name; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_element_class_entry), &name, &name_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_element_class_entry, &name, &name_len) == FAILURE) { return; } @@ -322,7 +322,7 @@ dom_object *intern; char *name; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_element_class_entry), &name, &name_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_element_class_entry, &name, &name_len) == FAILURE) { return; } @@ -350,7 +350,7 @@ dom_object *intern, *attrobj, *oldobj; int ret; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &id, U_CLASS_ENTRY(dom_element_class_entry), &node, U_CLASS_ENTRY(dom_attr_class_entry)) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &id, dom_element_class_entry, &node, dom_attr_class_entry) == FAILURE) { return; } @@ -413,7 +413,7 @@ dom_object *intern, *attrobj; int ret; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &id, U_CLASS_ENTRY(dom_element_class_entry), &node, U_CLASS_ENTRY(dom_attr_class_entry)) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &id, dom_element_class_entry, &node, dom_attr_class_entry) == FAILURE) { return; } @@ -452,7 +452,7 @@ char *name; xmlChar *local; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_element_class_entry), &name, &name_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_element_class_entry, &name, &name_len) == FAILURE) { return; } @@ -479,7 +479,7 @@ int uri_len = 0, name_len = 0; char *uri, *name, *strattr; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!s", &id, U_CLASS_ENTRY(dom_element_class_entry), &uri, &uri_len, &name, &name_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!s", &id, dom_element_class_entry, &uri, &uri_len, &name, &name_len) == FAILURE) { return; } @@ -559,7 +559,7 @@ dom_object *intern; int errorcode = 0, stricterror, is_xmlns = 0; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!ss", &id, U_CLASS_ENTRY(dom_element_class_entry), &uri, &uri_len, &name, &name_len, &value, &value_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!ss", &id, dom_element_class_entry, &uri, &uri_len, &name, &name_len, &value, &value_len) == FAILURE) { return; } @@ -668,7 +668,7 @@ int name_len, uri_len; char *name, *uri; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!s", &id, U_CLASS_ENTRY(dom_element_class_entry), &uri, &uri_len, &name, &name_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!s", &id, dom_element_class_entry, &uri, &uri_len, &name, &name_len) == FAILURE) { return; } @@ -725,7 +725,7 @@ int uri_len, name_len, ret; char *uri, *name; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!s", &id, U_CLASS_ENTRY(dom_element_class_entry), &uri, &uri_len, &name, &name_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!s", &id, dom_element_class_entry, &uri, &uri_len, &name, &name_len) == FAILURE) { return; } @@ -756,7 +756,7 @@ dom_object *intern, *attrobj, *oldobj; int ret; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &id, U_CLASS_ENTRY(dom_element_class_entry), &node, U_CLASS_ENTRY(dom_attr_class_entry)) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &id, dom_element_class_entry, &node, dom_attr_class_entry) == FAILURE) { return; } @@ -827,7 +827,7 @@ char *uri, *name; xmlChar *local, *nsuri; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oss", &id, U_CLASS_ENTRY(dom_element_class_entry), &uri, &uri_len, &name, &name_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oss", &id, dom_element_class_entry, &uri, &uri_len, &name, &name_len) == FAILURE) { return; } @@ -855,7 +855,7 @@ char *name, *value; int name_len; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_element_class_entry), &name, &name_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_element_class_entry, &name, &name_len) == FAILURE) { return; } @@ -885,7 +885,7 @@ int uri_len, name_len; char *uri, *name, *value; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!s", &id, U_CLASS_ENTRY(dom_element_class_entry), &uri, &uri_len, &name, &name_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!s", &id, dom_element_class_entry, &uri, &uri_len, &name, &name_len) == FAILURE) { return; } @@ -942,7 +942,7 @@ int name_len; zend_bool is_id; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Osb", &id, U_CLASS_ENTRY(dom_element_class_entry), &name, &name_len, &is_id) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Osb", &id, dom_element_class_entry, &name, &name_len, &is_id) == FAILURE) { return; } @@ -979,7 +979,7 @@ char *uri, *name; zend_bool is_id; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ossb", &id, U_CLASS_ENTRY(dom_element_class_entry), &uri, &uri_len, &name, &name_len, &is_id) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ossb", &id, dom_element_class_entry, &uri, &uri_len, &name, &name_len, &is_id) == FAILURE) { return; } @@ -1016,7 +1016,7 @@ int name_len; zend_bool is_id; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OOb", &id, U_CLASS_ENTRY(dom_element_class_entry), &node, U_CLASS_ENTRY(dom_attr_class_entry), &is_id) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OOb", &id, dom_element_class_entry, &node, dom_attr_class_entry, &is_id) == FAILURE) { return; } http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/entityreference.c?r1=1.14&r2=1.15&diff_format=u Index: php-src/ext/dom/entityreference.c diff -u php-src/ext/dom/entityreference.c:1.14 php-src/ext/dom/entityreference.c:1.15 --- php-src/ext/dom/entityreference.c:1.14 Sun Jan 1 13:09:49 2006 +++ php-src/ext/dom/entityreference.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: entityreference.c,v 1.14 2006/01/01 13:09:49 sniper Exp $ */ +/* $Id: entityreference.c,v 1.15 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -50,8 +50,8 @@ char *name; int name_len, name_valid; - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(dom_domexception_class_entry) TSRMLS_CC); - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_entityreference_class_entry), &name, &name_len) == FAILURE) { + php_set_error_handling(EH_THROW, dom_domexception_class_entry TSRMLS_CC); + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_entityreference_class_entry, &name, &name_len) == FAILURE) { php_std_error_handling(); return; } http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/namednodemap.c?r1=1.17&r2=1.18&diff_format=u Index: php-src/ext/dom/namednodemap.c diff -u php-src/ext/dom/namednodemap.c:1.17 php-src/ext/dom/namednodemap.c:1.18 --- php-src/ext/dom/namednodemap.c:1.17 Sun Jan 1 13:09:49 2006 +++ php-src/ext/dom/namednodemap.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: namednodemap.c,v 1.17 2006/01/01 13:09:49 sniper Exp $ */ +/* $Id: namednodemap.c,v 1.18 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -104,7 +104,7 @@ xmlNodePtr nodep; xmlNotation *notep = NULL; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_namednodemap_class_entry), &named, &namedlen) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_namednodemap_class_entry, &named, &namedlen) == FAILURE) { return; } @@ -176,7 +176,7 @@ xmlNodePtr nodep, curnode; int count; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol", &id, U_CLASS_ENTRY(dom_namednodemap_class_entry), &index) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol", &id, dom_namednodemap_class_entry, &index) == FAILURE) { return; } if (index >= 0) { @@ -232,7 +232,7 @@ xmlNodePtr nodep; xmlNotation *notep = NULL; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!s", &id, U_CLASS_ENTRY(dom_namednodemap_class_entry), &uri, &urilen, &named, &namedlen) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os!s", &id, dom_namednodemap_class_entry, &uri, &urilen, &named, &namedlen) == FAILURE) { return; } http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/node.c?r1=1.42&r2=1.43&diff_format=u Index: php-src/ext/dom/node.c diff -u php-src/ext/dom/node.c:1.42 php-src/ext/dom/node.c:1.43 --- php-src/ext/dom/node.c:1.42 Wed Jan 25 17:33:24 2006 +++ php-src/ext/dom/node.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: node.c,v 1.42 2006/01/25 17:33:24 rrichards Exp $ */ +/* $Id: node.c,v 1.43 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -913,7 +913,7 @@ dom_object *intern, *childobj, *refpobj; int ret, stricterror; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO|O!", &id, U_CLASS_ENTRY(dom_node_class_entry), &node, U_CLASS_ENTRY(dom_node_class_entry), &ref, U_CLASS_ENTRY(dom_node_class_entry)) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO|O!", &id, dom_node_class_entry, &node, dom_node_class_entry, &ref, dom_node_class_entry) == FAILURE) { return; } @@ -1077,7 +1077,7 @@ int ret; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OOO", &id, U_CLASS_ENTRY(dom_node_class_entry), &newnode, U_CLASS_ENTRY(dom_node_class_entry), &oldnode, U_CLASS_ENTRY(dom_node_class_entry)) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OOO", &id, dom_node_class_entry, &newnode, dom_node_class_entry, &oldnode, dom_node_class_entry) == FAILURE) { return; } @@ -1167,7 +1167,7 @@ dom_object *intern, *childobj; int ret, stricterror; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &id, U_CLASS_ENTRY(dom_node_class_entry), &node, U_CLASS_ENTRY(dom_node_class_entry)) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &id, dom_node_class_entry, &node, dom_node_class_entry) == FAILURE) { return; } @@ -1220,7 +1220,7 @@ dom_object *intern, *childobj; int ret, stricterror; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &id, U_CLASS_ENTRY(dom_node_class_entry), &node, U_CLASS_ENTRY(dom_node_class_entry)) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &id, dom_node_class_entry, &node, dom_node_class_entry) == FAILURE) { return; } @@ -1321,7 +1321,7 @@ xmlNode *nodep; dom_object *intern; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, U_CLASS_ENTRY(dom_node_class_entry)) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_node_class_entry) == FAILURE) { return; } @@ -1353,7 +1353,7 @@ dom_object *intern; long recursive = 0; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|l", &id, U_CLASS_ENTRY(dom_node_class_entry), &recursive) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|l", &id, dom_node_class_entry, &recursive) == FAILURE) { return; } @@ -1414,7 +1414,7 @@ xmlNode *nodep; dom_object *intern; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, U_CLASS_ENTRY(dom_node_class_entry)) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_node_class_entry) == FAILURE) { return; } @@ -1436,7 +1436,7 @@ int feature_len, version_len; char *feature, *version; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oss", &id, U_CLASS_ENTRY(dom_node_class_entry), &feature, &feature_len, &version, &version_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oss", &id, dom_node_class_entry, &feature, &feature_len, &version, &version_len) == FAILURE) { return; } @@ -1459,7 +1459,7 @@ xmlNode *nodep; dom_object *intern; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, U_CLASS_ENTRY(dom_node_class_entry)) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_node_class_entry) == FAILURE) { return; } @@ -1497,7 +1497,7 @@ xmlNodePtr nodeotherp, nodep; dom_object *intern, *nodeotherobj; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &id, U_CLASS_ENTRY(dom_node_class_entry), &node, U_CLASS_ENTRY(dom_node_class_entry)) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &id, dom_node_class_entry, &node, dom_node_class_entry) == FAILURE) { return; } @@ -1527,7 +1527,7 @@ int uri_len = 0; char *uri; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_node_class_entry), &uri, &uri_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_node_class_entry, &uri, &uri_len) == FAILURE) { return; } @@ -1578,7 +1578,7 @@ int uri_len = 0; char *uri; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_node_class_entry), &uri, &uri_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_node_class_entry, &uri, &uri_len) == FAILURE) { return; } @@ -1609,7 +1609,7 @@ int prefix_len = 0; char *prefix; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, U_CLASS_ENTRY(dom_node_class_entry), &prefix, &prefix_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_node_class_entry, &prefix, &prefix_len) == FAILURE) { return; } http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/nodelist.c?r1=1.20&r2=1.21&diff_format=u Index: php-src/ext/dom/nodelist.c diff -u php-src/ext/dom/nodelist.c:1.20 php-src/ext/dom/nodelist.c:1.21 --- php-src/ext/dom/nodelist.c:1.20 Sun Jan 1 13:09:49 2006 +++ php-src/ext/dom/nodelist.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: nodelist.c,v 1.20 2006/01/01 13:09:49 sniper Exp $ */ +/* $Id: nodelist.c,v 1.21 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -111,7 +111,7 @@ HashTable *nodeht; zval **entry; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol", &id, U_CLASS_ENTRY(dom_nodelist_class_entry), &index) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol", &id, dom_nodelist_class_entry, &index) == FAILURE) { return; } http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/php_dom.c?r1=1.87&r2=1.88&diff_format=u Index: php-src/ext/dom/php_dom.c diff -u php-src/ext/dom/php_dom.c:1.87 php-src/ext/dom/php_dom.c:1.88 --- php-src/ext/dom/php_dom.c:1.87 Sun Jan 1 13:09:49 2006 +++ php-src/ext/dom/php_dom.c Mon Feb 13 10:23:57 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_dom.c,v 1.87 2006/01/01 13:09:49 sniper Exp $ */ +/* $Id: php_dom.c,v 1.88 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1049,7 +1049,7 @@ clone = dom_objects_set_class(intern->std.ce, 0 TSRMLS_CC); - if (instanceof_function(intern->std.ce, U_CLASS_ENTRY(dom_node_class_entry) TSRMLS_CC)) { + if (instanceof_function(intern->std.ce, dom_node_class_entry TSRMLS_CC)) { node = (xmlNodePtr)dom_object_get_node((dom_object *) object); if (node != NULL) { cloned_node = xmlDocCopyNode(node, node->doc, 1); @@ -1170,9 +1170,9 @@ zend_class_entry *ce; if (ce_type == DOM_NAMEDNODEMAP) { - ce = U_CLASS_ENTRY(dom_namednodemap_class_entry); + ce = dom_namednodemap_class_entry; } else { - ce = U_CLASS_ENTRY(dom_nodelist_class_entry); + ce = dom_nodelist_class_entry; } object_init_ex(return_value, ce); @@ -1209,69 +1209,69 @@ case XML_DOCUMENT_NODE: case XML_HTML_DOCUMENT_NODE: { - ce = U_CLASS_ENTRY(dom_document_class_entry); + ce = dom_document_class_entry; break; } case XML_DTD_NODE: case XML_DOCUMENT_TYPE_NODE: { - ce = U_CLASS_ENTRY(dom_documenttype_class_entry); + ce = dom_documenttype_class_entry; break; } case XML_ELEMENT_NODE: { - ce = U_CLASS_ENTRY(dom_element_class_entry); + ce = dom_element_class_entry; break; } case XML_ATTRIBUTE_NODE: { - ce = U_CLASS_ENTRY(dom_attr_class_entry); + ce = dom_attr_class_entry; break; } case XML_TEXT_NODE: { - ce = U_CLASS_ENTRY(dom_text_class_entry); + ce = dom_text_class_entry; break; } case XML_COMMENT_NODE: { - ce = U_CLASS_ENTRY(dom_comment_class_entry); + ce = dom_comment_class_entry; break; } case XML_PI_NODE: { - ce = U_CLASS_ENTRY(dom_processinginstruction_class_entry); + ce = dom_processinginstruction_class_entry; break; } case XML_ENTITY_REF_NODE: { - ce = U_CLASS_ENTRY(dom_entityreference_class_entry); + ce = dom_entityreference_class_entry; break; } case XML_ENTITY_DECL: case XML_ELEMENT_DECL: { - ce = U_CLASS_ENTRY(dom_entity_class_entry); + ce = dom_entity_class_entry; break; } case XML_CDATA_SECTION_NODE: { - ce = U_CLASS_ENTRY(dom_cdatasection_class_entry); + ce = dom_cdatasection_class_entry; break; } case XML_DOCUMENT_FRAG_NODE: { - ce = U_CLASS_ENTRY(dom_documentfragment_class_entry); + ce = dom_documentfragment_class_entry; break; } case XML_NOTATION_NODE: { - ce = U_CLASS_ENTRY(dom_notation_class_entry); + ce = dom_notation_class_entry; break; } case XML_NAMESPACE_DECL: { - ce = U_CLASS_ENTRY(dom_namespace_node_class_entry); + ce = dom_namespace_node_class_entry; break; } default: @@ -1300,7 +1300,7 @@ void php_dom_create_implementation(zval **retval TSRMLS_DC) { - object_init_ex(*retval, U_CLASS_ENTRY(dom_domimplementation_class_entry)); + object_init_ex(*retval, dom_domimplementation_class_entry); } /* {{{ int dom_hierarchy(xmlNodePtr parent, xmlNodePtr child) */ http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/processinginstruction.c?r1=1.19&r2=1.20&diff_format=u Index: php-src/ext/dom/processinginstruction.c diff -u php-src/ext/dom/processinginstruction.c:1.19 php-src/ext/dom/processinginstruction.c:1.20 --- php-src/ext/dom/processinginstruction.c:1.19 Sun Jan 1 13:09:49 2006 +++ php-src/ext/dom/processinginstruction.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: processinginstruction.c,v 1.19 2006/01/01 13:09:49 sniper Exp $ */ +/* $Id: processinginstruction.c,v 1.20 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -50,8 +50,8 @@ char *name, *value = NULL; int name_len, value_len, name_valid; - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(dom_domexception_class_entry) TSRMLS_CC); - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|s", &id, U_CLASS_ENTRY(dom_processinginstruction_class_entry), &name, &name_len, &value, &value_len) == FAILURE) { + php_set_error_handling(EH_THROW, dom_domexception_class_entry TSRMLS_CC); + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|s", &id, dom_processinginstruction_class_entry, &name, &name_len, &value, &value_len) == FAILURE) { php_std_error_handling(); return; } http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/text.c?r1=1.25&r2=1.26&diff_format=u Index: php-src/ext/dom/text.c diff -u php-src/ext/dom/text.c:1.25 php-src/ext/dom/text.c:1.26 --- php-src/ext/dom/text.c:1.25 Sun Jan 1 13:09:49 2006 +++ php-src/ext/dom/text.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: text.c,v 1.25 2006/01/01 13:09:49 sniper Exp $ */ +/* $Id: text.c,v 1.26 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -54,8 +54,8 @@ char *value = NULL; int value_len; - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(dom_domexception_class_entry) TSRMLS_CC); - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|s", &id, U_CLASS_ENTRY(dom_text_class_entry), &value, &value_len) == FAILURE) { + php_set_error_handling(EH_THROW, dom_domexception_class_entry TSRMLS_CC); + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|s", &id, dom_text_class_entry, &value, &value_len) == FAILURE) { php_std_error_handling(); return; } @@ -125,7 +125,7 @@ int length; dom_object *intern; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol", &id, U_CLASS_ENTRY(dom_text_class_entry), &offset) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol", &id, dom_text_class_entry, &offset) == FAILURE) { return; } DOM_GET_OBJ(node, id, xmlNodePtr, intern); @@ -177,7 +177,7 @@ xmlNodePtr node; dom_object *intern; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, U_CLASS_ENTRY(dom_text_class_entry)) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_text_class_entry) == FAILURE) { return; } DOM_GET_OBJ(node, id, xmlNodePtr, intern); http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/xpath.c?r1=1.28&r2=1.29&diff_format=u Index: php-src/ext/dom/xpath.c diff -u php-src/ext/dom/xpath.c:1.28 php-src/ext/dom/xpath.c:1.29 --- php-src/ext/dom/xpath.c:1.28 Sun Jan 1 13:09:49 2006 +++ php-src/ext/dom/xpath.c Mon Feb 13 10:23:57 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: xpath.c,v 1.28 2006/01/01 13:09:49 sniper Exp $ */ +/* $Id: xpath.c,v 1.29 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -52,8 +52,8 @@ dom_object *docobj, *intern; xmlXPathContextPtr ctx, oldctx; - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(dom_domexception_class_entry) TSRMLS_CC); - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &id, U_CLASS_ENTRY(dom_xpath_class_entry), &doc, U_CLASS_ENTRY(dom_document_class_entry)) == FAILURE) { + php_set_error_handling(EH_THROW, dom_domexception_class_entry TSRMLS_CC); + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO", &id, dom_xpath_class_entry, &doc, dom_document_class_entry) == FAILURE) { php_std_error_handling(); return; } @@ -111,7 +111,7 @@ dom_object *intern; unsigned char *prefix, *ns_uri; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oss", &id, U_CLASS_ENTRY(dom_xpath_class_entry), &prefix, &prefix_len, &ns_uri, &ns_uri_len) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oss", &id, dom_xpath_class_entry, &prefix, &prefix_len, &ns_uri, &ns_uri_len) == FAILURE) { return; } @@ -151,7 +151,7 @@ xmlNsPtr *ns; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|O", &id, U_CLASS_ENTRY(dom_xpath_class_entry), &expr, &expr_len, &context, U_CLASS_ENTRY(dom_node_class_entry)) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|O", &id, dom_xpath_class_entry, &expr, &expr_len, &context, dom_node_class_entry) == FAILURE) { return; } http://cvs.php.net/viewcvs.cgi/php-src/ext/pdo/pdo.c?r1=1.70&r2=1.71&diff_format=u Index: php-src/ext/pdo/pdo.c diff -u php-src/ext/pdo/pdo.c:1.70 php-src/ext/pdo/pdo.c:1.71 --- php-src/ext/pdo/pdo.c:1.70 Sun Jan 1 13:09:52 2006 +++ php-src/ext/pdo/pdo.c Mon Feb 13 10:23:57 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo.c,v 1.70 2006/01/01 13:09:52 sniper Exp $ */ +/* $Id: pdo.c,v 1.71 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -55,7 +55,7 @@ PDO_API zend_class_entry *php_pdo_get_exception(TSRMLS_D) { - return U_CLASS_ENTRY(pdo_exception_ce); + return pdo_exception_ce; } PDO_API char *php_pdo_str_tolower_dup(const char *src, int len) http://cvs.php.net/viewcvs.cgi/php-src/ext/pdo/pdo_dbh.c?r1=1.110&r2=1.111&diff_format=u Index: php-src/ext/pdo/pdo_dbh.c diff -u php-src/ext/pdo/pdo_dbh.c:1.110 php-src/ext/pdo/pdo_dbh.c:1.111 --- php-src/ext/pdo/pdo_dbh.c:1.110 Wed Feb 1 09:10:23 2006 +++ php-src/ext/pdo/pdo_dbh.c Mon Feb 13 10:23:57 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_dbh.c,v 1.110 2006/02/01 09:10:23 tony2001 Exp $ */ +/* $Id: pdo_dbh.c,v 1.111 2006/02/13 10:23:57 dmitry Exp $ */ /* The PDO Database Handle Class */ @@ -508,7 +508,7 @@ RETURN_FALSE; } dbstmt_ce = *pce; - if (!instanceof_function(dbstmt_ce, U_CLASS_ENTRY(pdo_dbstmt_ce) TSRMLS_CC)) { + if (!instanceof_function(dbstmt_ce, pdo_dbstmt_ce TSRMLS_CC)) { pdo_raise_impl_error(dbh, NULL, "HY000", "user-supplied statement class must be derived from PDOStatement" TSRMLS_CC); PDO_HANDLE_DBH_ERR(); @@ -727,7 +727,7 @@ PDO_HANDLE_DBH_ERR(); RETURN_FALSE; } - if (!instanceof_function(*pce, U_CLASS_ENTRY(pdo_dbstmt_ce) TSRMLS_CC)) { + if (!instanceof_function(*pce, pdo_dbstmt_ce TSRMLS_CC)) { pdo_raise_impl_error(dbh, NULL, "HY000", "user-supplied statement class must be derived from PDOStatement" TSRMLS_CC); PDO_HANDLE_DBH_ERR(); @@ -1372,7 +1372,7 @@ ALLOC_HASHTABLE(dbh->properties); zend_hash_init(dbh->properties, 0, NULL, ZVAL_PTR_DTOR, 0); zend_hash_copy(dbh->properties, &ce->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *)); - dbh->def_stmt_ce = U_CLASS_ENTRY(pdo_dbstmt_ce); + dbh->def_stmt_ce = pdo_dbstmt_ce; retval.handle = zend_objects_store_put(dbh, (zend_objects_store_dtor_t)zend_objects_destroy_object, (zend_objects_free_object_storage_t)pdo_dbh_free_storage, NULL TSRMLS_CC); retval.handlers = &pdo_dbh_object_handlers; http://cvs.php.net/viewcvs.cgi/php-src/ext/pdo/pdo_stmt.c?r1=1.143&r2=1.144&diff_format=u Index: php-src/ext/pdo/pdo_stmt.c diff -u php-src/ext/pdo/pdo_stmt.c:1.143 php-src/ext/pdo/pdo_stmt.c:1.144 --- php-src/ext/pdo/pdo_stmt.c:1.143 Sun Feb 5 23:31:47 2006 +++ php-src/ext/pdo/pdo_stmt.c Mon Feb 13 10:23:57 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_stmt.c,v 1.143 2006/02/05 23:31:47 helly Exp $ */ +/* $Id: pdo_stmt.c,v 1.144 2006/02/13 10:23:57 dmitry Exp $ */ /* The PDO Statement Handle Class */ @@ -1178,7 +1178,7 @@ switch(ZEND_NUM_ARGS()) { case 0: - stmt->fetch.cls.ce = U_CLASS_ENTRY(zend_standard_class_def); + stmt->fetch.cls.ce = zend_standard_class_def; break; case 2: if (Z_TYPE_P(ctor_args) != IS_NULL && Z_TYPE_P(ctor_args) != IS_ARRAY) { @@ -1274,7 +1274,7 @@ switch(ZEND_NUM_ARGS()) { case 0: case 1: - stmt->fetch.cls.ce = U_CLASS_ENTRY(zend_standard_class_def); + stmt->fetch.cls.ce = zend_standard_class_def; break; case 3: if (Z_TYPE_P(ctor_args) != IS_NULL && Z_TYPE_P(ctor_args) != IS_ARRAY) { @@ -2406,7 +2406,7 @@ static zend_class_entry *row_get_ce(zval *object TSRMLS_DC) { - return U_CLASS_ENTRY(pdo_dbstmt_ce); + return pdo_dbstmt_ce; } static int row_get_classname(zval *object, char **class_name, zend_uint *class_name_len, int parent TSRMLS_DC) http://cvs.php.net/viewcvs.cgi/php-src/ext/pdo/php_pdo_phpvers_compat.h?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/pdo/php_pdo_phpvers_compat.h diff -u php-src/ext/pdo/php_pdo_phpvers_compat.h:1.2 php-src/ext/pdo/php_pdo_phpvers_compat.h:1.3 --- php-src/ext/pdo/php_pdo_phpvers_compat.h:1.2 Sun Jan 1 13:09:52 2006 +++ php-src/ext/pdo/php_pdo_phpvers_compat.h Mon Feb 13 10:23:57 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_phpvers_compat.h,v 1.2 2006/01/01 13:09:52 sniper Exp $ */ +/* $Id: php_pdo_phpvers_compat.h,v 1.3 2006/02/13 10:23:57 dmitry Exp $ */ /* macros for backwards compatibility with PHP 5, so that HEAD of PDO and its * drivers may still build against PHP 5 */ @@ -27,7 +27,6 @@ # define ZVAL_RT_STRINGL(a, b, c, d) ZVAL_STRINGL(a, b, c, d) # define ZVAL_ASCII_STRINGL(a, b, c, d) ZVAL_STRINGL(a, b, c, d) -# define U_CLASS_ENTRY(ce) ce # define PDO_ZVAL_PP_IS_TEXT(pp) (Z_TYPE_PP(pp) == IS_STRING) # define PDO_ZVAL_P_IS_TEXT(pp) (Z_TYPE_P(pp) == IS_STRING) # define Z_UNIVAL_PP(x) Z_STRVAL_PP(x) http://cvs.php.net/viewcvs.cgi/php-src/ext/reflection/php_reflection.c?r1=1.203&r2=1.204&diff_format=u Index: php-src/ext/reflection/php_reflection.c diff -u php-src/ext/reflection/php_reflection.c:1.203 php-src/ext/reflection/php_reflection.c:1.204 --- php-src/ext/reflection/php_reflection.c:1.203 Wed Feb 8 00:37:31 2006 +++ php-src/ext/reflection/php_reflection.c Mon Feb 13 10:23:57 2006 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_reflection.c,v 1.203 2006/02/08 00:37:31 iliaa Exp $ */ +/* $Id: php_reflection.c,v 1.204 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -71,7 +71,7 @@ /* Method macros */ #define METHOD_NOTSTATIC(ce) \ - if (!this_ptr || !instanceof_function(Z_OBJCE_P(this_ptr), U_CLASS_ENTRY(ce) TSRMLS_CC)) { \ + if (!this_ptr || !instanceof_function(Z_OBJCE_P(this_ptr), ce TSRMLS_CC)) { \ zend_error(E_ERROR, "%v() cannot be called statically", get_active_function_name(TSRMLS_C)); \ return; \ } \ @@ -83,11 +83,11 @@ /* Exception throwing macro */ #define _DO_THROW(msg) \ - zend_throw_exception(U_CLASS_ENTRY(reflection_exception_ptr), msg, 0 TSRMLS_CC); \ + zend_throw_exception(reflection_exception_ptr, msg, 0 TSRMLS_CC); \ return; \ #define RETURN_ON_EXCEPTION \ - if (EG(exception) && Z_OBJCE_P(EG(exception)) == U_CLASS_ENTRY(reflection_exception_ptr)) { \ + if (EG(exception) && Z_OBJCE_P(EG(exception)) == reflection_exception_ptr) { \ return; \ } @@ -960,7 +960,7 @@ MAKE_STD_ZVAL(name); ZVAL_TEXTL(name, ce->name, ce->name_length, 1); - reflection_instanciate(U_CLASS_ENTRY(reflection_class_ptr), object TSRMLS_CC); + reflection_instanciate(reflection_class_ptr, object TSRMLS_CC); intern = (reflection_object *) zend_object_store_get_object(object TSRMLS_CC); intern->ptr = ce; intern->free_ptr = 0; @@ -986,7 +986,7 @@ } free_alloca(lcname); - reflection_instanciate(U_CLASS_ENTRY(reflection_extension_ptr), object TSRMLS_CC); + reflection_instanciate(reflection_extension_ptr, object TSRMLS_CC); intern = (reflection_object *) zend_object_store_get_object(object TSRMLS_CC); MAKE_STD_ZVAL(name); ZVAL_STRINGL(name, module->name, name_len, 1); @@ -1010,7 +1010,7 @@ } else { ZVAL_NULL(name); } - reflection_instanciate(U_CLASS_ENTRY(reflection_parameter_ptr), object TSRMLS_CC); + reflection_instanciate(reflection_parameter_ptr, object TSRMLS_CC); intern = (reflection_object *) zend_object_store_get_object(object TSRMLS_CC); reference = (parameter_reference*) emalloc(sizeof(parameter_reference)); reference->arg_info = arg_info; @@ -1033,7 +1033,7 @@ MAKE_STD_ZVAL(name); ZVAL_TEXT(name, function->common.function_name, 1); - reflection_instanciate(U_CLASS_ENTRY(reflection_function_ptr), object TSRMLS_CC); + reflection_instanciate(reflection_function_ptr, object TSRMLS_CC); intern = (reflection_object *) zend_object_store_get_object(object TSRMLS_CC); intern->ptr = function; intern->free_ptr = 0; @@ -1053,7 +1053,7 @@ MAKE_STD_ZVAL(classname); ZVAL_TEXT(name, method->common.function_name, 1); ZVAL_TEXTL(classname, ce->name, ce->name_length, 1); - reflection_instanciate(U_CLASS_ENTRY(reflection_method_ptr), object TSRMLS_CC); + reflection_instanciate(reflection_method_ptr, object TSRMLS_CC); intern = (reflection_object *) zend_object_store_get_object(object TSRMLS_CC); intern->ptr = method; intern->free_ptr = 0; @@ -1091,7 +1091,7 @@ ZVAL_TEXT(name, prop_name, 1); ZVAL_TEXTL(classname, ce->name, ce->name_length, 1); - reflection_instanciate(U_CLASS_ENTRY(reflection_property_ptr), object TSRMLS_CC); + reflection_instanciate(reflection_property_ptr, object TSRMLS_CC); intern = (reflection_object *) zend_object_store_get_object(object TSRMLS_CC); reference = (property_reference*) emalloc(sizeof(property_reference)); reference->ce = ce; @@ -1175,7 +1175,7 @@ params[1] = &output_ptr; ZVAL_STRINGL(&fname, "export", sizeof("export") - 1, 0); - fci.function_table = &U_CLASS_ENTRY(reflection_ptr)->function_table; + fci.function_table = &reflection_ptr->function_table; fci.function_name = &fname; fci.object_pp = NULL; fci.retval_ptr_ptr = &retval_ptr; @@ -1218,7 +1218,7 @@ int result; zend_bool return_output = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|b", &object, U_CLASS_ENTRY(reflector_ptr), &return_output) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|b", &object, reflector_ptr, &return_output) == FAILURE) { return; } @@ -1290,7 +1290,7 @@ Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ ZEND_METHOD(reflection_function, export) { - _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(reflection_function_ptr), 1); + _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, reflection_function_ptr, 1); } /* }}} */ @@ -1320,7 +1320,7 @@ lcname = zend_u_str_case_fold(type, name_str, name_len, 1, &lcname_len); if (zend_u_hash_find(EG(function_table), type, lcname, lcname_len + 1, (void **)&fptr) == FAILURE) { efree(lcname); - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Function %R() does not exist", type, name_str); return; } @@ -1511,7 +1511,7 @@ efree(params); if (result == FAILURE) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Invocation of function %v() failed", fptr->common.function_name); return; } @@ -1575,7 +1575,7 @@ efree(params); if (result == FAILURE) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Invocation of function %v() failed", fptr->common.function_name); return; } @@ -1707,7 +1707,7 @@ Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ ZEND_METHOD(reflection_parameter, export) { - _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(reflection_parameter_ptr), 2); + _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, reflection_parameter_ptr, 2); } /* }}} */ @@ -1746,7 +1746,7 @@ lcname = zend_u_str_case_fold(Z_TYPE_P(reference), Z_UNIVAL_P(reference), Z_UNILEN_P(reference), 1, &lcname_len); if (zend_u_hash_find(EG(function_table), Z_TYPE_P(reference), lcname, lcname_len + 1, (void**) &fptr) == FAILURE) { efree(lcname); - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Function %R() does not exist", Z_TYPE_P(reference), Z_UNIVAL_P(reference)); return; } @@ -1772,7 +1772,7 @@ } else { convert_to_text_ex(classref); if (zend_u_lookup_class(Z_TYPE_PP(classref), Z_UNIVAL_PP(classref), Z_UNILEN_PP(classref), &pce TSRMLS_CC) == FAILURE) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Class %R does not exist", Z_TYPE_PP(classref), Z_UNIVAL_PP(classref)); return; } @@ -1783,7 +1783,7 @@ lcname = zend_u_str_case_fold(Z_TYPE_PP(method), Z_UNIVAL_PP(method), Z_UNILEN_PP(method), 1, &lcname_len); if (zend_u_hash_find(&ce->function_table, Z_TYPE_PP(method), lcname, lcname_len + 1, (void **) &fptr) == FAILURE) { efree(lcname); - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Method %R::%R() does not exist", Z_TYPE_PP(classref), Z_UNIVAL_PP(classref), Z_TYPE_PP(method), Z_UNIVAL_PP(method)); return; } @@ -1881,7 +1881,7 @@ zend_class_entry **pce; if (zend_u_lookup_class_ex(UG(unicode)?IS_UNICODE:IS_STRING, param->arg_info->class_name, param->arg_info->class_name_len, 1, &pce TSRMLS_CC) == FAILURE) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Class %v does not exist", param->arg_info->class_name); return; } @@ -1986,16 +1986,16 @@ if (param->fptr->type != ZEND_USER_FUNCTION) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, "Cannot determine default value for internal functions"); + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Cannot determine default value for internal functions"); return; } if (param->offset < param->required) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, "Parameter is not optional"); + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Parameter is not optional"); return; } precv = _get_recv_op((zend_op_array*)param->fptr, param->offset); if (!precv || precv->opcode != ZEND_RECV_INIT || precv->op2.op_type == IS_UNUSED) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, "Internal error"); + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Internal error"); return; } @@ -2010,7 +2010,7 @@ Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ ZEND_METHOD(reflection_method, export) { - _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(reflection_method_ptr), 2); + _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, reflection_method_ptr, 2); } /* }}} */ @@ -2057,7 +2057,7 @@ case IS_STRING: case IS_UNICODE: if (zend_u_lookup_class(Z_TYPE_P(classname), Z_UNIVAL_P(classname), Z_UNILEN_P(classname), &pce TSRMLS_CC) == FAILURE) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Class %v does not exist", Z_UNIVAL_P(classname)); return; } @@ -2086,7 +2086,7 @@ if (zend_u_hash_find(&ce->function_table, type, lcname, lcname_len + 1, (void **) &mptr) == FAILURE) { efree(lcname); - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Method %v::%R() does not exist", ce->name, type, name_str); return; } @@ -2144,11 +2144,11 @@ if (!(mptr->common.fn_flags & ZEND_ACC_PUBLIC) || (mptr->common.fn_flags & ZEND_ACC_ABSTRACT)) { if (mptr->common.fn_flags & ZEND_ACC_ABSTRACT) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Trying to invoke abstract method %v::%v()", mptr->common.scope->name, mptr->common.function_name); } else { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Trying to invoke %s method %v::%v() from scope %v", mptr->common.fn_flags & ZEND_ACC_PROTECTED ? "protected" : "private", mptr->common.scope->name, mptr->common.function_name, @@ -2209,7 +2209,7 @@ efree(params); if (result == FAILURE) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Invocation of method %v::%v() failed", mptr->common.scope->name, mptr->common.function_name); return; } @@ -2247,11 +2247,11 @@ if (!(mptr->common.fn_flags & ZEND_ACC_PUBLIC) || (mptr->common.fn_flags & ZEND_ACC_ABSTRACT)) { if (mptr->common.fn_flags & ZEND_ACC_ABSTRACT) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Trying to invoke abstract method %v::%v", mptr->common.scope->name, mptr->common.function_name); } else { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Trying to invoke %s method %v::%v from scope %v", mptr->common.fn_flags & ZEND_ACC_PROTECTED ? "protected" : "private", mptr->common.scope->name, mptr->common.function_name, @@ -2278,7 +2278,7 @@ } else { if (!object) { efree(params); - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Trying to invoke non static method %v::%v without an object", mptr->common.scope->name, mptr->common.function_name); return; @@ -2313,7 +2313,7 @@ efree(params); if (result == FAILURE) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Invocation of method %v::%v() failed", mptr->common.scope->name, mptr->common.function_name); return; } @@ -2440,7 +2440,7 @@ GET_REFLECTION_OBJECT_PTR(mptr); if (!mptr->common.prototype) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Method %v::%v does not have a prototype", intern->ce->name, mptr->common.function_name); return; } @@ -2453,7 +2453,7 @@ Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ ZEND_METHOD(reflection_class, export) { - _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(reflection_class_ptr), 1); + _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, reflection_class_ptr, 1); } /* }}} */ @@ -2495,7 +2495,7 @@ convert_to_string_ex(&argument); if (zend_u_lookup_class(Z_TYPE_P(argument), Z_UNIVAL_P(argument), Z_UNILEN_P(argument), &ce TSRMLS_CC) == FAILURE) { if (!EG(exception)) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), -1 TSRMLS_CC, "Class %R does not exist", Z_TYPE_P(argument), Z_UNIVAL_P(argument)); + zend_throw_exception_ex(reflection_exception_ptr, -1 TSRMLS_CC, "Class %R does not exist", Z_TYPE_P(argument), Z_UNIVAL_P(argument)); } return; } @@ -2559,7 +2559,7 @@ if (def_value) { RETURN_ZVAL(def_value, 1, 0); } else { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Class %v does not have a property named %R", ce->name, name_type, name); } return; @@ -2591,7 +2591,7 @@ zend_update_class_constants(ce TSRMLS_CC); variable_ptr = zend_std_get_static_property(ce, name_type, name, name_len, 1 TSRMLS_CC); if (!variable_ptr) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Class %v does not have a property named %R", ce->name, name_type, name); return; } @@ -2837,7 +2837,7 @@ efree(lc_name); } else { efree(lc_name); - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Method %R does not exist", type, name); return; } @@ -2952,7 +2952,7 @@ if (zend_u_lookup_class(name_type, classname, classname_len, &pce TSRMLS_CC) == FAILURE) { if (!EG(exception)) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), -1 TSRMLS_CC, "Class %R does not exist", name_type, classname); + zend_throw_exception_ex(reflection_exception_ptr, -1 TSRMLS_CC, "Class %R does not exist", name_type, classname); } efree(classname); return; @@ -2960,7 +2960,7 @@ efree(classname); if (!instanceof_function(ce, *pce TSRMLS_CC)) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), -1 TSRMLS_CC, "Fully qualified property name %v::%R does not specify a base class of %v", (*pce)->name, name_type, name, ce->name); + zend_throw_exception_ex(reflection_exception_ptr, -1 TSRMLS_CC, "Fully qualified property name %v::%R does not specify a base class of %v", (*pce)->name, name_type, name, ce->name); return; } ce = *pce; @@ -2970,7 +2970,7 @@ return; } } - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Property %R does not exist", name_type, name); } /* }}} */ @@ -3196,7 +3196,7 @@ zend_fcall_info_cache fcc; if (!(ce->constructor->common.fn_flags & ZEND_ACC_PUBLIC)) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, "Access to non-public constructor of class %v", ce->name); + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Access to non-public constructor of class %v", ce->name); return; } @@ -3236,7 +3236,7 @@ } else if (!ZEND_NUM_ARGS()) { object_init_ex(return_value, ce); } else { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, "Class %v does not have a constructor, so you cannot pass any constructor arguments", ce->name); + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Class %v does not have a constructor, so you cannot pass any constructor arguments", ce->name); } } /* }}} */ @@ -3267,7 +3267,7 @@ zend_fcall_info_cache fcc; if (!(ce->constructor->common.fn_flags & ZEND_ACC_PUBLIC)) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, "Access to non-public constructor of class %v", ce->name); + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Access to non-public constructor of class %v", ce->name); return; } @@ -3305,7 +3305,7 @@ } else if (!ZEND_NUM_ARGS()) { object_init_ex(return_value, ce); } else { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, "Class %v does not have a constructor, so you cannot pass any constructor arguments", ce->name); + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Class %v does not have a constructor, so you cannot pass any constructor arguments", ce->name); } } /* }}} */ @@ -3373,14 +3373,14 @@ case IS_STRING: case IS_UNICODE: if (zend_u_lookup_class(Z_TYPE_P(class_name), Z_UNIVAL_P(class_name), Z_UNILEN_P(class_name), &pce TSRMLS_CC) == FAILURE) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Interface %R does not exist", Z_TYPE_P(class_name), Z_UNIVAL_P(class_name)); return; } class_ce = *pce; break; case IS_OBJECT: - if (instanceof_function(Z_OBJCE_P(class_name), U_CLASS_ENTRY(reflection_class_ptr) TSRMLS_CC)) { + if (instanceof_function(Z_OBJCE_P(class_name), reflection_class_ptr TSRMLS_CC)) { argument = (reflection_object *) zend_object_store_get_object(class_name TSRMLS_CC); if (argument == NULL || argument->ptr == NULL) { zend_error(E_ERROR, "Internal error: Failed to retrieve the argument's reflection object"); @@ -3391,7 +3391,7 @@ } /* no break */ default: - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Parameter one must either be a string or a ReflectionClass object"); return; } @@ -3420,14 +3420,14 @@ case IS_STRING: case IS_UNICODE: if (zend_u_lookup_class(Z_TYPE_P(interface), Z_UNIVAL_P(interface), Z_UNILEN_P(interface), &pce TSRMLS_CC) == FAILURE) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Interface %R does not exist", Z_TYPE_P(interface), Z_UNIVAL_P(interface)); return; } interface_ce = *pce; break; case IS_OBJECT: - if (instanceof_function(Z_OBJCE_P(interface), U_CLASS_ENTRY(reflection_class_ptr) TSRMLS_CC)) { + if (instanceof_function(Z_OBJCE_P(interface), reflection_class_ptr TSRMLS_CC)) { argument = (reflection_object *) zend_object_store_get_object(interface TSRMLS_CC); if (argument == NULL || argument->ptr == NULL) { zend_error(E_ERROR, "Internal error: Failed to retrieve the argument's reflection object"); @@ -3438,13 +3438,13 @@ } /* no break */ default: - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Parameter one must either be a string or a ReflectionClass object"); return; } if (!(interface_ce->ce_flags & ZEND_ACC_INTERFACE)) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Interface %v is a Class", interface_ce->name); return; } @@ -3504,7 +3504,7 @@ Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ ZEND_METHOD(reflection_object, export) { - _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(reflection_object_ptr), 1); + _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, reflection_object_ptr, 1); } /* }}} */ @@ -3520,7 +3520,7 @@ Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ ZEND_METHOD(reflection_property, export) { - _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(reflection_property_ptr), 2); + _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, reflection_property_ptr, 2); } /* }}} */ @@ -3554,7 +3554,7 @@ case IS_STRING: case IS_UNICODE: if (zend_u_lookup_class(Z_TYPE_P(classname), Z_UNIVAL_P(classname), Z_UNILEN_P(classname), &pce TSRMLS_CC) == FAILURE) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Class %R does not exist", Z_TYPE_P(classname), Z_UNIVAL_P(classname)); return; } @@ -3571,7 +3571,7 @@ } if (zend_u_hash_find(&ce->properties_info, name_type, name_str, name_len + 1, (void **) &property_info) == FAILURE || (property_info->flags & ZEND_ACC_SHADOW)) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Property %v::$%R does not exist", ce->name, name_type, name_str); return; } @@ -3839,7 +3839,7 @@ Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */ ZEND_METHOD(reflection_extension, export) { - _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(reflection_extension_ptr), 1); + _reflection_export(INTERNAL_FUNCTION_PARAM_PASSTHRU, reflection_extension_ptr, 1); } /* }}} */ @@ -3868,7 +3868,7 @@ zend_str_tolower_copy(lcname, name_str, name_len); if (zend_hash_find(&module_registry, lcname, name_len + 1, (void **)&module) == FAILURE) { free_alloca(lcname); - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Extension %s does not exist", name_str); return; } @@ -4248,7 +4248,7 @@ && (ZEND_U_EQUAL(Z_TYPE_P(member), Z_UNIVAL_P(member), Z_UNILEN_P(member), "name", sizeof("name")-1) || ZEND_U_EQUAL(Z_TYPE_P(member), Z_UNIVAL_P(member), Z_UNILEN_P(member), "class", sizeof("class")-1))) { - zend_throw_exception_ex(U_CLASS_ENTRY(reflection_exception_ptr), 0 TSRMLS_CC, + zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Cannot set read-only property %v::$%R", Z_OBJCE_P(object)->name, Z_TYPE_P(member), Z_UNIVAL_P(member)); } else @@ -4342,7 +4342,7 @@ php_info_print_table_start(); php_info_print_table_header(2, "Reflection", "enabled"); - php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 1.203 2006/02/08 00:37:31 iliaa Exp $"); + php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 1.204 2006/02/13 10:23:57 dmitry Exp $"); php_info_print_table_end(); } /* }}} */ http://cvs.php.net/viewcvs.cgi/php-src/ext/session/tests/015.phpt?r1=1.5&r2=1.6&diff_format=u Index: php-src/ext/session/tests/015.phpt diff -u php-src/ext/session/tests/015.phpt:1.5 php-src/ext/session/tests/015.phpt:1.6 --- php-src/ext/session/tests/015.phpt:1.5 Mon Jul 4 13:09:14 2005 +++ php-src/ext/session/tests/015.phpt Mon Feb 13 10:23:57 2006 @@ -6,7 +6,7 @@ session.use_trans_sid=1 session.use_cookies=0 session.cache_limiter= -arg_separator.output=& +arg_separator.output="&" session.name=PHPSESSID session.serialize_handler=php session.save_handler=files http://cvs.php.net/viewcvs.cgi/php-src/ext/session/tests/020.phpt?r1=1.4&r2=1.5&diff_format=u Index: php-src/ext/session/tests/020.phpt diff -u php-src/ext/session/tests/020.phpt:1.4 php-src/ext/session/tests/020.phpt:1.5 --- php-src/ext/session/tests/020.phpt:1.4 Mon Jul 4 13:09:14 2005 +++ php-src/ext/session/tests/020.phpt Mon Feb 13 10:23:57 2006 @@ -6,7 +6,7 @@ session.use_cookies=0 session.cache_limiter= session.use_trans_sid=1 -arg_separator.output=& +arg_separator.output="&" session.name=PHPSESSID session.serialize_handler=php session.save_handler=files http://cvs.php.net/viewcvs.cgi/php-src/ext/simplexml/simplexml.c?r1=1.185&r2=1.186&diff_format=u Index: php-src/ext/simplexml/simplexml.c diff -u php-src/ext/simplexml/simplexml.c:1.185 php-src/ext/simplexml/simplexml.c:1.186 --- php-src/ext/simplexml/simplexml.c:1.185 Mon Feb 6 10:54:49 2006 +++ php-src/ext/simplexml/simplexml.c Mon Feb 13 10:23:57 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: simplexml.c,v 1.185 2006/02/06 10:54:49 tony2001 Exp $ */ +/* $Id: simplexml.c,v 1.186 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -44,7 +44,7 @@ ZEND_API zend_class_entry *sxe_get_element_class_entry(TSRMLS_D) { - return U_CLASS_ENTRY(sxe_class_entry); + return sxe_class_entry; } #define SXE_ME(func, arg_info, flags) PHP_ME(simplexml_element, func, arg_info, flags) @@ -1585,7 +1585,7 @@ char *classname = ""; int classname_len = 0; long options = 0; - zend_class_entry *ce= U_CLASS_ENTRY(sxe_class_entry); + zend_class_entry *ce= sxe_class_entry; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|sl", &filename, &filename_len, &classname, &classname_len, &options) == FAILURE) { return; @@ -1629,7 +1629,7 @@ char *classname = ""; int classname_len = 0; long options = 0; - zend_class_entry *ce= U_CLASS_ENTRY(sxe_class_entry); + zend_class_entry *ce= sxe_class_entry; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|sl", &data, &data_len, &classname, &classname_len, &options) == FAILURE) { return; @@ -1896,7 +1896,7 @@ xmlNodePtr nodep = NULL; char *classname = ""; int classname_len = 0; - zend_class_entry *ce= U_CLASS_ENTRY(sxe_class_entry); + zend_class_entry *ce= sxe_class_entry; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o|s", &node, &classname, &classname_len) == FAILURE) { return; @@ -2032,7 +2032,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, "Simplexml support", "enabled"); - php_info_print_table_row(2, "Revision", "$Revision: 1.185 $"); + php_info_print_table_row(2, "Revision", "$Revision: 1.186 $"); php_info_print_table_row(2, "Schema support", #ifdef LIBXML_SCHEMAS_ENABLED "enabled"); http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/php_spl.c?r1=1.84&r2=1.85&diff_format=u Index: php-src/ext/spl/php_spl.c diff -u php-src/ext/spl/php_spl.c:1.84 php-src/ext/spl/php_spl.c:1.85 --- php-src/ext/spl/php_spl.c:1.84 Sun Feb 12 16:43:30 2006 +++ php-src/ext/spl/php_spl.c Mon Feb 13 10:23:57 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_spl.c,v 1.84 2006/02/12 16:43:30 helly Exp $ */ +/* $Id: php_spl.c,v 1.85 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -145,7 +145,7 @@ /* }}} */ #define SPL_ADD_CLASS(class_name, z_list, sub, allow, ce_flags) \ - spl_add_classes(U_CLASS_ENTRY(spl_ce_ ## class_name), z_list, sub, allow, ce_flags TSRMLS_CC) + spl_add_classes(spl_ce_ ## class_name, z_list, sub, allow, ce_flags TSRMLS_CC) #define SPL_LIST_CLASSES(z_list, sub, allow, ce_flags) \ SPL_ADD_CLASS(AppendIterator, z_list, sub, allow, ce_flags); \ @@ -298,7 +298,7 @@ EG(function_state_ptr) = original_function_state_ptr; if (!found) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_LogicException), 0 TSRMLS_CC, "Class %s could not be loaded", class_name); + zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Class %s could not be loaded", class_name); } } /* }}} */ @@ -420,25 +420,25 @@ if (Z_TYPE_P(zcallable) == IS_ARRAY) { if (!obj_ptr && alfi.func_ptr && !(alfi.func_ptr->common.fn_flags & ZEND_ACC_STATIC)) { if (do_throw) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_LogicException), 0 TSRMLS_CC, "Passed array specifies a non static method but no object"); + zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Passed array specifies a non static method but no object"); } zval_dtor(&zfunc_name); return; } else if (do_throw) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_LogicException), 0 TSRMLS_CC, "Passed array does not specify %s %smethod", alfi.func_ptr ? "a callable" : "an existing", !obj_ptr ? "static " : ""); + zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Passed array does not specify %s %smethod", alfi.func_ptr ? "a callable" : "an existing", !obj_ptr ? "static " : ""); } zval_dtor(&zfunc_name); return; } else if (Z_TYPE_P(zcallable) == IS_STRING || Z_TYPE_P(zcallable) == IS_UNICODE) { if (do_throw) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_LogicException), 0 TSRMLS_CC, "Function '%R' not %s", Z_TYPE_P(zcallable), Z_UNIVAL_P(zcallable), alfi.func_ptr ? "callable" : "found"); + zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Function '%R' not %s", Z_TYPE_P(zcallable), Z_UNIVAL_P(zcallable), alfi.func_ptr ? "callable" : "found"); } zval_dtor(&zfunc_name); return; } else { if (do_throw) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_LogicException), 0 TSRMLS_CC, "Illegal value passed"); + zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Illegal value passed"); } zval_dtor(&zfunc_name); return; http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_array.c?r1=1.97&r2=1.98&diff_format=u Index: php-src/ext/spl/spl_array.c diff -u php-src/ext/spl/spl_array.c:1.97 php-src/ext/spl/spl_array.c:1.98 --- php-src/ext/spl/spl_array.c:1.97 Sun Feb 12 16:43:30 2006 +++ php-src/ext/spl/spl_array.c Mon Feb 13 10:23:57 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_array.c,v 1.97 2006/02/12 16:43:30 helly Exp $ */ +/* $Id: spl_array.c,v 1.98 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -156,11 +156,11 @@ retval.handle = zend_objects_store_put(intern, (zend_objects_store_dtor_t)zend_objects_destroy_object, (zend_objects_free_object_storage_t) spl_array_object_free_storage, NULL TSRMLS_CC); while (parent) { - if (parent == U_CLASS_ENTRY(spl_ce_ArrayIterator) || parent == U_CLASS_ENTRY(spl_ce_RecursiveArrayIterator)) { + if (parent == spl_ce_ArrayIterator || parent == spl_ce_RecursiveArrayIterator) { retval.handlers = &spl_handler_ArrayIterator; class_type->get_iterator = spl_array_get_iterator; break; - } else if (parent == U_CLASS_ENTRY(spl_ce_ArrayObject)) { + } else if (parent == spl_ce_ArrayObject) { retval.handlers = &spl_handler_ArrayObject; break; } @@ -207,7 +207,7 @@ } } - intern->ce_get_iterator = U_CLASS_ENTRY(spl_ce_ArrayIterator); + intern->ce_get_iterator = spl_ce_ArrayIterator; zend_hash_internal_pointer_reset_ex(spl_array_get_hash_table(intern, 0 TSRMLS_CC), &intern->pos); return retval; } @@ -332,7 +332,7 @@ case IS_STRING: case IS_UNICODE: if (*(char*)Z_UNIVAL_P(offset) == '\0') { - zend_throw_exception(U_CLASS_ENTRY(spl_ce_InvalidArgumentException), "An offset must not begin with \\0 or be empty", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_InvalidArgumentException, "An offset must not begin with \\0 or be empty", 0 TSRMLS_CC); return; } value->refcount++; @@ -845,7 +845,7 @@ if (ZEND_NUM_ARGS() == 0) { return; /* nothing to do */ } - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(spl_ce_InvalidArgumentException) TSRMLS_CC); + php_set_error_handling(EH_THROW, spl_ce_InvalidArgumentException TSRMLS_CC); intern = (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC); @@ -856,7 +856,7 @@ if (ZEND_NUM_ARGS() > 2) { if (zend_lookup_class(class_name, class_name_len, &pce_get_iterator TSRMLS_CC) == FAILURE) { - zend_throw_exception(U_CLASS_ENTRY(spl_ce_InvalidArgumentException), "A class that implements Iterator must be specified", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_InvalidArgumentException, "A class that implements Iterator must be specified", 0 TSRMLS_CC); php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); return; } @@ -877,7 +877,7 @@ } else { if (Z_TYPE_P(array) != IS_OBJECT && Z_TYPE_P(array) != IS_ARRAY) { php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); - zend_throw_exception(U_CLASS_ENTRY(spl_ce_InvalidArgumentException), "Passed variable is not an array or object, using empty array instead", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_InvalidArgumentException, "Passed variable is not an array or object, using empty array instead", 0 TSRMLS_CC); return; } zval_ptr_dtor(&intern->array); @@ -895,7 +895,7 @@ if ((handler != std_object_handlers.get_properties && handler != spl_array_get_properties) || !spl_array_get_hash_table(intern, 0 TSRMLS_CC)) { php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_InvalidArgumentException), 0 TSRMLS_CC, "Overloaded object of type %s is not compatible with %s", Z_OBJCE_P(array)->name, intern->std.ce->name); + zend_throw_exception_ex(spl_ce_InvalidArgumentException, 0 TSRMLS_CC, "Overloaded object of type %s is not compatible with %s", Z_OBJCE_P(array)->name, intern->std.ce->name); return; } } @@ -922,7 +922,7 @@ } if (zend_lookup_class(class_name, class_name_len, &pce_get_iterator TSRMLS_CC) == FAILURE) { - zend_throw_exception(U_CLASS_ENTRY(spl_ce_InvalidArgumentException), "A class that implements Iterator must be specified", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_InvalidArgumentException, "A class that implements Iterator must be specified", 0 TSRMLS_CC); php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); return; } @@ -992,7 +992,7 @@ intern->array = other->array; } else { if (Z_TYPE_PP(array) != IS_OBJECT && !HASH_OF(*array)) { - zend_throw_exception(U_CLASS_ENTRY(spl_ce_InvalidArgumentException), "Passed variable is not an array or object, using empty array instead", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_InvalidArgumentException, "Passed variable is not an array or object, using empty array instead", 0 TSRMLS_CC); return; } zval_ptr_dtor(&intern->array); @@ -1072,7 +1072,7 @@ return; /* ok */ } } - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_OutOfBoundsException), 0 TSRMLS_CC, "Seek position %ld is out of range", opos); + zend_throw_exception_ex(spl_ce_OutOfBoundsException, 0 TSRMLS_CC, "Seek position %ld is out of range", opos); } /* }}} */ int spl_array_object_count_elements(zval *object, long *count TSRMLS_DC) /* {{{ */ @@ -1127,7 +1127,7 @@ if (use_arg) { if (ZEND_NUM_ARGS() != 1 || zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "z", &arg) == FAILURE) { - zend_throw_exception(U_CLASS_ENTRY(spl_ce_BadMethodCallException), "Function expects exactly one argument", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_BadMethodCallException, "Function expects exactly one argument", 0 TSRMLS_CC); return; } zend_call_method(NULL, NULL, NULL, fname, fname_len, &return_value, 2, &tmp, arg TSRMLS_CC); http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_directory.c?r1=1.74&r2=1.75&diff_format=u Index: php-src/ext/spl/spl_directory.c diff -u php-src/ext/spl/spl_directory.c:1.74 php-src/ext/spl/spl_directory.c:1.75 --- php-src/ext/spl/spl_directory.c:1.74 Fri Feb 10 16:56:56 2006 +++ php-src/ext/spl/spl_directory.c Mon Feb 13 10:23:57 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_directory.c,v 1.74 2006/02/10 16:56:56 tony2001 Exp $ */ +/* $Id: spl_directory.c,v 1.75 2006/02/13 10:23:57 dmitry Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -131,8 +131,8 @@ memset(intern, 0, sizeof(spl_filesystem_object)); intern->std.ce = class_type; /* intern->type = SPL_FS_INFO; done by set o */ - intern->file_class = U_CLASS_ENTRY(spl_ce_SplFileObject); - intern->info_class = U_CLASS_ENTRY(spl_ce_SplFileInfo); + intern->file_class = spl_ce_SplFileObject; + intern->info_class = spl_ce_SplFileInfo; if (obj) *obj = intern; ALLOC_HASHTABLE(intern->std.properties); @@ -206,7 +206,7 @@ if (intern->u.file.stream == NULL) { if (!EG(exception)) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_RuntimeException), 0 TSRMLS_CC, "Cannot open file %s", intern->file_name); + zend_throw_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Cannot open file %s", intern->file_name); } intern->file_name = NULL; /* until here it is not a copy */ intern->u.file.open_mode = NULL; @@ -301,7 +301,7 @@ spl_filesystem_object *intern; if (!file_path || !file_path_len) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_RuntimeException), 0 TSRMLS_CC, "Cannot create SplFileInfo for empty path"); + zend_throw_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Cannot create SplFileInfo for empty path"); if (file_path && !use_copy) { efree(file_path); @@ -309,7 +309,7 @@ return NULL; } - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(spl_ce_RuntimeException) TSRMLS_CC); + php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC); return_value->value.obj = spl_filesystem_object_new_ex(ce ? ce : source->info_class, &intern TSRMLS_CC); Z_TYPE_P(return_value) = IS_OBJECT; @@ -326,7 +326,7 @@ spl_filesystem_object *intern; zend_bool use_include_path = 0; - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(spl_ce_RuntimeException) TSRMLS_CC); + php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC); switch (source->type) { case SPL_FS_INFO: @@ -334,7 +334,7 @@ break; case SPL_FS_DIR: if (!source->u.dir.entry.d_name[0]) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_RuntimeException), 0 TSRMLS_CC, "Could not open file"); + zend_throw_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Could not open file"); php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); return NULL; } @@ -381,7 +381,7 @@ break; case SPL_FS_DIR: php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_RuntimeException), 0 TSRMLS_CC, "Operation not supported"); + zend_throw_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Operation not supported"); return NULL; } php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); @@ -396,7 +396,7 @@ char *path; int len; - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(spl_ce_RuntimeException) TSRMLS_CC); + php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &path, &len) == FAILURE) { php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); @@ -411,7 +411,7 @@ intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); spl_filesystem_dir_open(intern, path TSRMLS_CC); - intern->u.dir.is_recursive = instanceof_function(intern->std.ce, U_CLASS_ENTRY(spl_ce_RecursiveDirectoryIterator) TSRMLS_CC) ? 1 : 0; + intern->u.dir.is_recursive = instanceof_function(intern->std.ce, spl_ce_RecursiveDirectoryIterator TSRMLS_CC) ? 1 : 0; intern->flags = 0; php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); @@ -596,7 +596,7 @@ char *path; int len; - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(spl_ce_RuntimeException) TSRMLS_CC); + php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &path, &len) == FAILURE) { php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); @@ -714,7 +714,7 @@ SPL_METHOD(SplFileInfo, setFileClass) { spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - zend_class_entry *ce = U_CLASS_ENTRY(spl_ce_SplFileObject); + zend_class_entry *ce = spl_ce_SplFileObject; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|C", &ce) == FAILURE) { return; @@ -729,7 +729,7 @@ SPL_METHOD(SplFileInfo, setInfoClass) { spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - zend_class_entry *ce = U_CLASS_ENTRY(spl_ce_SplFileInfo); + zend_class_entry *ce = spl_ce_SplFileInfo; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|C", &ce) == FAILURE) { return; @@ -778,7 +778,7 @@ int len; long flags = SPL_FILE_DIR_CURRENT_AS_FILEINFO; - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(spl_ce_RuntimeException) TSRMLS_CC); + php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &path, &len, &flags) == FAILURE) { php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); @@ -787,7 +787,7 @@ intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); spl_filesystem_dir_open(intern, path TSRMLS_CC); - intern->u.dir.is_recursive = instanceof_function(intern->std.ce, U_CLASS_ENTRY(spl_ce_RecursiveDirectoryIterator) TSRMLS_CC) ? 1 : 0; + intern->u.dir.is_recursive = instanceof_function(intern->std.ce, spl_ce_RecursiveDirectoryIterator TSRMLS_CC) ? 1 : 0; intern->flags = flags; php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); @@ -869,7 +869,7 @@ INIT_PZVAL(&zpath); ZVAL_STRINGL(&zpath, intern->file_name, intern->file_name_len, 0); - spl_instantiate_arg_ex1(U_CLASS_ENTRY(spl_ce_RecursiveDirectoryIterator), &return_value, 0, &zpath TSRMLS_CC); + spl_instantiate_arg_ex1(spl_ce_RecursiveDirectoryIterator, &return_value, 0, &zpath TSRMLS_CC); subdir = (spl_filesystem_object*)zend_object_store_get_object(return_value TSRMLS_CC); if (subdir) { @@ -1317,7 +1317,7 @@ if (php_stream_eof(intern->u.file.stream)) { if (!silent) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_RuntimeException), 0 TSRMLS_CC, "Cannot read from file %s", intern->file_name); + zend_throw_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Cannot read from file %s", intern->file_name); } return FAILURE; } @@ -1351,10 +1351,10 @@ zval *retval; /* if overloaded call the function, otherwise do it directly */ - if (intern->u.file.func_getCurr->common.scope != U_CLASS_ENTRY(spl_ce_SplFileObject)) { + if (intern->u.file.func_getCurr->common.scope != spl_ce_SplFileObject) { if (php_stream_eof(intern->u.file.stream)) { if (!silent) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_RuntimeException), 0 TSRMLS_CC, "Cannot read from file %s", intern->file_name); + zend_throw_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Cannot read from file %s", intern->file_name); } return FAILURE; } @@ -1384,7 +1384,7 @@ static void spl_filesystem_file_rewind(spl_filesystem_object *intern TSRMLS_DC) /* {{{ */ { if (-1 == php_stream_rewind(intern->u.file.stream)) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_RuntimeException), 0 TSRMLS_CC, "Cannot rewind file %s", intern->file_name); + zend_throw_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Cannot rewind file %s", intern->file_name); } else { spl_filesystem_file_free_line(intern TSRMLS_CC); intern->u.file.current_line_num = 0; @@ -1399,7 +1399,7 @@ zend_bool use_include_path = 0; char *p1, *p2; - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(spl_ce_RuntimeException) TSRMLS_CC); + php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC); intern->u.file.open_mode = "r"; intern->u.file.open_mode_len = 1; @@ -1438,7 +1438,7 @@ char tmp_fname[48]; spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(spl_ce_RuntimeException) TSRMLS_CC); + php_set_error_handling(EH_THROW, spl_ce_RuntimeException TSRMLS_CC); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &max_memory) == FAILURE) { php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); @@ -1586,7 +1586,7 @@ } if (max_len < 0) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_DomainException), 0 TSRMLS_CC, "Maximum line length must be greater than or equal zero"); + zend_throw_exception_ex(spl_ce_DomainException, 0 TSRMLS_CC, "Maximum line length must be greater than or equal zero"); return; } @@ -1850,7 +1850,7 @@ } if (!php_stream_truncate_supported(intern->u.file.stream)) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_LogicException), 0 TSRMLS_CC, "Can't truncate file %s", intern->file_name); + zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Can't truncate file %s", intern->file_name); RETURN_FALSE; } @@ -1868,7 +1868,7 @@ return; } if (line_pos < 0) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_LogicException), 0 TSRMLS_CC, "Can't seek file %s to negative line %ld", intern->file_name, line_pos); + zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Can't seek file %s to negative line %ld", intern->file_name, line_pos); RETURN_FALSE; } http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_iterators.c?r1=1.113&r2=1.114&diff_format=u Index: php-src/ext/spl/spl_iterators.c diff -u php-src/ext/spl/spl_iterators.c:1.113 php-src/ext/spl/spl_iterators.c:1.114 --- php-src/ext/spl/spl_iterators.c:1.113 Mon Feb 6 11:28:20 2006 +++ php-src/ext/spl/spl_iterators.c Mon Feb 13 10:23:58 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_iterators.c,v 1.113 2006/02/06 11:28:20 tony2001 Exp $ */ +/* $Id: spl_iterators.c,v 1.114 2006/02/13 10:23:58 dmitry Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -265,11 +265,11 @@ } ce = child && Z_TYPE_P(child) == IS_OBJECT ? Z_OBJCE_P(child) : NULL; - if (!ce || !instanceof_function(ce, U_CLASS_ENTRY(spl_ce_RecursiveIterator) TSRMLS_CC)) { + if (!ce || !instanceof_function(ce, spl_ce_RecursiveIterator TSRMLS_CC)) { if (child) { zval_ptr_dtor(&child); } - zend_throw_exception(U_CLASS_ENTRY(spl_ce_UnexpectedValueException), "Objects returned by RecursiveIterator::getChildren() must implement RecursiveIterator", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_UnexpectedValueException, "Objects returned by RecursiveIterator::getChildren() must implement RecursiveIterator", 0 TSRMLS_CC); return; } if (object->mode == RIT_CHILD_FIRST) { @@ -313,7 +313,7 @@ sub_iter = object->iterators[object->level].iterator; sub_iter->funcs->dtor(sub_iter TSRMLS_CC); zval_ptr_dtor(&object->iterators[object->level--].zobject); - if (!object->endChildren || object->endChildren->common.scope != U_CLASS_ENTRY(spl_ce_RecursiveIteratorIterator)) { + if (!object->endChildren || object->endChildren->common.scope != spl_ce_RecursiveIteratorIterator) { zend_call_method_with_0_params(&zthis, object->ce, &object->endChildren, "endchildren", NULL); } } @@ -378,10 +378,10 @@ long mode = RIT_LEAVES_ONLY, flags = 0; int inc_refcount = 1; - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(spl_ce_InvalidArgumentException) TSRMLS_CC); + php_set_error_handling(EH_THROW, spl_ce_InvalidArgumentException TSRMLS_CC); if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "o|ll", &iterator, &mode, &flags) == SUCCESS) { - if (instanceof_function(Z_OBJCE_P(iterator), U_CLASS_ENTRY(zend_ce_aggregate) TSRMLS_CC)) { + if (instanceof_function(Z_OBJCE_P(iterator), zend_ce_aggregate TSRMLS_CC)) { zval *aggregate = iterator; zend_call_method_with_0_params(&aggregate, Z_OBJCE_P(aggregate), &Z_OBJCE_P(aggregate)->iterator_funcs.zf_new_iterator, "getiterator", &iterator); inc_refcount = 0; @@ -389,12 +389,12 @@ } else { iterator = NULL; } - if (!iterator || !instanceof_function(Z_OBJCE_P(iterator), U_CLASS_ENTRY(spl_ce_RecursiveIterator) TSRMLS_CC)) { + if (!iterator || !instanceof_function(Z_OBJCE_P(iterator), spl_ce_RecursiveIterator TSRMLS_CC)) { if (iterator && !inc_refcount) { zval_ptr_dtor(&iterator); } php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); - zend_throw_exception(U_CLASS_ENTRY(spl_ce_InvalidArgumentException), "An instance of RecursiveIterator or IteratorAggregate creating it is required", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_InvalidArgumentException, "An instance of RecursiveIterator or IteratorAggregate creating it is required", 0 TSRMLS_CC); return; } @@ -408,31 +408,31 @@ intern->ce = Z_OBJCE_P(object); zend_hash_find(&intern->ce->function_table, "beginiteration", sizeof("beginiteration"), (void **) &intern->beginIteration); - if (intern->beginIteration->common.scope == U_CLASS_ENTRY(spl_ce_RecursiveIteratorIterator)) { + if (intern->beginIteration->common.scope == spl_ce_RecursiveIteratorIterator) { intern->beginIteration = NULL; } zend_hash_find(&intern->ce->function_table, "enditeration", sizeof("enditeration"), (void **) &intern->endIteration); - if (intern->endIteration->common.scope == U_CLASS_ENTRY(spl_ce_RecursiveIteratorIterator)) { + if (intern->endIteration->common.scope == spl_ce_RecursiveIteratorIterator) { intern->endIteration = NULL; } zend_hash_find(&intern->ce->function_table, "callhaschildren", sizeof("callHasChildren"), (void **) &intern->callHasChildren); - if (intern->callHasChildren->common.scope == U_CLASS_ENTRY(spl_ce_RecursiveIteratorIterator)) { + if (intern->callHasChildren->common.scope == spl_ce_RecursiveIteratorIterator) { intern->callHasChildren = NULL; } zend_hash_find(&intern->ce->function_table, "callgetchildren", sizeof("callGetChildren"), (void **) &intern->callGetChildren); - if (intern->callGetChildren->common.scope == U_CLASS_ENTRY(spl_ce_RecursiveIteratorIterator)) { + if (intern->callGetChildren->common.scope == spl_ce_RecursiveIteratorIterator) { intern->callGetChildren = NULL; } zend_hash_find(&intern->ce->function_table, "beginchildren", sizeof("beginchildren"), (void **) &intern->beginChildren); - if (intern->beginChildren->common.scope == U_CLASS_ENTRY(spl_ce_RecursiveIteratorIterator)) { + if (intern->beginChildren->common.scope == spl_ce_RecursiveIteratorIterator) { intern->beginChildren = NULL; } zend_hash_find(&intern->ce->function_table, "endchildren", sizeof("endchildren"), (void **) &intern->endChildren); - if (intern->endChildren->common.scope == U_CLASS_ENTRY(spl_ce_RecursiveIteratorIterator)) { + if (intern->endChildren->common.scope == spl_ce_RecursiveIteratorIterator) { intern->endChildren = NULL; } zend_hash_find(&intern->ce->function_table, "nextelement", sizeof("nextElement"), (void **) &intern->nextElement); - if (intern->nextElement->common.scope == U_CLASS_ENTRY(spl_ce_RecursiveIteratorIterator)) { + if (intern->nextElement->common.scope == spl_ce_RecursiveIteratorIterator) { intern->nextElement = NULL; } ce_iterator = Z_OBJCE_P(iterator); /* respect inheritance, don't use spl_ce_RecursiveIterator */ @@ -633,7 +633,7 @@ return; } if (max_depth < -1) { - zend_throw_exception(U_CLASS_ENTRY(spl_ce_OutOfRangeException), "Parameter max_depth must be >= -1", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_OutOfRangeException, "Parameter max_depth must be >= -1", 0 TSRMLS_CC); return; } object->max_depth = max_depth; @@ -842,7 +842,7 @@ int inc_refcount = 1; - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(spl_ce_InvalidArgumentException) TSRMLS_CC); + php_set_error_handling(EH_THROW, spl_ce_InvalidArgumentException TSRMLS_CC); intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC); @@ -857,12 +857,12 @@ } if (intern->u.limit.offset < 0) { php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); - zend_throw_exception(U_CLASS_ENTRY(spl_ce_OutOfRangeException), "Parameter offset must be > 0", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_OutOfRangeException, "Parameter offset must be > 0", 0 TSRMLS_CC); return NULL; } if (intern->u.limit.count < 0 && intern->u.limit.count != -1) { php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); - zend_throw_exception(U_CLASS_ENTRY(spl_ce_OutOfRangeException), "Parameter count must either be -1 or a value greater than or equal 0", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_OutOfRangeException, "Parameter count must either be -1 or a value greater than or equal 0", 0 TSRMLS_CC); return NULL; } break; @@ -877,7 +877,7 @@ if (((flags & CIT_CALL_TOSTRING) && (flags & (CIT_TOSTRING_USE_KEY|CIT_TOSTRING_USE_CURRENT))) || ((flags & (CIT_TOSTRING_USE_KEY|CIT_TOSTRING_USE_CURRENT)) == (CIT_TOSTRING_USE_KEY|CIT_TOSTRING_USE_CURRENT))) { php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); - zend_throw_exception(U_CLASS_ENTRY(spl_ce_InvalidArgumentException), "Flags must contain only one of CATCH_GET_CHILD, CALL_TOSTRING, TOSTRING_USE_KEY, TOSTRING_USE_CURRENT", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_InvalidArgumentException, "Flags must contain only one of CATCH_GET_CHILD, CALL_TOSTRING, TOSTRING_USE_KEY, TOSTRING_USE_CURRENT", 0 TSRMLS_CC); return NULL; } intern->u.caching.flags |= flags & CIT_PUBLIC; @@ -895,22 +895,22 @@ return NULL; } ce = Z_OBJCE_P(zobject); - if (!instanceof_function(ce, U_CLASS_ENTRY(zend_ce_iterator) TSRMLS_CC)) { + if (!instanceof_function(ce, zend_ce_iterator TSRMLS_CC)) { if (ZEND_NUM_ARGS() > 1) { if (zend_lookup_class(class_name, class_name_len, &pce_cast TSRMLS_CC) == FAILURE || !instanceof_function(ce, *pce_cast TSRMLS_CC) || !(*pce_cast)->get_iterator ) { - zend_throw_exception(U_CLASS_ENTRY(spl_ce_LogicException), "Class to downcast to not found or not base class or does not implement Traversable", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_LogicException, "Class to downcast to not found or not base class or does not implement Traversable", 0 TSRMLS_CC); php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); return NULL; } ce = *pce_cast; } - if (instanceof_function(ce, U_CLASS_ENTRY(zend_ce_aggregate) TSRMLS_CC)) { + if (instanceof_function(ce, zend_ce_aggregate TSRMLS_CC)) { zend_call_method_with_0_params(&zobject, ce, &ce->iterator_funcs.zf_new_iterator, "getiterator", &retval); - if (!retval || Z_TYPE_P(retval) != IS_OBJECT || !instanceof_function(Z_OBJCE_P(retval), U_CLASS_ENTRY(zend_ce_traversable) TSRMLS_CC)) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_LogicException), 0 TSRMLS_CC, "%s::getIterator() must return an object that implememnts Traversable", ce->name); + if (!retval || Z_TYPE_P(retval) != IS_OBJECT || !instanceof_function(Z_OBJCE_P(retval), zend_ce_traversable TSRMLS_CC)) { + zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "%s::getIterator() must return an object that implememnts Traversable", ce->name); php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); return NULL; } @@ -922,9 +922,9 @@ break; } case DIT_AppendIterator: - spl_instantiate(U_CLASS_ENTRY(spl_ce_ArrayIterator), &intern->u.append.zarrayit, 1 TSRMLS_CC); - zend_call_method_with_0_params(&intern->u.append.zarrayit, U_CLASS_ENTRY(spl_ce_ArrayIterator), &U_CLASS_ENTRY(spl_ce_ArrayIterator)->constructor, "__construct", NULL); - intern->u.append.iterator = U_CLASS_ENTRY(spl_ce_ArrayIterator)->get_iterator(U_CLASS_ENTRY(spl_ce_ArrayIterator), intern->u.append.zarrayit, 0 TSRMLS_CC); + spl_instantiate(spl_ce_ArrayIterator, &intern->u.append.zarrayit, 1 TSRMLS_CC); + zend_call_method_with_0_params(&intern->u.append.zarrayit, spl_ce_ArrayIterator, &spl_ce_ArrayIterator->constructor, "__construct", NULL); + intern->u.append.iterator = spl_ce_ArrayIterator->get_iterator(spl_ce_ArrayIterator, intern->u.append.zarrayit, 0 TSRMLS_CC); php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); return intern; #if HAVE_PCRE || HAVE_BUNDLED_PCRE @@ -970,7 +970,7 @@ Create an Iterator from another iterator */ SPL_METHOD(dual_it, __construct) { - spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(zend_ce_iterator), DIT_Default); + spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, zend_ce_iterator, DIT_Default); } /* }}} */ /* {{{ proto Iterator FilterIterator::getInnerIterator() @@ -1212,7 +1212,7 @@ Create a RecursiveFilterIterator from a RecursiveIterator */ SPL_METHOD(RecursiveFilterIterator, __construct) { - spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(spl_ce_RecursiveIterator), DIT_Default); + spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, spl_ce_RecursiveIterator, DIT_Default); } /* }}} */ /* {{{ proto boolean RecursiveFilterIterator::hasChildren() @@ -1246,7 +1246,7 @@ Create a ParentIterator from a RecursiveIterator */ SPL_METHOD(ParentIterator, __construct) { - spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(spl_ce_RecursiveIterator), DIT_Default); + spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, spl_ce_RecursiveIterator, DIT_Default); } /* }}} */ /* {{{ proto boolean ParentIterator::hasChildren() @@ -1281,7 +1281,7 @@ Create an RegExIterator from another iterator and a regular expression */ SPL_METHOD(RegExIterator, __construct) { - spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(zend_ce_iterator), DIT_RegExIterator); + spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, zend_ce_iterator, DIT_RegExIterator); } /* }}} */ /* {{{ proto bool RegExIterator::accept() @@ -1330,7 +1330,7 @@ Create an RecursiveRegExIterator from another recursive iterator and a regular expression */ SPL_METHOD(RecursiveRegExIterator, __construct) { - spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(spl_ce_RecursiveIterator), DIT_RecursiveRegExIterator); + spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, spl_ce_RecursiveIterator, DIT_RecursiveRegExIterator); } /* }}} */ #endif @@ -1473,14 +1473,14 @@ spl_dual_it_free(intern TSRMLS_CC); if (pos < intern->u.limit.offset) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_OutOfBoundsException), 0 TSRMLS_CC, "Cannot seek to %ld which is below the offset %ld", pos, intern->u.limit.offset); + zend_throw_exception_ex(spl_ce_OutOfBoundsException, 0 TSRMLS_CC, "Cannot seek to %ld which is below the offset %ld", pos, intern->u.limit.offset); return; } if (pos > intern->u.limit.offset + intern->u.limit.count && intern->u.limit.count != -1) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_OutOfBoundsException), 0 TSRMLS_CC, "Cannot seek to %ld which is behind offest %ld plus count %ld", pos, intern->u.limit.offset, intern->u.limit.count); + zend_throw_exception_ex(spl_ce_OutOfBoundsException, 0 TSRMLS_CC, "Cannot seek to %ld which is behind offest %ld plus count %ld", pos, intern->u.limit.offset, intern->u.limit.count); return; } - if (instanceof_function(intern->inner.ce, U_CLASS_ENTRY(spl_ce_SeekableIterator) TSRMLS_CC)) { + if (instanceof_function(intern->inner.ce, spl_ce_SeekableIterator TSRMLS_CC)) { MAKE_STD_ZVAL(zpos); ZVAL_LONG(zpos, pos); spl_dual_it_free(intern TSRMLS_CC); @@ -1509,7 +1509,7 @@ Construct a LimitIterator from an Iterator with a given starting offset and optionally a maximum count */ SPL_METHOD(LimitIterator, __construct) { - spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(zend_ce_iterator), DIT_LimitIterator); + spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, zend_ce_iterator, DIT_LimitIterator); } /* }}} */ /* {{{ proto void LimitIterator::rewind() @@ -1649,7 +1649,7 @@ } else { INIT_PZVAL(&zflags); ZVAL_LONG(&zflags, intern->u.caching.flags & CIT_PUBLIC); - spl_instantiate_arg_ex2(U_CLASS_ENTRY(spl_ce_RecursiveCachingIterator), &intern->u.caching.zchildren, 1, zchildren, &zflags TSRMLS_CC); + spl_instantiate_arg_ex2(spl_ce_RecursiveCachingIterator, &intern->u.caching.zchildren, 1, zchildren, &zflags TSRMLS_CC); zval_ptr_dtor(&zchildren); } } @@ -1692,7 +1692,7 @@ Construct a CachingIterator from an Iterator */ SPL_METHOD(CachingIterator, __construct) { - spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(zend_ce_iterator), DIT_CachingIterator); + spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, zend_ce_iterator, DIT_CachingIterator); } /* }}} */ /* {{{ proto void CachingIterator::rewind() @@ -1748,7 +1748,7 @@ intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC); if (!(intern->u.caching.flags & (CIT_CALL_TOSTRING|CIT_TOSTRING_USE_KEY|CIT_TOSTRING_USE_CURRENT))) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_BadMethodCallException), 0 TSRMLS_CC, "%v does not fetch string value (see CachingIterator::__construct)", Z_OBJCE_P(getThis())->name); + zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "%v does not fetch string value (see CachingIterator::__construct)", Z_OBJCE_P(getThis())->name); } if (intern->u.caching.flags & CIT_TOSTRING_USE_KEY) { if (intern->current.key_type == HASH_KEY_IS_STRING) { @@ -1788,7 +1788,7 @@ intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC); if (!(intern->u.caching.flags & CIT_FULL_CACHE)) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_BadMethodCallException), 0 TSRMLS_CC, "%v does not use a full cache (see CachingIterator::__construct)", Z_OBJCE_P(getThis())->name); + zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "%v does not use a full cache (see CachingIterator::__construct)", Z_OBJCE_P(getThis())->name); } if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Tz", &arKey, &nKeyLength, &type, &value) == FAILURE) { @@ -1813,7 +1813,7 @@ intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC); if (!(intern->u.caching.flags & CIT_FULL_CACHE)) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_BadMethodCallException), 0 TSRMLS_CC, "%v does not use a full cache (see CachingIterator::__construct)", Z_OBJCE_P(getThis())->name); + zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "%v does not use a full cache (see CachingIterator::__construct)", Z_OBJCE_P(getThis())->name); } if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "T", &arKey, &nKeyLength, &type) == FAILURE) { @@ -1841,7 +1841,7 @@ intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC); if (!(intern->u.caching.flags & CIT_FULL_CACHE)) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_BadMethodCallException), 0 TSRMLS_CC, "%v does not use a full cache (see CachingIterator::__construct)", Z_OBJCE_P(getThis())->name); + zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "%v does not use a full cache (see CachingIterator::__construct)", Z_OBJCE_P(getThis())->name); } if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "T", &arKey, &nKeyLength, &type) == FAILURE) { @@ -1864,7 +1864,7 @@ intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC); if (!(intern->u.caching.flags & CIT_FULL_CACHE)) { - zend_throw_exception_ex(U_CLASS_ENTRY(spl_ce_BadMethodCallException), 0 TSRMLS_CC, "%v does not use a full cache (see CachingIterator::__construct)", Z_OBJCE_P(getThis())->name); + zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "%v does not use a full cache (see CachingIterator::__construct)", Z_OBJCE_P(getThis())->name); } if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "T", &arKey, &nKeyLength, &type) == FAILURE) { @@ -1906,7 +1906,7 @@ return; } if ((intern->u.caching.flags & CIT_CALL_TOSTRING) != 0 && (flags & ~CIT_CALL_TOSTRING) == 0) { - zend_throw_exception(U_CLASS_ENTRY(spl_ce_InvalidArgumentException), "Unsetting flag CALL_TO_STRING is not possible", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_InvalidArgumentException, "Unsetting flag CALL_TO_STRING is not possible", 0 TSRMLS_CC); return; } if ((flags && CIT_FULL_CACHE) != 0 && (intern->u.caching.flags & CIT_FULL_CACHE) == 0) { @@ -1962,7 +1962,7 @@ Create an iterator from a RecursiveIterator */ SPL_METHOD(RecursiveCachingIterator, __construct) { - spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(spl_ce_RecursiveIterator), DIT_RecursiveCachingIterator); + spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, spl_ce_RecursiveIterator, DIT_RecursiveCachingIterator); } /* }}} */ /* {{{ proto bolean RecursiveCachingIterator::hasChildren() @@ -2008,7 +2008,7 @@ Create an iterator from anything that is traversable */ SPL_METHOD(IteratorIterator, __construct) { - spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(zend_ce_traversable), DIT_IteratorIterator); + spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, zend_ce_traversable, DIT_IteratorIterator); } /* }}} */ static @@ -2031,7 +2031,7 @@ Create an iterator from another iterator */ SPL_METHOD(NoRewindIterator, __construct) { - spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(zend_ce_iterator), DIT_NoRewindIterator); + spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, zend_ce_iterator, DIT_NoRewindIterator); } /* }}} */ /* {{{ proto void NoRewindIterator::rewind() @@ -2123,7 +2123,7 @@ Create an iterator from another iterator */ SPL_METHOD(InfiniteIterator, __construct) { - spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(zend_ce_iterator), DIT_InfiniteIterator); + spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, zend_ce_iterator, DIT_InfiniteIterator); } /* }}} */ /* {{{ proto InfiniteIterator::next() @@ -2168,14 +2168,14 @@ Throws exception */ SPL_METHOD(EmptyIterator, key) { - zend_throw_exception(U_CLASS_ENTRY(spl_ce_BadMethodCallException), "Accessing the key of an EmptyIterator", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_BadMethodCallException, "Accessing the key of an EmptyIterator", 0 TSRMLS_CC); } /* }}} */ /* {{{ proto EmptyIterator::current() Throws exception */ SPL_METHOD(EmptyIterator, current) { - zend_throw_exception(U_CLASS_ENTRY(spl_ce_BadMethodCallException), "Accessing the value of an EmptyIterator", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_BadMethodCallException, "Accessing the value of an EmptyIterator", 0 TSRMLS_CC); } /* }}} */ /* {{{ proto EmptyIterator::next() @@ -2246,7 +2246,7 @@ Create an AppendIterator */ SPL_METHOD(AppendIterator, __construct) { - spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, U_CLASS_ENTRY(zend_ce_iterator), DIT_AppendIterator); + spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, zend_ce_iterator, DIT_AppendIterator); } /* }}} */ /* {{{ proto void AppendIterator::append(Iterator it) @@ -2258,7 +2258,7 @@ intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &it, U_CLASS_ENTRY(zend_ce_iterator)) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &it, zend_ce_iterator) == FAILURE) { return; } spl_array_iterator_append(intern->u.append.zarrayit, it TSRMLS_CC); @@ -2362,7 +2362,7 @@ ulong int_key; int key_type; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &obj, U_CLASS_ENTRY(zend_ce_traversable)) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &obj, zend_ce_traversable) == FAILURE) { RETURN_FALSE; } @@ -2408,7 +2408,7 @@ zend_object_iterator *iter; long count = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &obj, U_CLASS_ENTRY(zend_ce_traversable)) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &obj, zend_ce_traversable) == FAILURE) { RETURN_FALSE; } http://cvs.php.net/viewcvs.cgi/php-src/ext/sqlite/sqlite.c?r1=1.183&r2=1.184&diff_format=u Index: php-src/ext/sqlite/sqlite.c diff -u php-src/ext/sqlite/sqlite.c:1.183 php-src/ext/sqlite/sqlite.c:1.184 --- php-src/ext/sqlite/sqlite.c:1.183 Tue Jan 17 12:18:52 2006 +++ php-src/ext/sqlite/sqlite.c Mon Feb 13 10:23:58 2006 @@ -17,7 +17,7 @@ | Marcus Boerger <helly@php.net> | +----------------------------------------------------------------------+ - $Id: sqlite.c,v 1.183 2006/01/17 12:18:52 dmitry Exp $ + $Id: sqlite.c,v 1.184 2006/02/13 10:23:58 dmitry Exp $ */ #ifdef HAVE_CONFIG_H @@ -879,12 +879,12 @@ static zend_class_entry *sqlite_get_ce_query(zval *object TSRMLS_DC) { - return U_CLASS_ENTRY(sqlite_ce_query); + return sqlite_ce_query; } static zend_class_entry *sqlite_get_ce_ub_query(zval *object TSRMLS_DC) { - return U_CLASS_ENTRY(sqlite_ce_ub_query); + return sqlite_ce_ub_query; } static zval * sqlite_instanciate(zend_class_entry *pce, zval *object TSRMLS_DC) @@ -1128,7 +1128,7 @@ { php_info_print_table_start(); php_info_print_table_header(2, "SQLite support", "enabled"); - php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.183 2006/01/17 12:18:52 dmitry Exp $"); + php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.184 2006/02/13 10:23:58 dmitry Exp $"); php_info_print_table_row(2, "SQLite Library", sqlite_libversion()); php_info_print_table_row(2, "SQLite Encoding", sqlite_libencoding()); php_info_print_table_end(); @@ -1188,7 +1188,7 @@ if (object) { /* if object is not an object then we're called from the factory() function */ if (Z_TYPE_P(object) != IS_OBJECT) { - sqlite_instanciate(U_CLASS_ENTRY(sqlite_ce_db), object TSRMLS_CC); + sqlite_instanciate(sqlite_ce_db, object TSRMLS_CC); } /* and now register the object */ SQLITE_REGISTER_OBJECT(db, object, db) @@ -1295,7 +1295,7 @@ zval *errmsg = NULL; zval *object = getThis(); - php_set_error_handling(object ? EH_THROW : EH_NORMAL, U_CLASS_ENTRY(sqlite_ce_exception) TSRMLS_CC); + php_set_error_handling(object ? EH_THROW : EH_NORMAL, sqlite_ce_exception TSRMLS_CC); if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lz/", &filename, &filename_len, &mode, &errmsg)) { php_std_error_handling(); @@ -1350,7 +1350,7 @@ int filename_len; zval *errmsg = NULL; - php_set_error_handling(EH_THROW, U_CLASS_ENTRY(sqlite_ce_exception) TSRMLS_CC); + php_set_error_handling(EH_THROW, sqlite_ce_exception TSRMLS_CC); if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lz/", &filename, &filename_len, &mode, &errmsg)) { php_std_error_handling(); @@ -1577,9 +1577,9 @@ if (object) { sqlite_object *obj; if (buffered) { - sqlite_instanciate(U_CLASS_ENTRY(sqlite_ce_query), return_value TSRMLS_CC); + sqlite_instanciate(sqlite_ce_query, return_value TSRMLS_CC); } else { - sqlite_instanciate(U_CLASS_ENTRY(sqlite_ce_ub_query), return_value TSRMLS_CC); + sqlite_instanciate(sqlite_ce_ub_query, return_value TSRMLS_CC); } obj = (sqlite_object *) zend_object_store_get_object(return_value TSRMLS_CC); obj->type = is_result; @@ -2073,7 +2073,7 @@ zval *ctor_params = NULL; zend_uchar class_name_type; - php_set_error_handling(object ? EH_THROW : EH_NORMAL, U_CLASS_ENTRY(sqlite_ce_exception) TSRMLS_CC); + php_set_error_handling(object ? EH_THROW : EH_NORMAL, sqlite_ce_exception TSRMLS_CC); if (object) { if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|tzb", &class_name, &class_name_len, &class_name_type, &ctor_params, &decode_binary)) { php_std_error_handling(); @@ -2081,7 +2081,7 @@ } RES_FROM_OBJECT(res, object); if (!ZEND_NUM_ARGS()) { - ce = U_CLASS_ENTRY(zend_standard_class_def); + ce = zend_standard_class_def; } else { ce = zend_u_fetch_class(class_name_type, class_name, class_name_len, ZEND_FETCH_CLASS_AUTO TSRMLS_CC); } @@ -2092,14 +2092,14 @@ } ZEND_FETCH_RESOURCE(res, struct php_sqlite_result *, &zres, -1, "sqlite result", le_sqlite_result); if (ZEND_NUM_ARGS() < 2) { - ce = U_CLASS_ENTRY(zend_standard_class_def); + ce = zend_standard_class_def; } else { ce = zend_u_fetch_class(class_name_type, class_name, class_name_len, ZEND_FETCH_CLASS_AUTO TSRMLS_CC); } } if (!ce) { - zend_throw_exception_ex(U_CLASS_ENTRY(sqlite_ce_exception), 0 TSRMLS_CC, "Could not find class '%s'", class_name); + zend_throw_exception_ex(sqlite_ce_exception, 0 TSRMLS_CC, "Could not find class '%s'", class_name); php_std_error_handling(); return; } @@ -2142,7 +2142,7 @@ * single value is an array. Also we'd have to make that one * argument passed by reference. */ - zend_throw_exception(U_CLASS_ENTRY(sqlite_ce_exception), "Parameter ctor_params must be an array", 0 TSRMLS_CC); + zend_throw_exception(sqlite_ce_exception, "Parameter ctor_params must be an array", 0 TSRMLS_CC); return; } } else { @@ -2157,7 +2157,7 @@ fcc.object_pp = &return_value; if (zend_call_function(&fci, &fcc TSRMLS_CC) == FAILURE) { - zend_throw_exception_ex(U_CLASS_ENTRY(sqlite_ce_exception), 0 TSRMLS_CC, "Could not execute %s::%v()", class_name, ce->constructor->common.function_name); + zend_throw_exception_ex(sqlite_ce_exception, 0 TSRMLS_CC, "Could not execute %s::%v()", class_name, ce->constructor->common.function_name); } else { if (retval_ptr) { zval_ptr_dtor(&retval_ptr); @@ -2167,7 +2167,7 @@ efree(fci.params); } } else if (ctor_params && Z_TYPE_P(ctor_params) != IS_NULL) { - zend_throw_exception_ex(U_CLASS_ENTRY(sqlite_ce_exception), 0 TSRMLS_CC, "Class %s does not have a constructor, use NULL for parameter ctor_params or omit it", class_name); + zend_throw_exception_ex(sqlite_ce_exception, 0 TSRMLS_CC, "Class %s does not have a constructor, use NULL for parameter ctor_params or omit it", class_name); } } /* }}} */ @@ -2545,7 +2545,7 @@ * count = obj->u.res->nrows; return SUCCESS; } else { - zend_throw_exception(U_CLASS_ENTRY(sqlite_ce_exception), "Row count is not available for unbuffered queries", 0 TSRMLS_CC); + zend_throw_exception(sqlite_ce_exception, "Row count is not available for unbuffered queries", 0 TSRMLS_CC); return FAILURE; } } /* }}} */ http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/array.c?r1=1.339&r2=1.340&diff_format=u Index: php-src/ext/standard/array.c diff -u php-src/ext/standard/array.c:1.339 php-src/ext/standard/array.c:1.340 --- php-src/ext/standard/array.c:1.339 Tue Feb 7 17:54:52 2006 +++ php-src/ext/standard/array.c Mon Feb 13 10:23:58 2006 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: array.c,v 1.339 2006/02/07 17:54:52 andrei Exp $ */ +/* $Id: array.c,v 1.340 2006/02/13 10:23:58 dmitry Exp $ */ #include "php.h" #include "php_ini.h" @@ -316,7 +316,7 @@ /* it the object implements Countable we call its count() method */ zval *retval; - if (Z_OBJ_HT_P(array)->get_class_entry && instanceof_function(Z_OBJCE_P(array), U_CLASS_ENTRY(spl_ce_Countable) TSRMLS_CC)) { + if (Z_OBJ_HT_P(array)->get_class_entry && instanceof_function(Z_OBJCE_P(array), spl_ce_Countable TSRMLS_CC)) { zend_call_method_with_0_params(&array, NULL, NULL, "count", &retval); RETVAL_LONG(Z_LVAL_P(retval)); zval_ptr_dtor(&retval); http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/dir.c?r1=1.150&r2=1.151&diff_format=u Index: php-src/ext/standard/dir.c diff -u php-src/ext/standard/dir.c:1.150 php-src/ext/standard/dir.c:1.151 --- php-src/ext/standard/dir.c:1.150 Sun Jan 1 13:09:55 2006 +++ php-src/ext/standard/dir.c Mon Feb 13 10:23:58 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dir.c,v 1.150 2006/01/01 13:09:55 sniper Exp $ */ +/* $Id: dir.c,v 1.151 2006/02/13 10:23:58 dmitry Exp $ */ /* {{{ includes/startup/misc */ @@ -201,7 +201,7 @@ php_set_default_dir(dirp->rsrc_id TSRMLS_CC); if (createobject) { - object_init_ex(return_value, U_CLASS_ENTRY(dir_class_entry_ptr)); + object_init_ex(return_value, dir_class_entry_ptr); add_property_rt_stringl(return_value, "path", dirname, dir_len, 1); add_property_resource(return_value, "handle", dirp->rsrc_id); php_stream_auto_cleanup(dirp); /* so we don't get warnings under debug */ http://cvs.php.net/viewcvs.cgi/php-src/ext/unicode/unicode_iterators.c?r1=1.19&r2=1.20&diff_format=u Index: php-src/ext/unicode/unicode_iterators.c diff -u php-src/ext/unicode/unicode_iterators.c:1.19 php-src/ext/unicode/unicode_iterators.c:1.20 --- php-src/ext/unicode/unicode_iterators.c:1.19 Sat Feb 11 00:16:43 2006 +++ php-src/ext/unicode/unicode_iterators.c Mon Feb 13 10:23:58 2006 @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: unicode_iterators.c,v 1.19 2006/02/11 00:16:43 andrei Exp $ */ +/* $Id: unicode_iterators.c,v 1.20 2006/02/13 10:23:58 dmitry Exp $ */ /* * TODO @@ -539,7 +539,7 @@ intern->flags = flags; } - if (Z_OBJCE_P(this_ptr) == U_CLASS_ENTRY(rev_text_iterator_ce)) { + if (Z_OBJCE_P(this_ptr) == rev_text_iterator_ce) { intern->flags |= ITER_REVERSE; } http://cvs.php.net/viewcvs.cgi/php-src/main/SAPI.c?r1=1.210&r2=1.211&diff_format=u Index: php-src/main/SAPI.c diff -u php-src/main/SAPI.c:1.210 php-src/main/SAPI.c:1.211 --- php-src/main/SAPI.c:1.210 Sun Jan 1 13:09:57 2006 +++ php-src/main/SAPI.c Mon Feb 13 10:23:58 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: SAPI.c,v 1.210 2006/01/01 13:09:57 sniper Exp $ */ +/* $Id: SAPI.c,v 1.211 2006/02/13 10:23:58 dmitry Exp $ */ #include <ctype.h> #include <sys/stat.h> @@ -75,6 +75,7 @@ SAPI_API void sapi_startup(sapi_module_struct *sf) { + sf->ini_entries = NULL; sapi_module = *sf; #ifdef ZTS http://cvs.php.net/viewcvs.cgi/php-src/main/SAPI.h?r1=1.116&r2=1.117&diff_format=u Index: php-src/main/SAPI.h diff -u php-src/main/SAPI.h:1.116 php-src/main/SAPI.h:1.117 --- php-src/main/SAPI.h:1.116 Sun Jan 1 13:09:57 2006 +++ php-src/main/SAPI.h Mon Feb 13 10:23:58 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: SAPI.h,v 1.116 2006/01/01 13:09:57 sniper Exp $ */ +/* $Id: SAPI.h,v 1.117 2006/02/13 10:23:58 dmitry Exp $ */ #ifndef SAPI_H #define SAPI_H @@ -258,6 +258,8 @@ void (*ini_defaults)(HashTable *configuration_hash); int phpinfo_as_text; + + char *ini_entries; }; http://cvs.php.net/viewcvs.cgi/php-src/main/php_ini.c?r1=1.140&r2=1.141&diff_format=u Index: php-src/main/php_ini.c diff -u php-src/main/php_ini.c:1.140 php-src/main/php_ini.c:1.141 --- php-src/main/php_ini.c:1.140 Sun Jan 1 13:09:57 2006 +++ php-src/main/php_ini.c Mon Feb 13 10:23:58 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_ini.c,v 1.140 2006/01/01 13:09:57 sniper Exp $ */ +/* $Id: php_ini.c,v 1.141 2006/02/13 10:23:58 dmitry Exp $ */ #include "php.h" #include "ext/standard/info.h" @@ -524,6 +524,11 @@ zend_llist_destroy(&scanned_ini_list); } } + + if (sapi_module.ini_entries) { + zend_parse_ini_string(sapi_module.ini_entries, 1, php_config_ini_parser_cb, &extension_lists); + } + return SUCCESS; } /* }}} */ http://cvs.php.net/viewcvs.cgi/php-src/main/php_variables.c?r1=1.111&r2=1.112&diff_format=u Index: php-src/main/php_variables.c diff -u php-src/main/php_variables.c:1.111 php-src/main/php_variables.c:1.112 --- php-src/main/php_variables.c:1.111 Tue Jan 17 12:18:53 2006 +++ php-src/main/php_variables.c Mon Feb 13 10:23:58 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_variables.c,v 1.111 2006/01/17 12:18:53 dmitry Exp $ */ +/* $Id: php_variables.c,v 1.112 2006/02/13 10:23:58 dmitry Exp $ */ #include <stdio.h> #include "php.h" @@ -581,6 +581,7 @@ php_register_variable_safe(var, val, new_val_len, array_ptr TSRMLS_CC); } */ + efree(u_var); efree(u_val); } } else { @@ -696,15 +697,11 @@ } /* auto-type */ ALLOC_ZVAL(tmp); - Z_TYPE_P(tmp) = IS_STRING; - Z_STRLEN_P(tmp) = strlen(ss); - Z_STRVAL_P(tmp) = estrndup(ss, Z_STRLEN_P(tmp)); + ZVAL_RT_STRING(tmp, ss, 1); INIT_PZVAL(tmp); count++; if (zend_hash_next_index_insert(Z_ARRVAL_P(arr), &tmp, sizeof(zval *), NULL) == FAILURE) { - if (Z_TYPE_P(tmp) == IS_STRING) { - efree(Z_STRVAL_P(tmp)); - } + efree(Z_STRVAL_P(tmp)); } if (space) { *space = '+'; http://cvs.php.net/viewcvs.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.275&r2=1.276&diff_format=u Index: php-src/sapi/cgi/cgi_main.c diff -u php-src/sapi/cgi/cgi_main.c:1.275 php-src/sapi/cgi/cgi_main.c:1.276 --- php-src/sapi/cgi/cgi_main.c:1.275 Fri Feb 3 16:30:27 2006 +++ php-src/sapi/cgi/cgi_main.c Mon Feb 13 10:23:58 2006 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: cgi_main.c,v 1.275 2006/02/03 16:30:27 dmitry Exp $ */ +/* $Id: cgi_main.c,v 1.276 2006/02/13 10:23:58 dmitry Exp $ */ #include "php.h" #include "php_globals.h" @@ -846,22 +846,6 @@ } /* }}} */ -static void define_command_line_ini_entry(char *arg) -{ - char *name, *value; - - name = arg; - value = strchr(arg, '='); - if (value) { - *value = 0; - value++; - } else { - value = "1"; - } - zend_alter_ini_entry(name, strlen(name) + 1, value, strlen(value), PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE); -} - - static void php_register_command_line_global_vars(char **arg TSRMLS_DC) { char *var, *val; @@ -913,6 +897,7 @@ char *orig_optarg = php_optarg; char *script_file = NULL; zend_llist global_vars; + int ini_entries_len = 0; /* end of temporary locals */ #ifdef ZTS @@ -995,6 +980,23 @@ /* if we're started on command line, check to see if we are being started as an 'external' fastcgi server by accepting a bindpath parameter. */ + case 'd': { + /* define ini entries on command line */ + int len = strlen(php_optarg); + + if (strchr(php_optarg, '=')) { + cgi_sapi_module.ini_entries = realloc(cgi_sapi_module.ini_entries, ini_entries_len + len + sizeof("\n\0")); + memcpy(cgi_sapi_module.ini_entries + ini_entries_len, php_optarg, len); + memcpy(cgi_sapi_module.ini_entries + ini_entries_len + len, "\n\0", sizeof("\n\0")); + ini_entries_len += len + sizeof("\n\0") - 2; + } else { + cgi_sapi_module.ini_entries = realloc(cgi_sapi_module.ini_entries, ini_entries_len + len + sizeof("=1\n\0")); + memcpy(cgi_sapi_module.ini_entries + ini_entries_len, php_optarg, len); + memcpy(cgi_sapi_module.ini_entries + ini_entries_len + len, "=1\n\0", sizeof("=1\n\0")); + ini_entries_len += len + sizeof("=1\n\0") - 2; + } + break; + } case 'b': if (!fastcgi) { bindpath = strdup(php_optarg); @@ -1270,9 +1272,6 @@ case 'C': /* don't chdir to the script directory */ SG(options) |= SAPI_OPTION_NO_CHDIR; break; - case 'd': /* define ini entries on command line */ - define_command_line_ini_entry(php_optarg); - break; case 'e': /* enable extended info output */ CG(extended_info) = 1; @@ -1586,6 +1585,9 @@ if (cgi_sapi_module.php_ini_path_override) { free(cgi_sapi_module.php_ini_path_override); } + if (cgi_sapi_module.ini_entries) { + free(cgi_sapi_module.ini_entries); + } } zend_catch { exit_status = 255; } zend_end_try(); @@ -1595,7 +1597,7 @@ sapi_shutdown(); #ifdef ZTS - /*tsrm_shutdown();*/ + tsrm_shutdown(); #endif #if defined(PHP_WIN32) && ZEND_DEBUG && 0 http://cvs.php.net/viewcvs.cgi/php-src/sapi/cli/php_cli.c?r1=1.144&r2=1.145&diff_format=u Index: php-src/sapi/cli/php_cli.c diff -u php-src/sapi/cli/php_cli.c:1.144 php-src/sapi/cli/php_cli.c:1.145 --- php-src/sapi/cli/php_cli.c:1.144 Sat Jan 7 16:46:30 2006 +++ php-src/sapi/cli/php_cli.c Mon Feb 13 10:23:59 2006 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_cli.c,v 1.144 2006/01/07 16:46:30 helly Exp $ */ +/* $Id: php_cli.c,v 1.145 2006/02/13 10:23:59 dmitry Exp $ */ #include "php.h" #include "php_globals.h" @@ -106,6 +106,14 @@ #define PHP_MODE_REFLECTION_CLASS 9 #define PHP_MODE_REFLECTION_EXTENSION 10 +#define HARDCODED_INI \ + "html_errors=0\n" \ + "register_argc_argv=1\n" \ + "implicit_flush=1\n" \ + "output_buffering=0\n" \ + "max_execution_time=0\n" + + static char *php_optarg = NULL; static int php_optind = 1; #if (HAVE_LIBREADLINE || HAVE_LIBEDIT) && !defined(COMPILE_DL_READLINE) @@ -335,10 +343,6 @@ zend_hash_update(configuration_hash, name, sizeof(name), tmp, sizeof(zval), (void**)&entry);\ Z_STRVAL_P(entry) = zend_strndup(Z_STRVAL_P(entry), Z_STRLEN_P(entry)) -/* hard coded ini settings must be set in main() */ -#define INI_HARDCODED(name,value)\ - zend_alter_ini_entry(name, sizeof(name), value, strlen(value), PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE); - static void sapi_cli_ini_defaults(HashTable *configuration_hash) { zval *tmp, *entry; @@ -442,29 +446,6 @@ } /* }}} */ -static void define_command_line_ini_entry(char *arg TSRMLS_DC) -{ - char *name, *value; - - name = arg; - value = strchr(arg, '='); - if (value) { - *value = 0; - value++; - } else { - value = "1"; - } - - if (!strcasecmp(name, "extension")) { /* load function module */ - zval extension, zval; - ZVAL_STRING(&extension, value, 0); - php_dl(&extension, MODULE_PERSISTENT, &zval, 1 TSRMLS_CC); - } else { - zend_alter_ini_entry(name, strlen(name)+1, value, strlen(value), PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE); - } -} - - static void php_register_command_line_global_vars(char **arg TSRMLS_DC) { char *var, *val; @@ -608,6 +589,7 @@ int argc = __argc; char **argv = __argv; #endif + int ini_entries_len = 0; #if defined(PHP_WIN32) && defined(_DEBUG) && defined(PHP_WIN32_DEBUG_HEAP) { @@ -651,15 +633,36 @@ setmode(_fileno(stderr), O_BINARY); /* make the stdio mode be binary */ #endif + ini_entries_len = strlen(HARDCODED_INI); + cli_sapi_module.ini_entries = malloc(ini_entries_len+2); + memcpy(cli_sapi_module.ini_entries, HARDCODED_INI, ini_entries_len+1); + cli_sapi_module.ini_entries[ini_entries_len+1] = 0; while ((c = php_getopt(argc, argv, OPTIONS, &php_optarg, &php_optind, 0))!=-1) { switch (c) { - case 'c': - cli_sapi_module.php_ini_path_override = strdup(php_optarg); - break; - case 'n': - cli_sapi_module.php_ini_ignore = 1; - break; + case 'c': + cli_sapi_module.php_ini_path_override = strdup(php_optarg); + break; + case 'n': + cli_sapi_module.php_ini_ignore = 1; + break; + case 'd': { + /* define ini entries on command line */ + int len = strlen(php_optarg); + + if (strchr(php_optarg, '=')) { + cli_sapi_module.ini_entries = realloc(cli_sapi_module.ini_entries, ini_entries_len + len + sizeof("\n\0")); + memcpy(cli_sapi_module.ini_entries + ini_entries_len, php_optarg, len); + memcpy(cli_sapi_module.ini_entries + ini_entries_len + len, "\n\0", sizeof("\n\0")); + ini_entries_len += len + sizeof("\n\0") - 2; + } else { + cli_sapi_module.ini_entries = realloc(cli_sapi_module.ini_entries, ini_entries_len + len + sizeof("=1\n\0")); + memcpy(cli_sapi_module.ini_entries + ini_entries_len, php_optarg, len); + memcpy(cli_sapi_module.ini_entries + ini_entries_len + len, "=1\n\0", sizeof("=1\n\0")); + ini_entries_len += len + sizeof("=1\n\0") - 2; + } + break; + } } } php_optind = orig_optind; @@ -690,7 +693,6 @@ zend_first_try { zend_llist_init(&global_vars, sizeof(char *), NULL, 0); - zend_uv.html_errors = 0; /* tell the engine we're in non-html mode */ CG(in_compilation) = 0; /* not initialized but needed for several options */ EG(uninitialized_zval_ptr) = NULL; @@ -700,20 +702,9 @@ goto out_err; } - /* here is the place for hard coded defaults which cannot be overwritten in the ini file */ - INI_HARDCODED("register_argc_argv", "1"); - INI_HARDCODED("html_errors", "0"); - INI_HARDCODED("implicit_flush", "1"); - INI_HARDCODED("output_buffering", "0"); - INI_HARDCODED("max_execution_time", "0"); - while ((c = php_getopt(argc, argv, OPTIONS, &php_optarg, &php_optind, 0)) != -1) { switch (c) { - case 'd': /* define ini entries on command line */ - define_command_line_ini_entry(php_optarg TSRMLS_CC); - break; - case 'h': /* help & quit */ case '?': if (php_request_startup(TSRMLS_C)==FAILURE) { @@ -1237,6 +1228,9 @@ if (cli_sapi_module.php_ini_path_override) { free(cli_sapi_module.php_ini_path_override); } + if (cli_sapi_module.ini_entries) { + free(cli_sapi_module.ini_entries); + } } zend_end_try(); out: @@ -1253,7 +1247,7 @@ tsrm_shutdown(); #endif - exit(exit_status); + return exit_status; err: zend_ini_deactivate(TSRMLS_C); http://cvs.php.net/viewcvs.cgi/php-src/tests/lang/bug25145.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/tests/lang/bug25145.phpt diff -u php-src/tests/lang/bug25145.phpt:1.2 php-src/tests/lang/bug25145.phpt:1.3 --- php-src/tests/lang/bug25145.phpt:1.2 Fri Aug 29 09:05:11 2003 +++ php-src/tests/lang/bug25145.phpt Mon Feb 13 10:23:59 2006 @@ -20,3 +20,13 @@ } } Done +--UEXPECT-- +array(1) { + [123]=> + array(1) { + [0]=> + unicode(4) "SEGV" + } +} +Done + http://cvs.php.net/viewcvs.cgi/php-src/tests/run-test/test004.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/tests/run-test/test004.phpt diff -u php-src/tests/run-test/test004.phpt:1.2 php-src/tests/run-test/test004.phpt:1.3 --- php-src/tests/run-test/test004.phpt:1.2 Tue Jan 17 12:18:53 2006 +++ php-src/tests/run-test/test004.phpt Mon Feb 13 10:23:59 2006 @@ -1,7 +1,7 @@ --TEST-- INI section allows '=' --INI-- -arg_separator.input== +arg_separator.input="=" --FILE-- <?php var_dump(ini_get('arg_separator.input')); @@ -9,4 +9,4 @@ --EXPECT-- string(1) "=" --UEXPECT-- -unicode(1) "=" \ No newline at end of file +unicode(1) "="