From 92308f6426d50dbad7f9768d78afb00f9f15e245 Mon Sep 17 00:00:00 2001 From: "K.Kosako" Date: Thu, 15 Feb 2018 16:45:45 +0900 Subject: [PATCH] fix USE_CALLOUT position --- src/regcomp.c | 2 ++ src/regparse.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/regcomp.c b/src/regcomp.c index 5355230..17fe187 100644 --- a/src/regcomp.c +++ b/src/regcomp.c @@ -5939,11 +5939,13 @@ free_regex_ext(RegexExt* ext) if (IS_NOT_NULL(ext->pattern)) xfree(ext->pattern); +#ifdef USE_CALLOUT if (IS_NOT_NULL(ext->tag_table)) onig_callout_tag_table_free(ext->tag_table); if (IS_NOT_NULL(ext->tag_list)) xfree(ext->tag_list); +#endif xfree(ext); } diff --git a/src/regparse.c b/src/regparse.c index 3518fb2..e43f0e5 100644 --- a/src/regparse.c +++ b/src/regparse.c @@ -368,6 +368,8 @@ strdup_with_null(OnigEncoding enc, UChar* s, UChar* end) return r; } +#ifdef USE_CALLOUT + static UChar* strdup_with_null1(UChar* s, UChar* end) { @@ -428,6 +430,8 @@ str_reduce_to_single_byte_code(OnigEncoding enc, UChar* s, UChar* end, return ONIG_NORMAL; } +#endif + static int save_entry(ScanEnv* env, enum SaveType type, int* id) { -- 2.40.0