Re: [PATCH] Namespace Patch, Beta 2

From: Date: Wed, 10 Aug 2005 03:15:29 +0000
Subject: Re: [PATCH] Namespace Patch, Beta 2
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-17766@lists.php.net to get a copy of this message
I finally got a chance to test under Windows today, and there was a 
variable that was not being initialized under ZTS mode that was causing
problems in Windows. The attached patch is correctly initializing it. Also,
the namespace_anonymous.php file was missing from the patch, which the
attached now has. The files used by the tests have not changed, so
tests.tar.gz from the first post in this thread can still be used.


Regards,

Jessie


Jessie Hernandez wrote:

> Classes that had uppercase letters were not being handled properly in
> namespace imports. The attached patch has this fix (thanks Maxx!). Also,
> the attached patch includes the default behavior of resolving
> simple-imported class names to their file paths (ns:class1 being looked up
> as ns/class1(.inc or .inc.php).
> 
> I have a couple of questions, though:
> 
> 1) I asked this before, but it wasn't answered: is there any reason why
> .php is not a default extension for spl_autoload?
> 
> 2) Right now, you have to use the autoload_import_class function for
> namespace imports so that the class names are properly found. This
> function can be eliminated if there was a way for me to get the last
> inserted element in the class_table. Can I just simply call
> zend_hash_internal_pointer_end_ex on class_table and get that end element,
> assuming that this was the last element that was inserted? Or is the order
> in which items are inserted into a hashtable undefined?
> 
> 
> Regards,
> 
> Jessie


Attachment: [text/x-diff] ns_0809.patch

Thread (6 messages)

« previous php.internals (#17766) next »