diff options
Diffstat (limited to 'ext/gd/php_gd.h')
-rw-r--r-- | ext/gd/php_gd.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/ext/gd/php_gd.h b/ext/gd/php_gd.h index 0426862063..3d5e37f742 100644 --- a/ext/gd/php_gd.h +++ b/ext/gd/php_gd.h @@ -56,6 +56,15 @@ extern zend_module_entry gd_module_entry; #define phpext_gd_ptr &gd_module_entry +typedef struct { + int le_gd; + int le_gd_font; +#if HAVE_LIBT1 + int le_ps_font; + int le_ps_enc; +#endif +} php_gd_globals; + /* gd.c functions */ PHP_MINFO_FUNCTION(gd); extern PHP_MINIT_FUNCTION(gd); @@ -108,6 +117,18 @@ PHP_FUNCTION(imagettfbbox); PHP_FUNCTION(imagettftext); #endif PHPAPI int phpi_get_le_gd(void); + + +#ifdef ZTS +#define GDLS_D php_gd_globals *gd_globals +#define GDG(v) (gd_globals->v) +#define GDLS_FETCH() php_gd_globals *gd_globals = ts_resource(gd_globals_id) +#else +#define GDLS_D +#define GDG(v) (gd_globals.v) +#define GDLS_FETCH() +#endif + #else #define phpext_gd_ptr NULL |