summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2000-12-01 09:50:01 +0000
committerAndi Gutmans <andi@php.net>2000-12-01 09:50:01 +0000
commitae7c036e4143e89eed8bad434437f0b8da150fcc (patch)
tree8d470e3fabd8ae690161ae69febd45a3d8d94fd4
parent727e89ab1b117d43f88a32827241b06619d88508 (diff)
downloadphp-git-ae7c036e4143e89eed8bad434437f0b8da150fcc.tar.gz
- Fix swf build issues from bug #7612
- Not tested! Someone please compile it.
-rw-r--r--ext/swf/php_swf.h9
-rw-r--r--ext/swf/swf.c7
2 files changed, 7 insertions, 9 deletions
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)