From: Andi Gutmans Date: Fri, 1 Dec 2000 09:50:01 +0000 (+0000) Subject: - Fix swf build issues from bug #7612 X-Git-Tag: php-4.0.4RC3~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ae7c036e4143e89eed8bad434437f0b8da150fcc;p=php - Fix swf build issues from bug #7612 - Not tested! Someone please compile it. --- diff --git a/ext/swf/php_swf.h b/ext/swf/php_swf.h index 45035c79c0..7e6d7a8c2a 100644 --- a/ext/swf/php_swf.h +++ b/ext/swf/php_swf.h @@ -100,15 +100,18 @@ PHP_FUNCTION(swf_translate); PHP_FUNCTION(swf_rotate); PHP_FUNCTION(swf_posround); -typedef struct { + +ZEND_BEGIN_MODULE_GLOBALS(swf) int use_file; char *tmpfile_name; -} php_swf_globals; +ZEND_END_MODULE_GLOBALS(swf) #ifdef ZTS +#define SWFLS_D zend_swf_globals *swf_globals #define SWFG(v) (swf_globals->v) -#define SWFLS_FETCH() php_swf_globals *swf_globals = ts_resource(gd_swf_id) +#define SWFLS_FETCH() zend_swf_globals *swf_globals = ts_resource(swf_globals_id) #else +#define SWFLS_D #define SWFG(v) (swf_globals.v) #define SWFLS_FETCH() #endif diff --git a/ext/swf/swf.c b/ext/swf/swf.c index 92e4e779a5..e09bc9cac0 100644 --- a/ext/swf/swf.c +++ b/ext/swf/swf.c @@ -28,12 +28,7 @@ #include "php_open_temporary_file.h" #include "php_swf.h" -#ifdef ZTS -int swf_globals_id; -#else -php_swf_globals swf_globals; -#endif - +ZEND_DECLARE_MODULE_GLOBALS(swf) function_entry swf_functions[] = { PHP_FE(swf_openfile, NULL)