From 7ef4cdf47103c0eb348b351ba5da7c1cfc93dd58 Mon Sep 17 00:00:00 2001 From: Kalle Sommer Nielsen Date: Tue, 13 Apr 2010 11:02:15 +0000 Subject: Remove a couple TSRMLS_FETCH() calls around ext/main/sapi --- ext/ereg/ereg.c | 9 ++++----- ext/ereg/php_ereg.h | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'ext/ereg') diff --git a/ext/ereg/ereg.c b/ext/ereg/ereg.c index fbdd6b1714..e1726cbeef 100644 --- a/ext/ereg/ereg.c +++ b/ext/ereg/ereg.c @@ -124,12 +124,11 @@ static int ereg_clean_cache(void *data, void *arg TSRMLS_DC) /* {{{ _php_regcomp */ -static int _php_regcomp(regex_t *preg, const char *pattern, int cflags) +static int _php_regcomp(regex_t *preg, const char *pattern, int cflags TSRMLS_DC) { int r = 0; int patlen = strlen(pattern); reg_cache *rc = NULL; - TSRMLS_FETCH(); if (zend_hash_num_elements(&EREG(ht_rc)) >= EREG_CACHE_SIZE) { /* easier than dealing with overflow as it happens */ @@ -201,7 +200,7 @@ static void _free_ereg_cache(reg_cache *rc) #undef regfree #define regfree(a); #undef regcomp -#define regcomp(a, b, c) _php_regcomp(a, b, c) +#define regcomp(a, b, c) _php_regcomp(a, b, c TSRMLS_CC) static void php_ereg_init_globals(zend_ereg_globals *ereg_globals TSRMLS_DC) { @@ -400,7 +399,7 @@ PHP_FUNCTION(eregi) /* {{{ php_ereg_replace * this is the meat and potatoes of regex replacement! */ -PHPAPI char *php_ereg_replace(const char *pattern, const char *replace, const char *string, int icase, int extended) +PHPAPI char *php_ereg_replace(const char *pattern, const char *replace, const char *string, int icase, int extended TSRMLS_DC) { regex_t re; regmatch_t *subs; @@ -593,7 +592,7 @@ static void php_do_ereg_replace(INTERNAL_FUNCTION_PARAMETERS, int icase) } /* do the actual work */ - ret = php_ereg_replace(pattern, replace, string, icase, 1); + ret = php_ereg_replace(pattern, replace, string, icase, 1 TSRMLS_CC); if (ret == (char *) -1) { RETVAL_FALSE; } else { diff --git a/ext/ereg/php_ereg.h b/ext/ereg/php_ereg.h index b25001e0cd..ad7d546338 100644 --- a/ext/ereg/php_ereg.h +++ b/ext/ereg/php_ereg.h @@ -27,7 +27,7 @@ extern zend_module_entry ereg_module_entry; #define phpext_ereg_ptr &ereg_module_entry -PHPAPI char *php_ereg_replace(const char *pattern, const char *replace, const char *string, int icase, int extended); +PHPAPI char *php_ereg_replace(const char *pattern, const char *replace, const char *string, int icase, int extended TSRMLS_DC); PHP_FUNCTION(ereg); PHP_FUNCTION(eregi); -- cgit v1.2.1