From: K.Kosako Date: Wed, 4 Apr 2018 07:08:39 +0000 (+0900) Subject: fix #ifdef USE_CALLOUT position in OnigmatchParamStruct X-Git-Tag: v6.8.2^2~27 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=87ee05a54db1d7ddf9ac576ce2978de2aa44c6a6;p=onig fix #ifdef USE_CALLOUT position in OnigmatchParamStruct --- diff --git a/src/regexec.c b/src/regexec.c index 73f526f..d73e742 100644 --- a/src/regexec.c +++ b/src/regexec.c @@ -52,9 +52,9 @@ typedef struct { struct OnigMatchParamStruct { unsigned int match_stack_limit; unsigned long retry_limit_in_match; +#ifdef USE_CALLOUT OnigCalloutFunc progress_callout_of_contents; OnigCalloutFunc retraction_callout_of_contents; -#ifdef USE_CALLOUT int match_at_call_counter; void* callout_user_data; CalloutData* callout_data; @@ -81,15 +81,23 @@ onig_set_retry_limit_in_match_of_match_param(OnigMatchParam* param, extern int onig_set_progress_callout_of_match_param(OnigMatchParam* param, OnigCalloutFunc f) { +#ifdef USE_CALLOUT param->progress_callout_of_contents = f; return ONIG_NORMAL; +#else + return ONIG_NO_SUPPORT_CONFIG; +#endif } extern int onig_set_retraction_callout_of_match_param(OnigMatchParam* param, OnigCalloutFunc f) { +#ifdef USE_CALLOUT param->retraction_callout_of_contents = f; return ONIG_NORMAL; +#else + return ONIG_NO_SUPPORT_CONFIG; +#endif }