diff options
author | Rasmus Lerdorf <rasmus@php.net> | 2000-10-05 20:48:12 +0000 |
---|---|---|
committer | Rasmus Lerdorf <rasmus@php.net> | 2000-10-05 20:48:12 +0000 |
commit | 348079bc3ff13c54a486249dab17445834bb91f9 (patch) | |
tree | 6198293c6fd408152dabeb0ebfb4c08f9b5709c0 | |
parent | fb2c23645bf06fb2ac7141160eb1a48b4dc49be3 (diff) | |
download | php-git-348079bc3ff13c54a486249dab17445834bb91f9.tar.gz |
Get ext_skel working again
-rw-r--r-- | ext/skeleton/php_skeleton.h | 17 | ||||
-rw-r--r-- | ext/skeleton/skeleton.c | 5 |
2 files changed, 12 insertions, 10 deletions
diff --git a/ext/skeleton/php_skeleton.h b/ext/skeleton/php_skeleton.h index 11af41e00f..2fadf2b087 100644 --- a/ext/skeleton/php_skeleton.h +++ b/ext/skeleton/php_skeleton.h @@ -26,17 +26,14 @@ PHP_MINFO_FUNCTION(extname); 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 diff --git a/ext/skeleton/skeleton.c b/ext/skeleton/skeleton.c index b40b8424db..5bb696ae61 100644 --- a/ext/skeleton/skeleton.c +++ b/ext/skeleton/skeleton.c @@ -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[]. */ |