X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=php%2Fxmlrpc%2Fphp_xmlrpc.h;h=b56f844911ba681a25e95b99cefc9dcfb4d26b56;hb=3be4cf02fc55d204b46b9a4386d9943fd5f28b9c;hp=c3cee0191d79fbf093745aee4bc05866583ff09a;hpb=d4f789d4b0b26f5f9946176629d6058d8ec2512c;p=plcapi.git diff --git a/php/xmlrpc/php_xmlrpc.h b/php/xmlrpc/php_xmlrpc.h index c3cee01..b56f844 100644 --- a/php/xmlrpc/php_xmlrpc.h +++ b/php/xmlrpc/php_xmlrpc.h @@ -94,9 +94,9 @@ PHP_FUNCTION(xmlrpc_server_register_introspection_callback); /* Fill in this structure and use entries in it for thread safety instead of using true globals. */ -typedef struct { - int x; /* fix error in msvc, cannot have empty structs */ -} zend_xmlrpc_globals; +ZEND_BEGIN_MODULE_GLOBALS(xmlrpc) + long allow_null; +ZEND_END_MODULE_GLOBALS(xmlrpc) /* In every function that needs to use variables in zend_xmlrpc_globals, do call XMLRPCLS_FETCH(); after declaring other variables used by @@ -105,6 +105,16 @@ typedef struct { examples in any other php module directory. */ +#ifdef ZTS +#define XMLRPCG(v) TSRMG(xmlrpc_globals_id, zend_xmlrpc_globals *, v) +#define XMLRPCLS_FETCH() zend_xmlrpc_globals *xmlrpc_globals = ts_resource(xmlrpc_globals_id) +#else +#define XMLRPCG(v) (xmlrpc_globals.v) +#define XMLRPCLS_FETCH() +#endif + +ZEND_EXTERN_MODULE_GLOBALS(xmlrpc) + #else #define phpext_xmlrpc_ptr NULL