From: Marcus Boerger Date: Wed, 12 Oct 2005 22:45:15 +0000 (+0000) Subject: - Drop one cache related function which is not really neccessary X-Git-Tag: RELEASE_0_9_1~128 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=56325bc2756d1851bbc4c1f6315870f90be2f258;p=php - Drop one cache related function which is not really neccessary --- diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 8b74cf34d3..20a53efae5 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -124,9 +124,9 @@ static int pcre_clean_cache(void *data, void *arg TSRMLS_DC) } /* }}} */ -/* {{{ pcre_get_compiled_regex_cache_ex +/* {{{ pcre_get_compiled_regex_cache */ -static pcre_cache_entry* pcre_get_compiled_regex_cache_ex(char *regex, int regex_len, pcre_extra **extra, int *preg_options, int *compile_options TSRMLS_DC) +PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(char *regex, int regex_len, pcre_extra **extra, int *preg_options, int *compile_options TSRMLS_DC) { pcre *re = NULL; int coptions = 0; @@ -335,7 +335,7 @@ static pcre_cache_entry* pcre_get_compiled_regex_cache_ex(char *regex, int regex PHPAPI pcre* pcre_get_compiled_regex(char *regex, pcre_extra **extra, int *preg_options TSRMLS_DC) { int compile_options; - pcre_cache_entry * pce = pcre_get_compiled_regex_cache_ex(regex, strlen(regex), extra, preg_options, &compile_options TSRMLS_CC); + pcre_cache_entry * pce = pcre_get_compiled_regex_cache(regex, strlen(regex), extra, preg_options, &compile_options TSRMLS_CC); return pce ? pce->re : NULL; } @@ -345,23 +345,12 @@ PHPAPI pcre* pcre_get_compiled_regex(char *regex, pcre_extra **extra, int *preg_ */ PHPAPI pcre* pcre_get_compiled_regex_ex(char *regex, pcre_extra **extra, int *preg_options, int *compile_options TSRMLS_DC) { - pcre_cache_entry * pce = pcre_get_compiled_regex_cache_ex(regex, strlen(regex), extra, preg_options, compile_options TSRMLS_CC); + pcre_cache_entry * pce = pcre_get_compiled_regex_cache(regex, strlen(regex), extra, preg_options, compile_options TSRMLS_CC); return pce ? pce->re : NULL; } /* }}} */ -/* {{{ pcre_get_compiled_regex_cache - */ -PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(char *regex, int regex_len TSRMLS_DC) -{ - pcre_extra *extra; - int preg_options; - int compile_options; - return pcre_get_compiled_regex_cache_ex(regex, regex_len, &extra, &preg_options, &compile_options TSRMLS_CC); -} -/* }}} */ - /* {{{ add_offset_pair */ static inline void add_offset_pair(zval *result, char *str, int len, int offset, char *name) { diff --git a/ext/pcre/php_pcre.h b/ext/pcre/php_pcre.h index 8d1f8f62fe..cc9685d09b 100644 --- a/ext/pcre/php_pcre.h +++ b/ext/pcre/php_pcre.h @@ -60,7 +60,7 @@ typedef struct { int refcount; } pcre_cache_entry; -PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(char *regex, int regex_len TSRMLS_DC); +PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(char *regex, int regex_len, pcre_extra **extra, int *preg_options, int *compile_options TSRMLS_DC); ZEND_BEGIN_MODULE_GLOBALS(pcre) HashTable pcre_cache;