Re: Fw: small note about interface registration

From: Date: Sun, 04 Jun 2006 09:41:51 +0000
Subject: Re: Fw: small note about interface registration
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-23910@lists.php.net to get a copy of this message
Not a lot.... (attached) ----- Original Message ----- From: "Marcus Boerger" <helly@php.net> To: "Steph Fox" <steph@zend.com> Cc: "internals" <internals@lists.php.net> Sent: Sunday, June 04, 2006 11:31 AM Subject: Re: [PHP-DEV] Fw: small note about interface registration
Hello Steph, what did you fix in spl and reflection? best regards marcus Sunday, June 4, 2006, 9:05:02 AM, you wrote:
I take it back, fixing that in SPL and reflection _did_ do something :)
The only problem left now is that DL_UNLOAD's called too soon - we need ts_free_id() to be called in the Zend module_destructor, but DL_UNLOAD to be called at the end of tsrm_shutdown() - or at least, after the global core stuff is destroyed. And TSRM doesn't know about the module. Hm.
----- Original Message ----- From: "Steph Fox" <steph@zend.com> To: "internals" <internals@lists.php.net> Sent: Sunday, June 04, 2006 8:26 AM Subject: small note about interface registration
Guys/gal, At the risk of being boring, someone should probably know that the ZEND_ACC_INTERFACE flag isn't getting set for anything outside the Engine during zend_register_internal_interface(). zend_API.c needs to #include zend_compile.h to get it defined, unless you know a better way. SPL and Reflection don't use zend_register_internal_interface(), so they won't get theirs set from within ZE anyway (tho' they probably should). Note that this doesn't fix my PHP-GTK issue, it was just a side-query into global class table corruption :-( - Steph
Best regards, Marcus __________ NOD32 1.1380 (20060125) Information __________ This message was checked by NOD32 antivirus system. http://www.eset.com


Index: ext/reflection/php_reflection.c =================================================================== RCS file: /repository/php-src/ext/reflection/php_reflection.c,v retrieving revision 1.164.2.33.2.3 diff -u -r1.164.2.33.2.3 php_reflection.c --- ext/reflection/php_reflection.c 1 Jun 2006 14:31:22 -0000 1.164.2.33.2.3 +++ ext/reflection/php_reflection.c 4 Jun 2006 06:36:44 -0000 @@ -4415,7 +4415,7 @@ reflection_ptr = zend_register_internal_class(&_reflection_entry TSRMLS_CC); INIT_CLASS_ENTRY(_reflection_entry, "Reflector", reflector_functions); - reflector_ptr = zend_register_internal_class(&_reflection_entry TSRMLS_CC); + reflector_ptr = zend_register_internal_interface(&_reflection_entry TSRMLS_CC); reflector_ptr->ce_flags = ZEND_ACC_ABSTRACT | ZEND_ACC_INTERFACE; INIT_CLASS_ENTRY(_reflection_entry, "ReflectionFunction", reflection_function_functions); Index: ext/spl/spl_functions.c =================================================================== RCS file: /repository/php-src/ext/spl/spl_functions.c,v retrieving revision 1.28.2.3 diff -u -r1.28.2.3 spl_functions.c --- ext/spl/spl_functions.c 9 Mar 2006 11:43:45 -0000 1.28.2.3 +++ ext/spl/spl_functions.c 4 Jun 2006 06:37:34 -0000 @@ -42,10 +42,10 @@ INIT_CLASS_ENTRY(ce, class_name, functions); ce.name_length = strlen(class_name); - *ppce = zend_register_internal_class(&ce TSRMLS_CC); + *ppce = zend_register_internal_interface(&ce TSRMLS_CC); /* entries changed by initialize */ - (*ppce)->ce_flags = ZEND_ACC_INTERFACE; + /* (*ppce)->ce_flags = ZEND_ACC_INTERFACE; */ } /* }}} */
« previous php.internals (#23910) next »