]> granicus.if.org Git - php/commitdiff
- Fix swf build issues from bug #7612
authorAndi Gutmans <andi@php.net>
Fri, 1 Dec 2000 09:50:01 +0000 (09:50 +0000)
committerAndi Gutmans <andi@php.net>
Fri, 1 Dec 2000 09:50:01 +0000 (09:50 +0000)
- Not tested! Someone please compile it.

ext/swf/php_swf.h
ext/swf/swf.c

index 45035c79c0ad765a05ee2ac6bb25a083f395997e..7e6d7a8c2a8e601a0fb437b091b89e88ac08eff0 100644 (file)
@@ -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
index 92e4e779a55c5751ff59ec205c2a94526662b8f6..e09bc9cac06a9582282d6eef9741feb5fad36a6e 100644 (file)
 #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)