]> granicus.if.org Git - php/commitdiff
[DOC] MFH: add PCRE_VERSION constant to ext/pcre
authorAntony Dovgal <tony2001@php.net>
Tue, 24 Jul 2007 22:35:18 +0000 (22:35 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 24 Jul 2007 22:35:18 +0000 (22:35 +0000)
NEWS
ext/pcre/php_pcre.c

diff --git a/NEWS b/NEWS
index 5b921263f1ee3c88a68f829aaf92fdf5892febe1..5572655ab5e047e1408701d4c88eb9aa908d1933 100644 (file)
--- 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)
index 04603e96767a71162a1bf4e061c73d31d5e92053..22e467e1552e214778a074e8e3782bcb889e9190 100644 (file)
@@ -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;
 }