com php-src: Added PCRE_JIT_SUPPORT flag: ext/pcre/ph p_pcre.c sapi/cli/tests/006.phpt

From: Date: Tue, 14 Nov 2017 03:02:16 +0000
Subject: com php-src: Added PCRE_JIT_SUPPORT flag: ext/pcre/ph p_pcre.c sapi/cli/tests/006.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-100219@lists.php.net to get a copy of this message
Commit: 266f19babbd26a58d20d40f2af25482f4a1d0d90 Author: Xinchen Hui <laruence@gmail.com> Tue, 14 Nov 2017 10:50:41 +0800 Parents: 61ae64f6ab8e73f9cfd3e3b69987e699ded4d104 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=266f19babbd26a58d20d40f2af25482f4a1d0d90 Log: Added PCRE_JIT_SUPPORT flag Changed paths: M ext/pcre/php_pcre.c M sapi/cli/tests/006.phpt Diff: diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index d528105..ed31462 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -392,6 +392,12 @@ static PHP_MINIT_FUNCTION(pcre) REGISTER_LONG_CONSTANT("PCRE_VERSION_MAJOR", PCRE2_MAJOR, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("PCRE_VERSION_MINOR", PCRE2_MINOR, CONST_CS | CONST_PERSISTENT); +#ifdef HAVE_PCRE_JIT_SUPPORT + REGISTER_BOOL_CONSTANT("PCRE_JIT_SUPPORT", 1, CONST_CS | CONST_PERSISTENT); +#else + REGISTER_BOOL_CONSTANT("PCRE_JIT_SUPPORT", 0, CONST_CS | CONST_PERSISTENT); +#endif + return SUCCESS; } /* }}} */ diff --git a/sapi/cli/tests/006.phpt b/sapi/cli/tests/006.phpt index 402fc1f..72f0c5d 100644 --- a/sapi/cli/tests/006.phpt +++ b/sapi/cli/tests/006.phpt @@ -6,6 +6,9 @@ include "skipif.inc"; if (!extension_loaded("reflection") || !extension_loaded("session")) { die("skip reflection and session extensions required"); } +if (PCRE_JIT_SUPPORT == false) { + die ("skip not pcre jit support builtin"); +} ?> --INI-- date.timezone= @@ -39,7 +42,7 @@ string(%d) "Extension [ <persistent> extension #%d pcre version %s ] { } } - - Constants [18] { + - Constants [19] { Constant [ integer PREG_PATTERN_ORDER ] { 1 } Constant [ integer PREG_SET_ORDER ] { 2 } Constant [ integer PREG_OFFSET_CAPTURE ] { 256 } @@ -58,6 +61,7 @@ string(%d) "Extension [ <persistent> extension #%d pcre version %s ] { Constant [ string PCRE_VERSION ] { %s } Constant [ integer PCRE_VERSION_MAJOR ] { %d } Constant [ integer PCRE_VERSION_MINOR ] { %d } + Constant [ boolean PCRE_JIT_SUPPORT ] { %d } } - Functions {

« previous php.cvs (#100219) next »