cvs: php4 /ext/skeleton php_skeleton.h skeleton.c
| From: | Rasmus Lerdorf | Date: | Thu, 05 Oct 2000 20:48:12 +0000 |
| Subject: | cvs: php4 /ext/skeleton php_skeleton.h skeleton.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-1942@lists.php.net to get a copy of this message | ||
rasmus Thu Oct 5 13:48:12 2000 EDT
Modified files:
/php4/ext/skeleton php_skeleton.h skeleton.c
Log:
Get ext_skel working again
Index: php4/ext/skeleton/php_skeleton.h
diff -u php4/ext/skeleton/php_skeleton.h:1.10 php4/ext/skeleton/php_skeleton.h:1.11
--- php4/ext/skeleton/php_skeleton.h:1.10 Tue Oct 3 08:51:39 2000
+++ php4/ext/skeleton/php_skeleton.h Thu Oct 5 13:48:12 2000
@@ -26,17 +26,14 @@
PHP_FUNCTION(confirm_extname_compiled); /* For testing, remove later. */
/* __function_declarations_here__ */
-/* Fill in this structure and use entries in it
- for thread safety instead of using true globals.
+/*
+ Declare any global variables you may need between the BEGIN
+ and END macros here:
+
+ZEND_BEGIN_MODULE_GLOBALS(extname)
+ int global_variable;
+ZEND_END_MODULE_GLOBALS(extname)
*/
-typedef struct {
- /* You can use the next one as type if your module registers any
- resources. Oh, you can of course rename it to something more
- suitable, add list entry types or remove it if it not needed.
- It's just an example.
- */
- int le_extname;
-} php_extname_globals;
/* In every function that needs to use variables in php_extname_globals,
do call EXTNAMELS_FETCH(); after declaring other variables used by
Index: php4/ext/skeleton/skeleton.c
diff -u php4/ext/skeleton/skeleton.c:1.9 php4/ext/skeleton/skeleton.c:1.10
--- php4/ext/skeleton/skeleton.c:1.9 Wed Oct 4 16:11:07 2000
+++ php4/ext/skeleton/skeleton.c Thu Oct 5 13:48:12 2000
@@ -9,7 +9,12 @@
*/
#if HAVE_EXTNAME
+/* If you declare any globals in php_extname.h uncomment this:
ZEND_DECLARE_MODULE_GLOBALS(extname)
+*/
+
+/* True global resources - no need for thread safety here */
+static int le_extname;
/* Every user visible function must have an entry in extname_functions[].
*/