Re: cvs: php4 /ext/standard info.c info.h /mainmain.c
| From: | Zeev Suraski | Date: | Tue, 31 Oct 2000 18:15:25 +0000 |
| Subject: | Re: cvs: php4 /ext/standard info.c info.h /mainmain.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-2388@lists.php.net to get a copy of this message | ||
At 20:08 31-10-00, Hartmut Holzgraefe wrote:
Zeev Suraski wrote: We have to think about this generalization. It switched 3 strcmp()'s with a hash lookup. and it removes the hard limit of three images, allowing extensions to add their own images in MINFO() output without changing global codeYes, even though initially I didn't really mean that to go beyond just these two images (and Colin's April fools joke). I'm still not quite sure we should encourage people to add images in. They bloat the binary. I wouldn't want to see the binary size gets increased in 200K because each module adds its own picture...
[...] Generally, I like this abstraction. We need to think of a better way to do it. Perhaps, we should make two tests - an strncmp() for the 4 bytes or so, to see if they're "PHPE", and go on with the hash lookup only if they are.Yes. They're originally GUID (Globally Unique ID's) or UUID's (Universally Unique ID's, GUID is Microsoft's name to UUID), prefixed by the 'PHP' string. We can, and perhaps should, increase the prefix from plain PHP to PHPIMAGE, so that we can strncmp() for it. Generating GUIDs can be done very easily using Visual Studio (uuidgen), but there are probably tools to do it for UNIX as well. Zeev -- Zeev Suraski <zeev@zend.com> http://www.zend.com/