On Wed, 02 Apr 2003, Andrei Zmievski wrote:
> + if (EG(active_namespace) != ns) {
> + orig_namespace = EG(active_namespace);
> + EG(active_namespace) = ns;
> + CG(class_table) = &ns->class_table;
> + }
> + register_class = zend_register_internal_class_ex(class_entry, parent_ce, NULL
> TSRMLS_CC);
> + if (orig_namespace) {
> + EG(active_namespace) = orig_namespace;
> + CG(class_table) = &orig_namespace->class_table;
This piece of code was necessary because zend_register_class() uses
CG(class_table) to register the class in. Why are we not using
EG(class_table) instead? It would be more logical, and also make the
code cleaner - just use zend_switch_namespace().
-Andrei http://www.gravitonic.com/
* Reality isn't all it's cracked up to be. *
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php