diff options
Diffstat (limited to 'ext/standard/reg.c')
| -rw-r--r-- | ext/standard/reg.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/standard/reg.c b/ext/standard/reg.c index b492865e6b..e7550db08d 100644 --- a/ext/standard/reg.c +++ b/ext/standard/reg.c @@ -75,10 +75,10 @@ typedef struct { static int _php_regcomp(regex_t *preg, const char *pattern, int cflags) { - REGSLS_FETCH int r = 0; int patlen = strlen(pattern); reg_cache *rc = NULL; + REGLS_FETCH(); if(_php3_hash_find(®(ht_rc), (char *) pattern, patlen, (void **) &rc) == FAILURE || rc->cflags != cflags) { @@ -114,7 +114,7 @@ static void php_reg_init_globals(php_reg_globals *reg_globals) static int php_minit_regex(INIT_FUNC_ARGS) { #ifdef ZTS - reg_globals_id = tsrm_allocate_id(sizeof(php_reg_globals), php_reg_init_globals, NULL); + reg_globals_id = ts_allocate_id(sizeof(php_reg_globals), php_reg_init_globals, NULL); #else php_reg_init_globals(®_globals); #endif @@ -124,6 +124,8 @@ static int php_minit_regex(INIT_FUNC_ARGS) static int php_mshutdown_regex(SHUTDOWN_FUNC_ARGS) { + REGLS_FETCH(); + _php3_hash_destroy(®(ht_rc)); return SUCCESS; } |
