the class entry structure still contains the "ns" member, which is not initialized.
The attached patch removes this namespace leftovers, but I'm not sure it's correct.
-- Sebastian Bergmann http://sebastian-bergmann.de/ http://phpOpenTracker.de/
Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/
Index: Zend/zend.h =================================================================== RCS file: /repository/ZendEngine2/zend.h,v retrieving revision 1.208 diff -u -r1.208 zend.h --- Zend/zend.h 2 Jun 2003 12:13:10 -0000 1.208 +++ Zend/zend.h 4 Jun 2003 05:31:08 -0000 @@ -308,7 +308,6 @@ HashTable *static_members; HashTable constants_table; zend_function_entry *builtin_functions; - struct _zend_class_entry *ns;
union _zend_function *constructor; union _zend_function *destructor; Index: Zend/zend_API.c =================================================================== RCS file: /repository/ZendEngine2/zend_API.c,v retrieving revision 1.174 diff -u -r1.174 zend_API.c --- Zend/zend_API.c 2 Jun 2003 12:13:10 -0000 1.174 +++ Zend/zend_API.c 4 Jun 2003 05:31:09 -0000 @@ -1565,29 +1565,6 @@ return module->version; } -ZEND_API void zend_make_full_classname(zend_class_entry *ce, char **name, zend_uint *name_len) -{ - int len = ce->name_length; - char *full_name; - - if(ce->ns && ce->ns->name) { - len += ce->ns->name_length + 2; - } - - *name = full_name = emalloc(len+1); - *name_len = len; - - if(ce->ns && ce->ns->name) { - memcpy(full_name, ce->ns->name, ce->ns->name_length); - full_name += ce->ns->name_length; - *(full_name++) = ':'; - *(full_name++) = ':'; - } - - memcpy(full_name, ce->name, ce->name_length); - full_name[ce->name_length] = '\0'; -} - /* * Local variables: * tab-width: 4 Index: Zend/zend_API.h =================================================================== RCS file: /repository/ZendEngine2/zend_API.h,v retrieving revision 1.142 diff -u -r1.142 zend_API.h --- Zend/zend_API.h 2 Jun 2003 12:13:10 -0000 1.142 +++ Zend/zend_API.h 4 Jun 2003 05:31:09 -0000 @@ -257,8 +257,6 @@ ZEND_API ZEND_FUNCTION(display_disabled_function); ZEND_API ZEND_FUNCTION(display_disabled_class); -ZEND_API void zend_make_full_classname(zend_class_entry *ce, char **name, zend_uint *name_len); - #if ZEND_DEBUG #define CHECK_ZVAL_STRING(z) \ if ((z)->value.str.val[ (z)->value.str.len ] != '\0') { zend_error(E_WARNING, "String is not zero-terminated (%s)", (z)->value.str.val); } Index: Zend/zend_builtin_functions.c =================================================================== RCS file: /repository/ZendEngine2/zend_builtin_functions.c,v retrieving revision 1.190 diff -u -r1.190 zend_builtin_functions.c --- Zend/zend_builtin_functions.c 2 Jun 2003 12:13:10 -0000 1.190 +++ Zend/zend_builtin_functions.c 4 Jun 2003 05:31:09 -0000 @@ -535,12 +535,7 @@ RETURN_FALSE; } - if(ce->ns) { - zend_make_full_classname(ce, &name, &name_len); - RETURN_STRINGL(name, name_len, 0); - } else { - RETURN_STRINGL(ce->name, ce->name_length, 1); - } + RETURN_STRINGL(ce->name, ce->name_length, 1); } RETURN_STRINGL(name, name_len, 0); @@ -567,7 +562,6 @@ && Z_OBJ_HT_PP(arg)->get_class_name(*arg, &name, &name_length, 1 TSRMLS_CC) == SUCCESS) { RETURN_STRINGL(name, name_length, 0); } else if (Z_OBJ_HT_PP(arg)->get_class_entry && (ce = zend_get_class_entry(*arg TSRMLS_CC))) { - zend_make_full_classname(ce, &name, &name_length); RETURN_STRINGL(name, name_length, 0); } else { RETURN_FALSE; @@ -583,7 +577,6 @@ } if (ce && ce->parent) { - zend_make_full_classname(ce->parent, &name, &name_length); RETURN_STRINGL(name, name_length, 0); } else { RETURN_FALSE; Index: Zend/zend_object_handlers.c =================================================================== RCS file: /repository/ZendEngine2/zend_object_handlers.c,v retrieving revision 1.50 diff -u -r1.50 zend_object_handlers.c --- Zend/zend_object_handlers.c 2 Jun 2003 12:13:11 -0000 1.50 +++ Zend/zend_object_handlers.c 4 Jun 2003 05:31:21 -0000 @@ -802,7 +802,6 @@ ce = zobj->ce; } - zend_make_full_classname(ce, class_name, class_name_len); return SUCCESS; }
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php