- Not tested! Someone please compile it.
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
#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)