RE: [PHP-CVS] cvs: php4 /ext/skeleton php_skeleton.h
| From: | Sterling Hughes | Date: | Mon, 20 Nov 2000 16:13:18 +0000 |
| Subject: | RE: [PHP-CVS] cvs: php4 /ext/skeleton php_skeleton.h | ||
| References: | 1 2 3 4 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-2700@lists.php.net to get a copy of this message | ||
At 06:06 PM 11/20/2000 +0200, Andi Gutmans wrote:
At 09:12 20/11/00 +0100, Sterling Hughes wrote:I disagree. I think that there should be an easy way to access and pass your global structure. I don't think most people will use the direct access instead of the EXTNAMEG() macros, and if they do, so what. The storage of globals will probably always be a structure, therefore it really doesn't hurt in the backwards compatibilty area. There should be a way for someone who's extending php to access the globals structure directly (and yet in an abstracted way ;), I mentioned one use, I'm sure there are many others. -SterlingAt 07:20 AM 11/20/2000 +0200, Andi Gutmans wrote:I don't like putting this in the skeleton. The EXTNAMEG() should pretty much cover what is needed and it's used by all of PHP 4 and Zend. If you really need it in your extension it's probably best just to keep it there. I wouldn't want all new extensions using the new macros instead.At 12:34 AM 11/19/00 +0100, Sterling Hughes wrote:Yeah, I mixed up some terminology there. Sablotron will have two structures, a structure for sablotron globals and a structure which represents the sablotron handle. Both structures contain a php_sablot_errors linked list in them (for global error storage as well as per-handle error storage, both of these set of structures have the same name). I have a macro where I simply access those two elements of the structure, so it helps to have a nice macro that lets me get a global handle. Yes it could be done other ways, but that's just one example.... I think its simple helpful to be able to directly access your global structure (in a way that will work in both ZTS mode and normal module the same).Sablotron will when I commit the next version (improved error handling, reusing a single processor for increased performance). Its nice if you need to pass a handle (ie, le_sablot or SABLOTG) that both have the same entries.le_sablot should be global anyway no? You might be right but I don't quite understand what you mean :) Please explain it a bit better :)