summaryrefslogtreecommitdiff
path: root/main/SAPI.c
blob: 2456662401a9a3c275e983b1d6a9caf183ae5190 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "SAPI.h"
#ifdef ZTS
#include "TSRM.h"
#endif


#ifdef ZTS
SAPI_API int sapi_globals_id;
#endif

/* A true global (no need for thread safety) */
sapi_functions_struct sapi_functions;

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
}