From: Antony Dovgal Date: Tue, 24 Jul 2007 22:35:18 +0000 (+0000) Subject: [DOC] MFH: add PCRE_VERSION constant to ext/pcre X-Git-Tag: php-5.2.4RC1~53 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3afa134717dcfc2e18efb17967c4210a84fec3c3;p=php [DOC] MFH: add PCRE_VERSION constant to ext/pcre --- diff --git a/NEWS b/NEWS index 5b921263f1..5572655ab5 100644 --- a/NEWS +++ b/NEWS @@ -34,6 +34,7 @@ PHP NEWS - Added CURLOPT_PRIVATE & CURLINFO_PRIVATE constants. (Andrey A. Belashkov, Tony) - Added missing MSG_EOR and MSG_EOF constants to sockets extension. (Jani) +- Added PCRE_VERSION constant. (Tony) - Implemented FR #41884 (ReflectionClass::getDefaultProperties() does not handle static attributes). (Tony) diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 04603e9676..22e467e155 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -56,7 +56,7 @@ enum { }; -ZEND_DECLARE_MODULE_GLOBALS(pcre); +ZEND_DECLARE_MODULE_GLOBALS(pcre) static void pcre_handle_exec_error(int pcre_code TSRMLS_DC) /* {{{ */ @@ -149,6 +149,7 @@ static PHP_MINIT_FUNCTION(pcre) REGISTER_LONG_CONSTANT("PREG_BACKTRACK_LIMIT_ERROR", PHP_PCRE_BACKTRACK_LIMIT_ERROR, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("PREG_RECURSION_LIMIT_ERROR", PHP_PCRE_RECURSION_LIMIT_ERROR, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("PREG_BAD_UTF8_ERROR", PHP_PCRE_BAD_UTF8_ERROR, CONST_CS | CONST_PERSISTENT); + REGISTER_STRING_CONSTANT("PCRE_VERSION", (char *)pcre_version(), CONST_CS | CONST_PERSISTENT); return SUCCESS; }