mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
move SG to use global tsrmls pointer
This commit is contained in:
@@ -64,6 +64,9 @@ static void _type_dtor(zval *zv)
|
||||
|
||||
static void sapi_globals_ctor(sapi_globals_struct *sapi_globals TSRMLS_DC)
|
||||
{
|
||||
#ifdef ZTS
|
||||
ZEND_TSRMLS_CACHE_UPDATE;
|
||||
#endif
|
||||
memset(sapi_globals, 0, sizeof(*sapi_globals));
|
||||
zend_hash_init_ex(&sapi_globals->known_post_content_types, 8, NULL, _type_dtor, 1, 0);
|
||||
php_setup_sapi_content_types(TSRMLS_C);
|
||||
|
||||
@@ -142,7 +142,7 @@ typedef struct _sapi_globals_struct {
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
#ifdef ZTS
|
||||
# define SG(v) TSRMG(sapi_globals_id, sapi_globals_struct *, v)
|
||||
# define SG(v) ZEND_TSRMG(sapi_globals_id, sapi_globals_struct *, v)
|
||||
SAPI_API extern int sapi_globals_id;
|
||||
#else
|
||||
# define SG(v) (sapi_globals.v)
|
||||
|
||||
Reference in New Issue
Block a user