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

index e4665e5957765acfc3523e2b4d8345114ea46f2e..c0257a748b65fff5aaf6f09c5ef37dd9e0b1da83 100644 (file)
@@ -66,7 +66,7 @@ typedef struct {
        int cp_offset;
 } offset_map_t;
 
-ZEND_DECLARE_MODULE_GLOBALS(pcre);
+ZEND_DECLARE_MODULE_GLOBALS(pcre)
 
 
 static void pcre_handle_exec_error(int pcre_code TSRMLS_DC) /* {{{ */
@@ -161,6 +161,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;
 }