Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:2146 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 39572 invoked from network); 4 Jun 2003 05:33:33 -0000 Received: from unknown (HELO mail.de-punkt.de) (62.4.81.205) by pb1.pair.com with SMTP; 4 Jun 2003 05:33:33 -0000 Received: (qmail 12278 invoked by uid 508); 4 Jun 2003 05:33:32 -0000 Received: from sb@sebastian-bergmann.de by webby by uid 511 with qmail-scanner-1.16 (f-prot: 3.12. spamassassin: 2.53. Clear:. Processed in 0.485244 secs); 04 Jun 2003 05:33:32 -0000 Received: from unknown (HELO wopr) (sb@de-punkt.de@80.142.31.219) by webby.de-punkt.de with SMTP; 4 Jun 2003 05:33:31 -0000 Received: from wopr [127.0.0.1] by wopr (192.168.0.1) (userid 2) with Hamster-NewsToMail-Gate (Classic Hamster Version 2.0 Build 2.0.2.1) ; Wed, 04 Jun 2003 07:33:15 +0200 Date: Wed, 04 Jun 2003 07:33:14 +0200 Organization: www.sebastian-bergmann.de User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030529 X-Accept-Language: de, en MIME-Version: 1.0 References: <20030604033715.50026.qmail@pb1.pair.com> In-Reply-To: <20030604033715.50026.qmail@pb1.pair.com> Content-Type: multipart/mixed; boundary="------------090209030406030406000109" To: internals@lists.php.net Sender: admin Lines: 146 X-Qmail-Scanner-Message-ID: <105470481153012271@webby> Subject: Re: [PHP-DEV] Namespace leftovers From: sebastian@php.net (Sebastian Bergmann) Message-ID: --------------090209030406030406000109 Content-Type: text/plain; charset=us-ascii format=flowed Content-Transfer-Encoding: 7bit l0t3k wrote: > 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/ --------------090209030406030406000109 Content-Type: text/plain; name="namespace_leftovers.txt"; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="namespace_leftovers.txt" 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; } --------------090209030406030406000109--