summaryrefslogtreecommitdiff
path: root/pcre.h.in
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2011-08-22 14:56:43 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2011-08-22 14:56:43 +0000
commitb205b9285d0feca53c32d7258fc02ecb926ca16b (patch)
tree0baa3d921b2668e097880081ad36a993b407d663 /pcre.h.in
parentcdb46f2d9639ad98acf70b88ee20e5847b185f5e (diff)
downloadpcre-b205b9285d0feca53c32d7258fc02ecb926ca16b.tar.gz
Commit changes for JIT support
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@666 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcre.h.in')
-rw-r--r--pcre.h.in23
1 files changed, 23 insertions, 0 deletions
diff --git a/pcre.h.in b/pcre.h.in
index fe37f75..ba76bf6 100644
--- a/pcre.h.in
+++ b/pcre.h.in
@@ -209,6 +209,7 @@ compile-time only bits for runtime options, or vice versa. */
#define PCRE_INFO_JCHANGED 13
#define PCRE_INFO_HASCRORLF 14
#define PCRE_INFO_MINLENGTH 15
+#define PCRE_INFO_JIT 16
/* Request types for pcre_config(). Do not re-arrange, in order to remain
compatible. */
@@ -222,6 +223,12 @@ compatible. */
#define PCRE_CONFIG_UNICODE_PROPERTIES 6
#define PCRE_CONFIG_MATCH_LIMIT_RECURSION 7
#define PCRE_CONFIG_BSR 8
+#define PCRE_CONFIG_JIT 9
+
+/* Request types for pcre_study(). Do not re-arrange, in order to remain
+compatible. */
+
+#define PCRE_STUDY_JIT_COMPILE 0x0001
/* Bit flags for the pcre_extra structure. Do not re-arrange or redefine
these bits, just add new ones on the end, in order to remain compatible. */
@@ -232,12 +239,16 @@ these bits, just add new ones on the end, in order to remain compatible. */
#define PCRE_EXTRA_TABLES 0x0008
#define PCRE_EXTRA_MATCH_LIMIT_RECURSION 0x0010
#define PCRE_EXTRA_MARK 0x0020
+#define PCRE_EXTRA_EXECUTABLE_JIT 0x0040
/* Types */
struct real_pcre; /* declaration; the definition is private */
typedef struct real_pcre pcre;
+struct real_pcre_jit_stack; /* declaration; the definition is private */
+typedef struct real_pcre_jit_stack pcre_jit_stack;
+
/* When PCRE is compiled as a C++ library, the subject pointer type can be
replaced with a custom type. For conventional use, the public interface is a
const char *. */
@@ -258,6 +269,7 @@ typedef struct pcre_extra {
const unsigned char *tables; /* Pointer to character tables */
unsigned long int match_limit_recursion; /* Max recursive calls to match() */
unsigned char **mark; /* For passing back a mark pointer */
+ void *executable_jit; /* Contains a pointer to a compiled jit code */
} pcre_extra;
/* The structure for passing out data via the pcre_callout_function. We use a
@@ -305,6 +317,10 @@ PCRE_EXP_DECL void pcre_stack_free(void *);
PCRE_EXP_DECL int pcre_callout(pcre_callout_block *);
#endif /* VPCOMPAT */
+/* User defined callback which provides a stack just before the match starts. */
+
+typedef pcre_jit_stack *(*pcre_jit_callback)(void *);
+
/* Exported PCRE functions */
PCRE_EXP_DECL pcre *pcre_compile(const char *, int, const char **, int *,
@@ -337,8 +353,15 @@ PCRE_EXP_DECL int pcre_info(const pcre *, int *, int *);
PCRE_EXP_DECL const unsigned char *pcre_maketables(void);
PCRE_EXP_DECL int pcre_refcount(pcre *, int);
PCRE_EXP_DECL pcre_extra *pcre_study(const pcre *, int, const char **);
+PCRE_EXP_DECL void pcre_free_study(pcre_extra *);
PCRE_EXP_DECL const char *pcre_version(void);
+/* JIT compiler related functions. */
+
+PCRE_EXP_DECL pcre_jit_stack *pcre_jit_stack_alloc(int, int);
+PCRE_EXP_DECL void pcre_jit_stack_free(pcre_jit_stack *);
+PCRE_EXP_DECL void pcre_assign_jit_callback(pcre_extra *, pcre_jit_callback, void *);
+
#ifdef __cplusplus
} /* extern "C" */
#endif