summaryrefslogtreecommitdiff
path: root/main/SAPI.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/SAPI.c')
-rw-r--r--main/SAPI.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/main/SAPI.c b/main/SAPI.c
index 6a272d4c64..05b7bbbbec 100644
--- a/main/SAPI.c
+++ b/main/SAPI.c
@@ -45,6 +45,7 @@
#ifdef ZTS
SAPI_API int sapi_globals_id;
+SAPI_API size_t sapi_globals_offset;
#else
sapi_globals_struct sapi_globals;
#endif
@@ -76,7 +77,7 @@ SAPI_API void sapi_startup(sapi_module_struct *sf)
sapi_module = *sf;
#ifdef ZTS
- ts_allocate_id(&sapi_globals_id, sizeof(sapi_globals_struct), (ts_allocate_ctor) sapi_globals_ctor, (ts_allocate_dtor) sapi_globals_dtor);
+ ts_allocate_fast_id(&sapi_globals_id, &sapi_globals_offset, sizeof(sapi_globals_struct), (ts_allocate_ctor) sapi_globals_ctor, (ts_allocate_dtor) sapi_globals_dtor);
# ifdef PHP_WIN32
_configthreadlocale(_ENABLE_PER_THREAD_LOCALE);
# endif