Re: Patch for zend_register_internal_class_in_ns
| From: | Andrei Zmievski | Date: | Mon, 07 Apr 2003 14:39:26 +0000 |
| Subject: | Re: Patch for zend_register_internal_class_in_ns | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-757@lists.php.net to get a copy of this message | ||
On Sun, 06 Apr 2003, Timm Friebe wrote:
> Sorry for bugging you again, but I just realized my patch was
> incomplete: If you're registering classes where I am (during engine
> startup), you'll also need to set CG(active_namespace) - as
> zend_initialize_class_data() will set ce->ns = CG(active_namespace);
> (zend_compile.c, line 3528).
>
> The previous patch works OK, but namespace names weren't showing up
> (e.g., in var_dump()) as ce->ns was NULL.
>
> A new patch is attached.
What if CG(active_namespace) and EG(active_namespace) are different?
You'll overwrite them both when restoring original one. This whole
business with using CG() or EG() is a bit messy. We should have only one
table to work with and the engine should determine whether it's CG() or
EG() that needs to be used.
-Andrei http://www.gravitonic.com/
* Why is it always Segmentation's fault? *