com php-src: move SG to use global tsrmls pointer: main/SAPI.c main/SAPI.h

From: Date: Wed, 15 Oct 2014 16:23:41 +0000
Subject: com php-src: move SG to use global tsrmls pointer: main/SAPI.c main/SAPI.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-82346@lists.php.net to get a copy of this message
Commit: 2bddd58d32b0eac53d98132f28de24c8688a1a54 Author: Anatol Belski <ab@php.net> Wed, 15 Oct 2014 18:23:41 +0200 Parents: aff66a94a631b5711549395bb282f61b6f6f9e49 Branches: native-tls Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2bddd58d32b0eac53d98132f28de24c8688a1a54 Log: move SG to use global tsrmls pointer Changed paths: M main/SAPI.c M main/SAPI.h Diff: diff --git a/main/SAPI.c b/main/SAPI.c index 50ea8c0..e75016f 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -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); diff --git a/main/SAPI.h b/main/SAPI.h index 7966137..c4eb86d 100644 --- a/main/SAPI.h +++ b/main/SAPI.h @@ -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)

« previous php.cvs (#82346) next »