Skip to content

Commit ae7c036

Browse files
author
Andi Gutmans
committed
- Fix swf build issues from bug #7612
- Not tested! Someone please compile it.
1 parent 727e89a commit ae7c036

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

ext/swf/php_swf.h

+6-3
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,18 @@ PHP_FUNCTION(swf_translate);
100100
PHP_FUNCTION(swf_rotate);
101101
PHP_FUNCTION(swf_posround);
102102

103-
typedef struct {
103+
104+
ZEND_BEGIN_MODULE_GLOBALS(swf)
104105
int use_file;
105106
char *tmpfile_name;
106-
} php_swf_globals;
107+
ZEND_END_MODULE_GLOBALS(swf)
107108

108109
#ifdef ZTS
110+
#define SWFLS_D zend_swf_globals *swf_globals
109111
#define SWFG(v) (swf_globals->v)
110-
#define SWFLS_FETCH() php_swf_globals *swf_globals = ts_resource(gd_swf_id)
112+
#define SWFLS_FETCH() zend_swf_globals *swf_globals = ts_resource(swf_globals_id)
111113
#else
114+
#define SWFLS_D
112115
#define SWFG(v) (swf_globals.v)
113116
#define SWFLS_FETCH()
114117
#endif

ext/swf/swf.c

+1-6
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,7 @@
2828
#include "php_open_temporary_file.h"
2929
#include "php_swf.h"
3030

31-
#ifdef ZTS
32-
int swf_globals_id;
33-
#else
34-
php_swf_globals swf_globals;
35-
#endif
36-
31+
ZEND_DECLARE_MODULE_GLOBALS(swf)
3732

3833
function_entry swf_functions[] = {
3934
PHP_FE(swf_openfile, NULL)

0 commit comments

Comments
 (0)