Re: cvs: php4 /ext/skeleton/ create_module php_skeleton.h skeleton.c skeleton.php
| From: | Sascha Schumann | Date: | Fri, 09 Jun 2000 03:09:21 +0000 |
| Subject: | Re: cvs: php4 /ext/skeleton/ create_module php_skeleton.h skeleton.c skeleton.php | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-104@lists.php.net to get a copy of this message | ||
Some comments:
> /* You should tweak config.m4 so this symbol (or some else suitable)
> gets defined.
> */
> #if HAVE__EXTNAME_
This should be #ifdef.
> extern zend_module_entry _extname__module_entry;
> #define _extname__module_ptr &_extname__module_entry
Please use phpext_extname_ptr in PHP 4.
Defining phpext_extname_ptr later to extname_module_entry was
done while we converted old modules to PHP 4. New modules
should use the new notation.
> /* Use this for type if your module registers any resources. You can of course
> rename it and add more if needed. These can be true globals, they don't need
> thread safety. Remove if not needed.
> */
> static int le_extname_;
With dynamic extensions, it is possible to get different ids
from register_resource. That is why resource ids need to be
in the globals structure as well.
I'd also like to see create_module merged back into ext_skel.
- Sascha