From 9fc9e4b2cf6f71f130ad080ea8a0924ec3732b62 Mon Sep 17 00:00:00 2001 From: Andrei Zmievski Date: Tue, 16 Dec 2003 22:20:30 +0000 Subject: MFB --- ext/pcre/php_pcre.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'ext/pcre/php_pcre.c') diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 4571da5686..1c81dda56f 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -106,6 +106,15 @@ static PHP_MINIT_FUNCTION(pcre) REGISTER_LONG_CONSTANT("PREG_SPLIT_DELIM_CAPTURE", PREG_SPLIT_DELIM_CAPTURE, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("PREG_SPLIT_OFFSET_CAPTURE", PREG_SPLIT_OFFSET_CAPTURE, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("PREG_GREP_INVERT", PREG_GREP_INVERT, CONST_CS | CONST_PERSISTENT); + + pcre_malloc = php_pcre_malloc; + pcre_free = php_pcre_free; + +#ifdef NO_RECURSE + pcre_stack_malloc = php_pcre_malloc; + pcre_stack_free = php_pcre_free; +#endif + return SUCCESS; } /* }}} */ @@ -121,16 +130,6 @@ static PHP_MSHUTDOWN_FUNCTION(pcre) } /* }}} */ -/* {{{ PHP_RINIT_FUNCTION(pcre) */ -static PHP_RINIT_FUNCTION(pcre) -{ - pcre_malloc = php_pcre_malloc; - pcre_free = php_pcre_free; - - return SUCCESS; -} -/* }}} */ - /* {{{ pcre_get_compiled_regex */ PHPAPI pcre* pcre_get_compiled_regex(char *regex, pcre_extra **extra, int *preg_options TSRMLS_DC) { @@ -1520,7 +1519,7 @@ zend_module_entry pcre_module_entry = { pcre_functions, PHP_MINIT(pcre), PHP_MSHUTDOWN(pcre), - PHP_RINIT(pcre), + NULL, NULL, PHP_MINFO(pcre), NO_VERSION_YET, -- cgit v1.2.1