From 549fab4527906e8bfeeeaa3471357e2ef1db84e0 Mon Sep 17 00:00:00 2001 From: "K.Kosako" Date: Thu, 15 Mar 2018 15:35:52 +0900 Subject: [PATCH] remove ONIG_CALLOUT_MISMATCH and ONIG_CALLOUT_ABORT --- src/oniguruma.h | 4 +--- src/regexec.c | 7 +------ 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/oniguruma.h b/src/oniguruma.h index bb4671b..b2f0b74 100644 --- a/src/oniguruma.h +++ b/src/oniguruma.h @@ -759,9 +759,7 @@ typedef int (*OnigCalloutFunc)(OnigCalloutArgs* args, void* user_data); /* callout function return values (less than -1: error code) */ typedef enum { ONIG_CALLOUT_FAIL = 1, - ONIG_CALLOUT_SUCCESS = 0, - ONIG_CALLOUT_MISMATCH = ONIG_MISMATCH, /* == -1 */ - ONIG_CALLOUT_ABORT = ONIG_ABORT /* == -3 */ + ONIG_CALLOUT_SUCCESS = 0 } OnigCalloutResult; typedef enum { diff --git a/src/regexec.c b/src/regexec.c index 541d2ea..35e3698 100644 --- a/src/regexec.c +++ b/src/regexec.c @@ -888,8 +888,6 @@ onig_region_copy(OnigRegion* to, OnigRegion* from) case ONIG_CALLOUT_FAIL:\ case ONIG_CALLOUT_SUCCESS:\ break;\ - case ONIG_CALLOUT_MISMATCH:\ - case ONIG_CALLOUT_ABORT:\ default:\ if (result > 0) {\ result = ONIGERR_INVALID_ARGUMENT;\ @@ -3899,9 +3897,6 @@ match_at(regex_t* reg, const UChar* str, const UChar* end, case ONIG_CALLOUT_SUCCESS: goto retraction_callout2; break; - case ONIG_CALLOUT_MISMATCH: /* == ONIG_MISMATCH */ - case ONIG_CALLOUT_ABORT: /* == ONIG_ABORT */ - /* fall */ default: /* error code */ if (call_result > 0) { call_result = ONIGERR_INVALID_ARGUMENT; @@ -5298,7 +5293,7 @@ onig_builtin_fail(OnigCalloutArgs* args ARG_UNUSED, void* user_data ARG_UNUSED) extern int onig_builtin_mismatch(OnigCalloutArgs* args ARG_UNUSED, void* user_data ARG_UNUSED) { - return ONIG_CALLOUT_MISMATCH; + return ONIG_MISMATCH; } #if 0 -- 2.40.0