From 28ed74c131964591156133432db81008624abd51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Wed, 10 May 2017 18:13:11 +0000 Subject: [PATCH] pcrejit: mention in what versions pcre_jit_exec() exists Before the "JIT native interface" change on 2012-10-29 (svn rev 1187) you could use the JIT but not use the pcre_jit_exec() function. I found this out the hard way when trying to make git.git's JIT use portable to older versions, update the docs to mention this. --- doc/pcrejit.3 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/pcrejit.3 b/doc/pcrejit.3 index 341403f..5829ad1 100644 --- a/doc/pcrejit.3 +++ b/doc/pcrejit.3 @@ -56,7 +56,9 @@ API that is JIT-specific. If your program may sometimes be linked with versions of PCRE that are older than 8.20, but you want to use JIT when it is available, you can test the values of PCRE_MAJOR and PCRE_MINOR, or the existence of a JIT macro such -as PCRE_CONFIG_JIT, for compile-time control of your code. +as PCRE_CONFIG_JIT, for compile-time control of your code. Also beware that the +\fBpcre_jit_exec()\fP function was not available before 8.32. See "JIT +FAST PATH API" section below for details. . . .SH "SIMPLE USE OF JIT" @@ -404,6 +406,12 @@ fast path, and if invalid data is passed, the result is undefined. .P Bypassing the sanity checks and the \fBpcre_exec()\fP wrapping can give speedups of more than 10%. +.P +The \fBpcre_jit_exec()\fP function is not available in versions of +PCRE before 8.32 (released in November 2012). If you need to support +versions that old you need to either use the slower \fBpcre_exec()\fP, +or switch between the two codepaths with by checking the values of +PCRE_MAJOR and PCRE_MINOR. . . .SH "SEE ALSO"