diff options
author | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2011-12-02 11:39:21 +0000 |
---|---|---|
committer | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2011-12-02 11:39:21 +0000 |
commit | 0ca9f2fe960116f87e44542eb426f4f6dc5ec522 (patch) | |
tree | 4ed103c208086e65b3529c2fd74d34afc5891e59 /pcre_fullinfo.c | |
parent | 3d39f0a5f16085686668180e80e3008cb3fe878f (diff) | |
download | pcre-0ca9f2fe960116f87e44542eb426f4f6dc5ec522.tar.gz |
Preserve the size of JIT compiled code. Add PCRE_INFO_JITSIZE and use it for
the /M option in pcretest.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@780 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcre_fullinfo.c')
-rw-r--r-- | pcre_fullinfo.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/pcre_fullinfo.c b/pcre_fullinfo.c index 57971a8..33f0b3a 100644 --- a/pcre_fullinfo.c +++ b/pcre_fullinfo.c @@ -99,6 +99,19 @@ switch (what) case PCRE_INFO_STUDYSIZE: *((size_t *)where) = (study == NULL)? 0 : study->size; break; + + case PCRE_INFO_JITSIZE: +#ifdef SUPPORT_JIT + *((size_t *)where) = + (extra_data != NULL && + (extra_data->flags & PCRE_EXTRA_EXECUTABLE_JIT) != 0 && + extra_data->executable_jit != NULL)? + _pcre_jit_get_size(extra_data->executable_jit) : 0; +#else + *((size_t *)where) = 0; +#endif + + break; case PCRE_INFO_CAPTURECOUNT: *((int *)where) = re->top_bracket; |