mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-10-10 16:22:22 +03:00
nfa: unify NfaCallback and SomNfaCallback
Use just one callback type, with both start and end offsets.
This commit is contained in:
committed by
Matthew Barr
parent
9087d59be5
commit
cf9e40ae1c
@@ -119,7 +119,7 @@ char PROCESS_ACCEPTS_FN(const IMPL_NFA_T *limex, STATE_T *s,
|
||||
if (TESTBIT_STATE(s, a->state)) {
|
||||
DEBUG_PRINTF("state %u is on, firing report id=%u, offset=%llu\n",
|
||||
a->state, a->externalId, offset);
|
||||
int rv = callback(offset, a->externalId, context);
|
||||
int rv = callback(0, offset, a->externalId, context);
|
||||
if (unlikely(rv == MO_HALT_MATCHING)) {
|
||||
return 1;
|
||||
}
|
||||
@@ -150,7 +150,7 @@ char PROCESS_ACCEPTS_NOSQUASH_FN(const STATE_T *s,
|
||||
if (TESTBIT_STATE(s, a->state)) {
|
||||
DEBUG_PRINTF("state %u is on, firing report id=%u, offset=%llu\n",
|
||||
a->state, a->externalId, offset);
|
||||
int rv = callback(offset, a->externalId, context);
|
||||
int rv = callback(0, offset, a->externalId, context);
|
||||
if (unlikely(rv == MO_HALT_MATCHING)) {
|
||||
return 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user