Skip to content

Commit

Permalink
TSRMLS_FETCH() is a spent force
Browse files Browse the repository at this point in the history
  • Loading branch information
weltling committed Oct 15, 2014
1 parent c00424e commit 1fc8220
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion TSRM/TSRM.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
}
Expand Down
5 changes: 4 additions & 1 deletion sapi/apache2handler/sapi_apache2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 1fc8220

Please sign in to comment.