summaryrefslogtreecommitdiffhomepage
path: root/php_imlib.h
diff options
context:
space:
mode:
Diffstat (limited to 'php_imlib.h')
-rw-r--r--php_imlib.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/php_imlib.h b/php_imlib.h
index e1aad2c..0d188ed 100644
--- a/php_imlib.h
+++ b/php_imlib.h
@@ -35,6 +35,10 @@
#if HAVE_IMLIB
+#ifdef ZTS
+#include "TSRM.h"
+#endif
+
extern zend_module_entry imlib_module_entry;
#define phpext_imlib_ptr &imlib_module_entry
@@ -177,18 +181,16 @@ ZEND_BEGIN_MODULE_GLOBALS(imlib)
char *font_path;
char **saved_path;
char *filter_path;
- int cache_size;
- int min_cache_size;
- int max_cache_size;
+ long cache_size;
+ long min_cache_size;
+ long max_cache_size;
struct php_imlib_filter *filters;
ZEND_END_MODULE_GLOBALS(imlib)
#ifdef ZTS
-#define IMLIBG(v) (imlib_globals->v)
-#define IMLIBLS_FETCH() zend_imlib_globals *imlib_globals = ts_resource(gd_imlib_id)
+# define IMLIBG(v) TSRMG(imlib_globals_id, zend_imlib_globals *, v)
#else
-#define IMLIBG(v) (imlib_globals.v)
-#define IMLIBLS_FETCH()
+# define IMLIBG(v) (imlib_globals.v)
#endif
#else