summaryrefslogtreecommitdiff
path: root/main/SAPI.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/SAPI.c')
-rw-r--r--main/SAPI.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/main/SAPI.c b/main/SAPI.c
index d04c051727..2456662401 100644
--- a/main/SAPI.c
+++ b/main/SAPI.c
@@ -1,16 +1,20 @@
#include "SAPI.h"
+#ifdef ZTS
#include "TSRM.h"
+#endif
#ifdef ZTS
-int sapi_globals_id;
+SAPI_API int sapi_globals_id;
#endif
+/* A true global (no need for thread safety) */
+sapi_functions_struct sapi_functions;
-void sapi_startup()
+void sapi_startup(sapi_functions_struct *sf)
{
+ sapi_functions = *sf;
#ifdef ZTS
sapi_globals_id = ts_allocate_id(sizeof(sapi_globals_struct), NULL, NULL);
#endif
-}
-
+} \ No newline at end of file