From: K.Kosako Date: Wed, 19 Dec 2018 00:56:56 +0000 (+0900) Subject: fix #126: Unable to compile when USE_CALLOUT is not defined X-Git-Tag: v6.9.2_rc1~78 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ec6f391d9cec07e2c5fc9df415f73fd3739916f6;p=onig fix #126: Unable to compile when USE_CALLOUT is not defined --- diff --git a/src/regexec.c b/src/regexec.c index fa61839..e5fba48 100644 --- a/src/regexec.c +++ b/src/regexec.c @@ -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; diff --git a/src/regparse.c b/src/regparse.c index 9e42e71..90c3749 100644 --- a/src/regparse.c +++ b/src/regparse.c @@ -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) {