]> granicus.if.org Git - onig/commitdiff
fix USE_CALLOUT position
authorK.Kosako <kosako@sofnec.co.jp>
Thu, 15 Feb 2018 07:45:45 +0000 (16:45 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Thu, 15 Feb 2018 07:45:45 +0000 (16:45 +0900)
src/regcomp.c
src/regparse.c

index 5355230bf523696edc366047287051906bc999a9..17fe187ae29d5b7aed2ac6bd2d3ddda13f3d688d 100644 (file)
@@ -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);
   }
index 3518fb2bdc2fd844888a59c3593ad196fe9c2376..e43f0e5b6fdc8763638c1fa76ac6b6cdb2ab7e05 100644 (file)
@@ -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)
 {