X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-pq;a=blobdiff_plain;f=php_pq.h;h=43583f828a07a4a1681de9a3e3287e846a1f7494;hp=ffb93618685c03dbe4d83121a1a523eb203bf172;hb=7910a40d7768bdfcf92a6fb8d194a52518cd7c5e;hpb=3fe349a4acbfc6bc777cae313742c5d87d651550 diff --git a/php_pq.h b/php_pq.h index ffb9361..43583f8 100644 --- a/php_pq.h +++ b/php_pq.h @@ -14,11 +14,7 @@ #ifndef PHP_PQ_H #define PHP_PQ_H -#define PHP_PQ_VERSION "0.5.1" - -int pq_module_number; -zend_module_entry pq_module_entry; -#define phpext_pq_ptr &pq_module_entry +#define PHP_PQ_VERSION "2.0.0" #ifdef PHP_WIN32 # define PHP_PQ_API __declspec(dllexport) @@ -28,13 +24,24 @@ zend_module_entry pq_module_entry; # define PHP_PQ_API extern #endif +extern int pq_module_number; +extern zend_module_entry pq_module_entry; +#define phpext_pq_ptr &pq_module_entry + +ZEND_BEGIN_MODULE_GLOBALS(php_pq) + struct { + /* for ext-raphf */ + zend_string *name; + } connection; +ZEND_END_MODULE_GLOBALS(php_pq) + +ZEND_EXTERN_MODULE_GLOBALS(php_pq); + #ifdef ZTS -# include "TSRM.h" -# define TSRMLS_DF(d) TSRMLS_D = (d)->ts -# define TSRMLS_CF(d) (d)->ts = TSRMLS_C +# include "TSRM/TSRM.h" +# define PHP_PQ_G ((zend_php_pq_globals *) (*((void ***) tsrm_get_ls_cache()))[TSRM_UNSHUFFLE_RSRC_ID(php_pq_globals_id)]) #else -# define TSRMLS_DF(d) -# define TSRMLS_CF(d) +# define PHP_PQ_G (&php_pq_globals) #endif #endif /* PHP_PQ_H */