From: K.Kosako Date: Wed, 20 Feb 2019 05:02:07 +0000 (+0900) Subject: remove GIMMICK_KEEP from GimmickType X-Git-Tag: v6.9.2_rc1~65^2~31 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0935ae782e7a5c3ce405a7f2874baffdeb2667bb;p=onig remove GIMMICK_KEEP from GimmickType --- diff --git a/src/regcomp.c b/src/regcomp.c index f53771a..31f3760 100644 --- a/src/regcomp.c +++ b/src/regcomp.c @@ -1496,13 +1496,6 @@ compile_gimmick_node(GimmickNode* node, regex_t* reg) r = add_op(reg, OP_FAIL); break; - case GIMMICK_KEEP: - r = add_op(reg, OP_PUSH_SAVE_VAL); - if (r != 0) return r; - COP(reg)->push_save_val.type = SAVE_KEEP; - COP(reg)->push_save_val.id = node->id; - break; - case GIMMICK_SAVE: r = add_op(reg, OP_PUSH_SAVE_VAL); if (r != 0) return r; @@ -1557,7 +1550,6 @@ compile_length_gimmick_node(GimmickNode* node, regex_t* reg) len = SIZE_OP_FAIL; break; - case GIMMICK_KEEP: case GIMMICK_SAVE: len = SIZE_OP_PUSH_SAVE_VAL; break; @@ -6722,9 +6714,6 @@ print_indent_tree(FILE* f, Node* node, int indent) case GIMMICK_FAIL: fprintf(f, "fail"); break; - case GIMMICK_KEEP: - fprintf(f, "keep:%d", GIMMICK_(node)->id); - break; case GIMMICK_SAVE: fprintf(f, "save:%d:%d", GIMMICK_(node)->detail_type, GIMMICK_(node)->id); break; diff --git a/src/regparse.h b/src/regparse.h index 6cfac58..5818c54 100644 --- a/src/regparse.h +++ b/src/regparse.h @@ -59,11 +59,10 @@ enum BagType { enum GimmickType { GIMMICK_FAIL = 0, - GIMMICK_KEEP = 1, - GIMMICK_SAVE = 2, - GIMMICK_UPDATE_VAR = 3, + GIMMICK_SAVE = 1, + GIMMICK_UPDATE_VAR = 2, #ifdef USE_CALLOUT - GIMMICK_CALLOUT = 4, + GIMMICK_CALLOUT = 3, #endif };