summaryrefslogtreecommitdiff
path: root/pcre_jit_test.c
diff options
context:
space:
mode:
authorzherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15>2012-01-05 19:18:12 +0000
committerzherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15>2012-01-05 19:18:12 +0000
commitabe09755a8ae5d60c229d36b442aebb4961537b7 (patch)
treeb15d419dc471fd15a92eb1f42df5980032f37461 /pcre_jit_test.c
parent1f316699980bbdf66470a8edd1ab47c1df1a9c1a (diff)
downloadpcre-abe09755a8ae5d60c229d36b442aebb4961537b7.tar.gz
Add pcre16 prefix to 16 bit structs
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@852 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcre_jit_test.c')
-rw-r--r--pcre_jit_test.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/pcre_jit_test.c b/pcre_jit_test.c
index c3812fc..f9e9991 100644
--- a/pcre_jit_test.c
+++ b/pcre_jit_test.c
@@ -672,13 +672,14 @@ static const unsigned char *tables(int mode)
/* The purpose of this function to allow valgrind
for reporting invalid reads and writes. */
static unsigned char *tables_copy;
- pcre *regex;
const char *errorptr;
int erroroffset;
const unsigned char *default_tables;
#ifdef SUPPORT_PCRE8
+ pcre *regex;
char null_str[1] = { 0 };
#else
+ pcre16 *regex;
PCRE_SCHAR16 null_str[1] = { 0 };
#endif
@@ -720,11 +721,16 @@ static const unsigned char *tables(int mode)
return tables_copy;
}
-static pcre_jit_stack* callback(void *arg)
+static pcre_jit_stack* callback8(void *arg)
{
return (pcre_jit_stack *)arg;
}
+static pcre16_jit_stack* callback16(void *arg)
+{
+ return (pcre16_jit_stack *)arg;
+}
+
#ifdef SUPPORT_PCRE8
static void setstack8(pcre_extra *extra)
{
@@ -740,14 +746,14 @@ static void setstack8(pcre_extra *extra)
if (!stack)
stack = pcre_jit_stack_alloc(1, 1024 * 1024);
/* Extra can be NULL. */
- pcre_assign_jit_stack(extra, callback, stack);
+ pcre_assign_jit_stack(extra, callback8, stack);
}
#endif /* SUPPORT_PCRE8 */
#ifdef SUPPORT_PCRE16
static void setstack16(pcre16_extra *extra)
{
- static pcre_jit_stack *stack;
+ static pcre16_jit_stack *stack;
if (!extra) {
if (stack)
@@ -759,7 +765,7 @@ static void setstack16(pcre16_extra *extra)
if (!stack)
stack = pcre16_jit_stack_alloc(1, 1024 * 1024);
/* Extra can be NULL. */
- pcre16_assign_jit_stack(extra, callback, stack);
+ pcre16_assign_jit_stack(extra, callback16, stack);
}
#endif /* SUPPORT_PCRE8 */
@@ -865,7 +871,7 @@ static int regression_tests(void)
int disabled_flags8 = 0;
#endif
#ifdef SUPPORT_PCRE16
- pcre *re16;
+ pcre16 *re16;
pcre16_extra *extra16;
int ovector16_1[32];
int ovector16_2[32];