From cd309414bcf93e54a1381a1a271d69a80d556e4b Mon Sep 17 00:00:00 2001 From: "K.Kosako" Date: Thu, 1 Feb 2018 15:59:01 +0900 Subject: [PATCH] use CalloutArgs in OP_CALLOUT_CODE part --- src/regexec.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src/regexec.c b/src/regexec.c index 4b7b384..ad74932 100644 --- a/src/regexec.c +++ b/src/regexec.c @@ -3481,23 +3481,28 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, UChar* content_start; UChar* content_end; int call_result; - OnigCalloutArgs args; + CalloutArgs args; GET_POINTER_INC(content_start, p); GET_POINTER_INC(content_end, p); if (IS_NOT_NULL(msa->mp->callout)) { - args.content = content_start; - args.content_end = content_end; - args.reg = reg; - args.str = str; - args.end = end; - args.right_range = right_range; - args.sstart = sstart; - args.s = s; + args.content = content_start; + args.content_end = content_end; + args.reg = reg; + args.str = str; + args.end = end; + args.right_range = right_range; + args.sstart = sstart; + args.s = s; args.try_in_match_counter = try_in_match_counter; + args.stk_base = stk_base; + args.stk = stk; + args.mem_start_stk = mem_start_stk; + args.mem_end_stk = mem_end_stk; - call_result = (msa->mp->callout)(&args, msa->mp->callout_user_data); + call_result = (msa->mp->callout)((OnigCalloutArgs* )&args, + msa->mp->callout_user_data); switch (call_result) { case ONIG_CALLOUT_FAIL: goto fail; -- 2.40.0