mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
TSRMLS_FETCH() is a spent force
This commit is contained in:
parent
c00424e427
commit
1fc8220b65
2 changed files with 5 additions and 2 deletions
|
@ -166,7 +166,6 @@ TSRM_API inline void *tsrm_get_ls_cache(void);
|
|||
#define TSRM_SHUFFLE_RSRC_ID(rsrc_id) ((rsrc_id)+1)
|
||||
#define TSRM_UNSHUFFLE_RSRC_ID(rsrc_id) ((rsrc_id)-1)
|
||||
|
||||
#define TSRMLS_FETCH() void ***tsrm_ls = (void ***) ts_resource_ex(0, NULL)
|
||||
#define TSRMLS_FETCH_FROM_CTX(ctx) void ***tsrm_ls = (void ***) ctx
|
||||
#define TSRMLS_SET_CTX(ctx) ctx = (void ***) tsrm_get_ls_cache()
|
||||
#define TSRMG(id, type, element) (((type) (*((void ***) tsrm_get_ls_cache()))[TSRM_UNSHUFFLE_RSRC_ID(id)])->element)
|
||||
|
@ -181,6 +180,7 @@ TSRM_API inline void *tsrm_get_ls_cache(void);
|
|||
#define TSRMLS_DC
|
||||
#define TSRMLS_C
|
||||
#define TSRMLS_CC
|
||||
#define TSRMLS_FETCH()
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -540,7 +540,10 @@ static int php_handler(request_rec *r)
|
|||
apr_bucket *bucket;
|
||||
apr_status_t rv;
|
||||
request_rec * volatile parent_req = NULL;
|
||||
TSRMLS_FETCH();
|
||||
#ifdef ZTS
|
||||
/* initial resource fetch */
|
||||
void ***tsrm_ls = ts_resource(0);
|
||||
#endif
|
||||
|
||||
#define PHPAP_INI_OFF php_apache_ini_dtor(r, parent_req TSRMLS_CC);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue