summaryrefslogtreecommitdiff
path: root/ext/pcre
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2007-07-24 22:34:17 +0000
committerAntony Dovgal <tony2001@php.net>2007-07-24 22:34:17 +0000
commit0209e41563a59640474c8f719caafc1306d1cb3f (patch)
tree92cf9b443bf278684203e859fd9909881a006446 /ext/pcre
parente15f25709afd3996f7eda13709328ceb1c192f3a (diff)
downloadphp-git-0209e41563a59640474c8f719caafc1306d1cb3f.tar.gz
add PCRE_VERSION constant to ext/pcre
Diffstat (limited to 'ext/pcre')
-rw-r--r--ext/pcre/php_pcre.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index e4665e5957..c0257a748b 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -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;
}