]> granicus.if.org Git - onig/commitdiff
fix #126: Unable to compile when USE_CALLOUT is not defined
authorK.Kosako <kosako@sofnec.co.jp>
Wed, 19 Dec 2018 00:56:56 +0000 (09:56 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Wed, 19 Dec 2018 00:56:56 +0000 (09:56 +0900)
src/regexec.c
src/regparse.c

index fa618392b0270cf3ba0a401679cb7e3dfb326b19..e5fba48f35006aaa600168eaa44b8cde8e812ba0 100644 (file)
@@ -1164,8 +1164,10 @@ onig_set_retry_limit_in_match(unsigned long size)
 #endif
 }
 
+#ifdef USE_CALLOUT
 static OnigCalloutFunc DefaultProgressCallout;
 static OnigCalloutFunc DefaultRetractionCallout;
+#endif
 
 extern OnigMatchParam*
 onig_new_match_param(void)
@@ -1207,10 +1209,10 @@ onig_initialize_match_param(OnigMatchParam* mp)
 #ifdef USE_RETRY_LIMIT_IN_MATCH
   mp->retry_limit_in_match = RetryLimitInMatch;
 #endif
-  mp->progress_callout_of_contents   = DefaultProgressCallout;
-  mp->retraction_callout_of_contents = DefaultRetractionCallout;
 
 #ifdef USE_CALLOUT
+  mp->progress_callout_of_contents   = DefaultProgressCallout;
+  mp->retraction_callout_of_contents = DefaultRetractionCallout;
   mp->match_at_call_counter  = 0;
   mp->callout_user_data      = 0;
   mp->callout_data           = 0;
index 9e42e718605d6337c0f482176775b68c9c4dd81b..90c374953400a1f24dacc9e7bd3eab4c78221820 100644 (file)
@@ -512,6 +512,8 @@ onig_st_insert_strend(hash_table_type* table, const UChar* str_key,
 }
 
 
+#ifdef USE_CALLOUT
+
 typedef struct {
   OnigEncoding enc;
   int    type; /* callout type: single or not */
@@ -610,6 +612,7 @@ st_insert_callout_name_table(hash_table_type* table,
   }
   return result;
 }
+#endif
 
 #endif /* USE_ST_LIBRARY */
 
@@ -7301,7 +7304,9 @@ parse_bag(Node** np, OnigToken* tok, int term, UChar** src, UChar* end,
           }
         }
 
+#ifdef USE_CALLOUT
       end_condition:
+#endif
         CHECK_NULL_RETURN_MEMERR(condition);
 
         if (PEND) {