From 3afa134717dcfc2e18efb17967c4210a84fec3c3 Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Tue, 24 Jul 2007 22:35:18 +0000 Subject: [PATCH] [DOC] MFH: add PCRE_VERSION constant to ext/pcre --- NEWS | 1 + ext/pcre/php_pcre.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) 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; } -- 2.40.0