File tree 2 files changed +12
-26
lines changed 2 files changed +12
-26
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,10 @@ const char HARDCODED_INI[] =
33
33
"max_execution_time=0\n"
34
34
"max_input_time=-1\n\0" ;
35
35
36
+ #if defined(PHP_WIN32 ) && defined(ZTS )
37
+ ZEND_TSRMLS_CACHE_DEFINE ;
38
+ #endif
39
+
36
40
static char * php_embed_read_cookies (void )
37
41
{
38
42
return NULL ;
@@ -152,12 +156,9 @@ static const zend_function_entry additional_functions[] = {
152
156
{NULL , NULL , NULL }
153
157
};
154
158
155
- EMBED_SAPI_API int php_embed_init (int argc , char * * argv PTSRMLS_DC )
159
+ EMBED_SAPI_API int php_embed_init (int argc , char * * argv )
156
160
{
157
161
zend_llist global_vars ;
158
- #ifdef ZTS
159
- void * * * tsrm_ls = NULL ;
160
- #endif
161
162
162
163
#ifdef HAVE_SIGNAL_H
163
164
#if defined(SIGPIPE ) && defined(SIG_IGN )
@@ -172,8 +173,8 @@ EMBED_SAPI_API int php_embed_init(int argc, char **argv PTSRMLS_DC)
172
173
173
174
#ifdef ZTS
174
175
tsrm_startup (1 , 1 , 0 , NULL );
175
- tsrm_ls = ts_resource (0 );
176
- * ptsrm_ls = tsrm_ls ;
176
+ ( void ) ts_resource (0 );
177
+ ZEND_TSRMLS_CACHE_UPDATE ;
177
178
#endif
178
179
179
180
sapi_startup (& php_embed_module );
Original file line number Diff line number Diff line change 27
27
#include <main/php_ini.h>
28
28
#include <zend_ini.h>
29
29
30
- #ifdef ZTS
31
- #define PTSRMLS_D void ****ptsrm_ls
32
- #define PTSRMLS_DC , PTSRMLS_D
33
- #define PTSRMLS_C &tsrm_ls
34
- #define PTSRMLS_CC , PTSRMLS_C
35
-
36
- #define PHP_EMBED_START_BLOCK (x ,y ) { \
37
- void ***tsrm_ls; \
38
- php_embed_init(x, y PTSRMLS_CC); \
39
- zend_first_try {
40
-
41
- #else
42
- #define PTSRMLS_D
43
- #define PTSRMLS_DC
44
- #define PTSRMLS_C
45
- #define PTSRMLS_CC
46
-
47
30
#define PHP_EMBED_START_BLOCK (x ,y ) { \
48
31
php_embed_init(x, y); \
49
32
zend_first_try {
50
33
51
- #endif
52
-
53
34
#define PHP_EMBED_END_BLOCK () \
54
35
} zend_catch { \
55
36
/* int exit_status = EG(exit_status); */ \
63
44
#define EMBED_SAPI_API
64
45
#endif
65
46
47
+ #ifdef ZTS
48
+ ZEND_TSRMLS_CACHE_EXTERN ;
49
+ #endif
50
+
66
51
BEGIN_EXTERN_C ()
67
- EMBED_SAPI_API int php_embed_init (int argc , char * * argv PTSRMLS_DC );
52
+ EMBED_SAPI_API int php_embed_init (int argc , char * * argv );
68
53
EMBED_SAPI_API void php_embed_shutdown (void );
69
54
extern EMBED_SAPI_API sapi_module_struct php_embed_module ;
70
55
END_EXTERN_C ()
You can’t perform that action at this time.
0 commit comments