summaryrefslogtreecommitdiff
path: root/src/pcre2_context.c
diff options
context:
space:
mode:
authorph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>2014-07-04 16:26:09 +0000
committerph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>2014-07-04 16:26:09 +0000
commit9e3d44452fdc74a4a6a22a35a889050dd9b2c59b (patch)
tree5702bbcc37d61480d74f55d484213a4257697829 /src/pcre2_context.c
parent80d7f11a1c1523dd5e488c97d000cfd6c3d1a3e8 (diff)
downloadpcre2-9e3d44452fdc74a4a6a22a35a889050dd9b2c59b.tar.gz
Compiling with --disalbe-stack-for-recursion is working. Introduce PCRE2_OFFSET
for offset values. git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@26 6239d852-aaf2-0410-a92c-79f79f948069
Diffstat (limited to 'src/pcre2_context.c')
-rw-r--r--src/pcre2_context.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/pcre2_context.c b/src/pcre2_context.c
index d772e8f..20a9df1 100644
--- a/src/pcre2_context.c
+++ b/src/pcre2_context.c
@@ -168,8 +168,7 @@ if (defmemctl)
mcontext->memctl.memory_data = NULL;
}
#ifdef NO_RECURSE
-mcontext->stack_malloc = mcontext->malloc;
-mcontext->stack_free = mcontext->free;
+mcontext->stack_memctl = mcontext->memctl;
#endif
mcontext->callout = NULL;
mcontext->callout_data = NULL;
@@ -392,16 +391,18 @@ return 1;
PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
pcre2_set_recursion_memory_management(pcre2_match_context *mcontext,
- void *(*mymalloc)(size_t, void *),
- void (*myfree)(void *, void *))
+ void *(*mymalloc)(size_t, void *), void (*myfree)(void *, void *),
+ void *mydata)
{
-#ifdef NORECURSE
-mcontext->stack_malloc = mymalloc;
-mcontext->stack_free = myfree;
+#ifdef NO_RECURSE
+mcontext->stack_memctl.malloc = mymalloc;
+mcontext->stack_memctl.free = myfree;
+mcontext->stack_memctl.memory_data = mydata;
#else
(void)mcontext;
(void)mymalloc;
(void)myfree;
+(void)mydata;
#endif
return 1;
}