summaryrefslogtreecommitdiff
path: root/ext/standard/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/file.c')
-rw-r--r--ext/standard/file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/standard/file.c b/ext/standard/file.c
index 66b0f0f5ff..74ec941803 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -106,7 +106,7 @@ extern int fclose(FILE *);
#include "zend_API.h"
#ifdef ZTS
-int file_globals_id;
+TSRMG_D(php_file_globals, file_globals_id);
#else
php_file_globals file_globals;
#endif
@@ -181,7 +181,7 @@ PHP_MINIT_FUNCTION(file)
le_stream_context = zend_register_list_destructors_ex(file_context_dtor, NULL, "stream-context", module_number);
#ifdef ZTS
- ts_allocate_id(&file_globals_id, sizeof(php_file_globals), (ts_allocate_ctor) file_globals_ctor, (ts_allocate_dtor) file_globals_dtor);
+ TSRMG_ALLOCATE(file_globals_id, sizeof(php_file_globals), (ts_allocate_ctor) file_globals_ctor, (ts_allocate_dtor) file_globals_dtor);
#else
file_globals_ctor(&file_globals TSRMLS_CC);
#endif