diff options
author | Jouni Ahto <jah@php.net> | 2000-06-09 18:04:17 +0000 |
---|---|---|
committer | Jouni Ahto <jah@php.net> | 2000-06-09 18:04:17 +0000 |
commit | 420d668f33e3685228f9434c8272853e08b32a4f (patch) | |
tree | 1e663a7e11593f478459e16c78faea6530c12716 /ext/skeleton/php_skeleton.h | |
parent | ae191806418576a788f45439710055b49e8d3391 (diff) | |
download | php-git-420d668f33e3685228f9434c8272853e08b32a4f.tar.gz |
- Cosmetic changes.
- Optionally, create function entries, stubs and declarations from names
listed in a file.
Diffstat (limited to 'ext/skeleton/php_skeleton.h')
-rw-r--r-- | ext/skeleton/php_skeleton.h | 61 |
1 files changed, 31 insertions, 30 deletions
diff --git a/ext/skeleton/php_skeleton.h b/ext/skeleton/php_skeleton.h index fb4b3739e2..aaf157925f 100644 --- a/ext/skeleton/php_skeleton.h +++ b/ext/skeleton/php_skeleton.h @@ -18,70 +18,71 @@ /* $Id: */ -#ifndef _PHP__EXTNAME__H -#define _PHP__EXTNAME__H +#ifndef _PHP_EXTNAME_H +#define _PHP_EXTNAME_H -#ifdef COMPILE_DL__EXTNAME_ -#undef HAVE__EXTNAME_ -#define HAVE__EXTNAME_ 1 +#ifdef COMPILE_DL_EXTNAME +#undef HAVE_EXTNAME +#define HAVE_EXTNAME 1 #endif /* You should tweak config.m4 so this symbol (or some else suitable) gets defined. */ -#if HAVE__EXTNAME_ +#if HAVE_EXTNAME -extern zend_module_entry _extname__module_entry; -#define phpext__extname__ptr &_extname__module_entry +extern zend_module_entry extname_module_entry; +#define phpext_extname_ptr &extname_module_entry #ifdef PHP_WIN32 -#define PHP__EXTNAME__API __declspec(dllexport) +#define PHP_EXTNAME_API __declspec(dllexport) #else -#define PHP__EXTNAME__API +#define PHP_EXTNAME_API #endif -PHP_MINIT_FUNCTION(_extname_); -PHP_MSHUTDOWN_FUNCTION(_extname_); -PHP_RINIT_FUNCTION(_extname_); -PHP_RSHUTDOWN_FUNCTION(_extname_); -PHP_MINFO_FUNCTION(_extname_); +PHP_MINIT_FUNCTION(extname); +PHP_MSHUTDOWN_FUNCTION(extname); +PHP_RINIT_FUNCTION(extname); +PHP_RSHUTDOWN_FUNCTION(extname); +PHP_MINFO_FUNCTION(extname); -PHP_FUNCTION(_extname__test); /* For testing, remove later. */ +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. +*/ typedef struct { - /* Fill in this structure and use entries in it - for thread safety instead of using true globals. - */ /* 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; + int le_extname; +} php_extname_globals; -/* In every function that needs to use variables in php__extname__globals, - do call _EXTNAME_LS_FETCH(); after declaring other variables used by - that function, and always refer to them as _EXTNAME_G(variable). +/* In every function that needs to use variables in php_extname_globals, + do call EXTNAMELS_FETCH(); after declaring other variables used by + that function, and always refer to them as EXTNAMEG(variable). You are encouraged to rename these macros something shorter, see examples in any other php module directory. */ #ifdef ZTS -#define _EXTNAME_G(v) (_extname__globals->v) -#define _EXTNAME_LS_FETCH() php__extname__globals *_extname__globals = ts_resource(gd__extname__id) +#define EXTNAMEG(v) (extname_globals->v) +#define EXTNAMELS_FETCH() php_extname_globals *extname_globals = ts_resource(gd_extname_id) #else -#define _EXTNAME_G(v) (_extname__globals.v) -#define _EXTNAME_LS_FETCH() +#define EXTNAMEG(v) (extname_globals.v) +#define EXTNAMELS_FETCH() #endif #else -#define php__extname__ptr NULL +#define php_extname_ptr NULL #endif -#endif /* _PHP__EXTNAME__H */ +#endif /* _PHP_EXTNAME_H */ /* * Local variables: |