limex: fold TESTEOD_REV_FN use into TESTEOD_FN

This commit is contained in:
Justin Viiret
2016-09-01 16:42:00 +10:00
committed by Matthew Barr
parent 9c99a923a1
commit 3dcfea19e0
2 changed files with 7 additions and 34 deletions

View File

@@ -46,7 +46,6 @@
#define IMPL_NFA_T JOIN(struct LimExNFA, SIZE)
#define TESTEOD_FN JOIN(moNfaTestEod, SIZE)
#define TESTEOD_REV_FN JOIN(moNfaRevTestEod, SIZE)
#define INITIAL_FN JOIN(moNfaInitial, SIZE)
#define TOP_FN JOIN(moNfaTop, SIZE)
#define TOPN_FN JOIN(moNfaTopN, SIZE)
@@ -927,8 +926,11 @@ char JOIN(LIMEX_API_ROOT, _B_Reverse)(const struct NFA *n, u64a offset,
REV_STREAM_FN(limex, hbuf, hlen, &ctx, offset);
}
if (offset == 0 && ISNONZERO_STATE(ctx.s)) {
TESTEOD_REV_FN(limex, &ctx.s, offset, cb, context);
if (offset == 0 && limex->acceptEodCount && ISNONZERO_STATE(ctx.s)) {
const union RepeatControl *repeat_ctrl = NULL;
const char *repeat_state = NULL;
TESTEOD_FN(limex, &ctx.s, repeat_ctrl, repeat_state, offset, cb,
context);
}
// NOTE: return value is unused.
@@ -991,7 +993,6 @@ enum nfa_zombie_status JOIN(LIMEX_API_ROOT, _zombie_status)(
}
#undef TESTEOD_FN
#undef TESTEOD_REV_FN
#undef INITIAL_FN
#undef TOP_FN
#undef TOPN_FN