diff options
author | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2014-10-15 15:57:49 +0000 |
---|---|---|
committer | ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069> | 2014-10-15 15:57:49 +0000 |
commit | f7c0c4728f30d5cfac01012cdd3c23c266f2d922 (patch) | |
tree | 453f0bf70f0437a5b281c43b800cb2b4a320efcf /src/pcre2_jit_misc.c | |
parent | 0e125ea76ac5d89faf344e58850319657ef997ff (diff) | |
download | pcre2-f7c0c4728f30d5cfac01012cdd3c23c266f2d922.tar.gz |
Fix several bugs concerned with different configurations.
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@113 6239d852-aaf2-0410-a92c-79f79f948069
Diffstat (limited to 'src/pcre2_jit_misc.c')
-rw-r--r-- | src/pcre2_jit_misc.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/pcre2_jit_misc.c b/src/pcre2_jit_misc.c index 6b86ff2..0614ad1 100644 --- a/src/pcre2_jit_misc.c +++ b/src/pcre2_jit_misc.c @@ -172,19 +172,13 @@ PCRE2_EXP_DEFN void PCRE2_CALL_CONVENTION pcre2_jit_stack_free(pcre2_jit_stack *jit_stack) { #ifndef SUPPORT_JIT - (void)jit_stack; - #else /* SUPPORT_JIT */ - -/* Dummy code */ - if (jit_stack != NULL) { sljit_free_stack((struct sljit_stack *)(jit_stack->stack), &jit_stack->memctl); jit_stack->memctl.free(jit_stack, jit_stack->memctl.memory_data); } - #endif /* SUPPORT_JIT */ } @@ -196,7 +190,11 @@ if (jit_stack != NULL) const char* PRIV(jit_get_target)(void) { +#ifndef SUPPORT_JIT +return "JIT is not supported"; +#else /* SUPPORT_JIT */ return sljit_get_platform_name(); +#endif /* SUPPORT_JIT */ } @@ -208,16 +206,12 @@ size_t PRIV(jit_get_size)(void *executable_jit) { #ifndef SUPPORT_JIT - (void)executable_jit; return 0; - #else /* SUPPORT_JIT */ - sljit_uw *executable_sizes = ((executable_functions *)executable_jit)->executable_sizes; SLJIT_COMPILE_ASSERT(JIT_NUMBER_OF_COMPILE_MODES == 3, number_of_compile_modes_changed); return executable_sizes[0] + executable_sizes[1] + executable_sizes[2]; - #endif } |