summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/date/php_date.h1
-rw-r--r--ext/opcache/ZendAccelerator.c4
-rw-r--r--ext/opcache/ZendAccelerator.h2
-rw-r--r--ext/pdo/pdo_sql_parser.c22
-rw-r--r--ext/spl/php_spl.h2
-rw-r--r--ext/standard/basic_functions.c8
-rw-r--r--ext/standard/basic_functions.h2
-rw-r--r--ext/standard/browscap.c3
-rw-r--r--ext/standard/dir.c4
-rw-r--r--ext/standard/file.c4
-rw-r--r--ext/standard/file.h2
-rw-r--r--ext/standard/info.c4
-rw-r--r--ext/standard/lcg.c4
13 files changed, 19 insertions, 43 deletions
diff --git a/ext/date/php_date.h b/ext/date/php_date.h
index a49a4c26b0..aa46aa1b6c 100644
--- a/ext/date/php_date.h
+++ b/ext/date/php_date.h
@@ -197,7 +197,6 @@ ZEND_BEGIN_MODULE_GLOBALS(date)
ZEND_END_MODULE_GLOBALS(date)
#ifdef ZTS
-TSRMG_DH(zend_date_globals, date_globals_id);
#define DATEG(v) TSRMG(date_globals_id, zend_date_globals *, v)
#else
#define DATEG(v) (date_globals.v)
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
index f280305d6c..b5c20f91e4 100644
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@ -89,7 +89,7 @@ ZEND_EXTENSION();
#ifndef ZTS
zend_accel_globals accel_globals;
#else
-TSRMG_D(zend_accel_globals, accel_globals_id);
+int accel_globals_id;
#endif
/* Points to the structure shared across all PHP processes */
@@ -2270,7 +2270,7 @@ static int accel_startup(zend_extension *extension)
TSRMLS_FETCH();
#ifdef ZTS
- TSRMG_ALLOCATE(accel_globals_id, sizeof(zend_accel_globals), (ts_allocate_ctor) accel_globals_ctor, (ts_allocate_dtor) accel_globals_dtor);
+ accel_globals_id = ts_allocate_id(&accel_globals_id, sizeof(zend_accel_globals), (ts_allocate_ctor) accel_globals_ctor, (ts_allocate_dtor) accel_globals_dtor);
#else
accel_globals_ctor(&accel_globals);
#endif
diff --git a/ext/opcache/ZendAccelerator.h b/ext/opcache/ZendAccelerator.h
index c4bc8f82cd..c3c7285c48 100644
--- a/ext/opcache/ZendAccelerator.h
+++ b/ext/opcache/ZendAccelerator.h
@@ -282,7 +282,7 @@ extern zend_accel_shared_globals *accel_shared_globals;
#ifdef ZTS
# define ZCG(v) TSRMG(accel_globals_id, zend_accel_globals *, v)
-TSRMG_DH(zend_accel_globals, accel_globals_id);
+extern int accel_globals_id;
#else
# define ZCG(v) (accel_globals.v)
extern zend_accel_globals accel_globals;
diff --git a/ext/pdo/pdo_sql_parser.c b/ext/pdo/pdo_sql_parser.c
index 90da947179..9dd7305723 100644
--- a/ext/pdo/pdo_sql_parser.c
+++ b/ext/pdo/pdo_sql_parser.c
@@ -1,5 +1,4 @@
/* Generated by re2c 0.13.5 */
-#line 1 "ext/pdo/pdo_sql_parser.re"
/*
+----------------------------------------------------------------------+
| PHP Version 7 |
@@ -47,11 +46,9 @@ static int scan(Scanner *s)
char *cursor = s->cur;
s->tok = cursor;
- #line 55 "ext/pdo/pdo_sql_parser.re"
-#line 55 "ext/pdo/pdo_sql_parser.c"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
@@ -79,9 +76,7 @@ yy3:
yych = *(YYMARKER = ++YYCURSOR);
if (yych >= 0x01) goto yy43;
yy4:
-#line 63 "ext/pdo/pdo_sql_parser.re"
{ SKIP_ONE(PDO_PARSER_TEXT); }
-#line 85 "ext/pdo/pdo_sql_parser.c"
yy5:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
@@ -163,9 +158,7 @@ yy7:
default: goto yy8;
}
yy8:
-#line 62 "ext/pdo/pdo_sql_parser.re"
{ RET(PDO_PARSER_BIND_POS); }
-#line 169 "ext/pdo/pdo_sql_parser.c"
yy9:
++YYCURSOR;
switch ((yych = *YYCURSOR)) {
@@ -173,9 +166,7 @@ yy9:
default: goto yy13;
}
yy10:
-#line 65 "ext/pdo/pdo_sql_parser.re"
{ RET(PDO_PARSER_TEXT); }
-#line 179 "ext/pdo/pdo_sql_parser.c"
yy11:
yych = *++YYCURSOR;
switch (yych) {
@@ -210,9 +201,7 @@ yy14:
default: goto yy14;
}
yy16:
-#line 64 "ext/pdo/pdo_sql_parser.re"
{ RET(PDO_PARSER_TEXT); }
-#line 216 "ext/pdo/pdo_sql_parser.c"
yy17:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
@@ -290,9 +279,7 @@ yy29:
default: goto yy31;
}
yy31:
-#line 60 "ext/pdo/pdo_sql_parser.re"
{ RET(PDO_PARSER_TEXT); }
-#line 296 "ext/pdo/pdo_sql_parser.c"
yy32:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
@@ -364,9 +351,7 @@ yy32:
default: goto yy34;
}
yy34:
-#line 61 "ext/pdo/pdo_sql_parser.re"
{ RET(PDO_PARSER_BIND); }
-#line 370 "ext/pdo/pdo_sql_parser.c"
yy35:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
@@ -394,9 +379,7 @@ yy39:
goto yy37;
yy40:
++YYCURSOR;
-#line 59 "ext/pdo/pdo_sql_parser.re"
{ RET(PDO_PARSER_TEXT); }
-#line 400 "ext/pdo/pdo_sql_parser.c"
yy42:
++YYCURSOR;
if (YYLIMIT <= YYCURSOR) YYFILL(1);
@@ -416,20 +399,17 @@ yy44:
goto yy42;
yy45:
++YYCURSOR;
-#line 58 "ext/pdo/pdo_sql_parser.re"
{ RET(PDO_PARSER_TEXT); }
-#line 422 "ext/pdo/pdo_sql_parser.c"
}
-#line 66 "ext/pdo/pdo_sql_parser.re"
}
struct placeholder {
char *pos;
+ char *quoted; /* quoted value */
int len;
int bindno;
int qlen; /* quoted length of value */
- char *quoted; /* quoted value */
int freeq;
struct placeholder *next;
};
diff --git a/ext/spl/php_spl.h b/ext/spl/php_spl.h
index cd8ea05f39..534a03885e 100644
--- a/ext/spl/php_spl.h
+++ b/ext/spl/php_spl.h
@@ -68,7 +68,7 @@ ZEND_END_MODULE_GLOBALS(spl)
#ifdef ZTS
# define SPL_G(v) TSRMG(spl_globals_id, zend_spl_globals *, v)
-TSRMG_DH(zend_spl_globals, sapi_globals_id);
+extern int spl_globals_id;
#else
# define SPL_G(v) (spl_globals.v)
extern zend_spl_globals spl_globals;
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 6c652cdd38..36611b812b 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -108,7 +108,7 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
#include "php_ticks.h"
#ifdef ZTS
-TSRMG_D(php_basic_globals, basic_globals_id);
+PHPAPI int basic_globals_id;
#else
PHPAPI php_basic_globals basic_globals;
#endif
@@ -3375,7 +3375,7 @@ zend_module_entry basic_functions_module = { /* {{{ */
PHP_RSHUTDOWN(basic), /* request shutdown */
PHP_MINFO(basic), /* extension info */
PHP_VERSION, /* extension version */
- STANDARD_MODULE_PROPERTIES_EX
+ STANDARD_MODULE_PROPERTIES
};
/* }}} */
@@ -3530,9 +3530,9 @@ PHPAPI double php_get_inf(void) /* {{{ */
PHP_MINIT_FUNCTION(basic) /* {{{ */
{
#ifdef ZTS
- TSRMG_ALLOCATE(basic_globals_id, sizeof(php_basic_globals), (ts_allocate_ctor) basic_globals_ctor, (ts_allocate_dtor) basic_globals_dtor);
+ ts_allocate_id(&basic_globals_id, sizeof(php_basic_globals), (ts_allocate_ctor) basic_globals_ctor, (ts_allocate_dtor) basic_globals_dtor);
#ifdef PHP_WIN32
- TSRMG_ALLOCATE(php_win32_core_globals_id, sizeof(php_win32_core_globals), (ts_allocate_ctor)php_win32_core_globals_ctor, (ts_allocate_dtor)php_win32_core_globals_dtor);
+ ts_allocate_id(&php_win32_core_globals_id, sizeof(php_win32_core_globals), (ts_allocate_ctor)php_win32_core_globals_ctor, (ts_allocate_dtor)php_win32_core_globals_dtor );
#endif
#else
basic_globals_ctor(&basic_globals TSRMLS_CC);
diff --git a/ext/standard/basic_functions.h b/ext/standard/basic_functions.h
index a6d8496d75..eaac7a1609 100644
--- a/ext/standard/basic_functions.h
+++ b/ext/standard/basic_functions.h
@@ -232,7 +232,7 @@ typedef struct _php_basic_globals {
#ifdef ZTS
#define BG(v) TSRMG(basic_globals_id, php_basic_globals *, v)
-TSRMG_DH(php_basic_globals, basic_globals_id);
+PHPAPI extern int basic_globals_id;
#else
#define BG(v) (basic_globals.v)
PHPAPI extern php_basic_globals basic_globals;
diff --git a/ext/standard/browscap.c b/ext/standard/browscap.c
index fa2740e0ec..a591a67d44 100644
--- a/ext/standard/browscap.c
+++ b/ext/standard/browscap.c
@@ -311,7 +311,8 @@ PHP_MINIT_FUNCTION(browscap) /* {{{ */
char *browscap = INI_STR("browscap");
#ifdef ZTS
- TSRMG_ALLOCATE(browscap_globals_id, sizeof(browser_data), (ts_allocate_ctor) browscap_globals_ctor, NULL);
+ ts_allocate_id(&browscap_globals_id, sizeof(browser_data),
+ browscap_globals_ctor, NULL);
#endif
/* ctor call not really needed for non-ZTS */
diff --git a/ext/standard/dir.c b/ext/standard/dir.c
index 6d62a5f9ef..7b4ab1cd3e 100644
--- a/ext/standard/dir.c
+++ b/ext/standard/dir.c
@@ -57,7 +57,7 @@ typedef struct {
#ifdef ZTS
#define DIRG(v) TSRMG(dir_globals_id, php_dir_globals *, v)
-TSRMG_D(php_dir_globals, dir_globals_id);
+int dir_globals_id;
#else
#define DIRG(v) (dir_globals.v)
php_dir_globals dir_globals;
@@ -137,7 +137,7 @@ PHP_MINIT_FUNCTION(dir)
dir_class_entry_ptr = zend_register_internal_class(&dir_class_entry TSRMLS_CC);
#ifdef ZTS
- TSRMG_ALLOCATE(dir_globals_id, sizeof(php_dir_globals), NULL, NULL);
+ ts_allocate_id(&dir_globals_id, sizeof(php_dir_globals), NULL, NULL);
#endif
dirsep_str[0] = DEFAULT_SLASH;
diff --git a/ext/standard/file.c b/ext/standard/file.c
index 4147604e03..446da20fb3 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
-TSRMG_D(php_file_globals, file_globals_id);
+int 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
- TSRMG_ALLOCATE(file_globals_id, sizeof(php_file_globals), (ts_allocate_ctor) file_globals_ctor, (ts_allocate_dtor) file_globals_dtor);
+ ts_allocate_id(&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
diff --git a/ext/standard/file.h b/ext/standard/file.h
index 1b9c90478d..fdace75d3b 100644
--- a/ext/standard/file.h
+++ b/ext/standard/file.h
@@ -131,7 +131,7 @@ typedef struct {
#ifdef ZTS
#define FG(v) TSRMG(file_globals_id, php_file_globals *, v)
-TSRMG_DH(php_file_globals, file_globals_id);
+extern PHPAPI int file_globals_id;
#else
#define FG(v) (file_globals.v)
extern PHPAPI php_file_globals file_globals;
diff --git a/ext/standard/info.c b/ext/standard/info.c
index 932a8f4226..bc0ddddcc0 100644
--- a/ext/standard/info.c
+++ b/ext/standard/info.c
@@ -778,11 +778,7 @@ PHPAPI void php_print_info(int flag TSRMLS_DC)
#endif
#ifdef ZTS
-# ifdef USE___THREAD
- php_info_print_table_row(2, "Thread Safety", "enabled, native TLS" );
-# else
php_info_print_table_row(2, "Thread Safety", "enabled" );
-# endif
#else
php_info_print_table_row(2, "Thread Safety", "disabled" );
#endif
diff --git a/ext/standard/lcg.c b/ext/standard/lcg.c
index 4cb4064927..8bfa05555b 100644
--- a/ext/standard/lcg.c
+++ b/ext/standard/lcg.c
@@ -32,7 +32,7 @@
#endif
#ifdef ZTS
-TSRMG_D(php_lcg_globals, lcg_globals_id);
+int lcg_globals_id;
#else
static php_lcg_globals lcg_globals;
#endif
@@ -106,7 +106,7 @@ static void lcg_init_globals(php_lcg_globals *lcg_globals_p TSRMLS_DC) /* {{{ */
PHP_MINIT_FUNCTION(lcg) /* {{{ */
{
#ifdef ZTS
- TSRMG_ALLOCATE(lcg_globals_id, sizeof(php_lcg_globals), (ts_allocate_ctor) lcg_init_globals, NULL);
+ ts_allocate_id(&lcg_globals_id, sizeof(php_lcg_globals), (ts_allocate_ctor) lcg_init_globals, NULL);
#else
lcg_init_globals(&lcg_globals);
#endif