nfa: unify NfaCallback and SomNfaCallback

Use just one callback type, with both start and end offsets.
This commit is contained in:
Justin Viiret
2016-06-24 16:22:43 +10:00
committed by Matthew Barr
parent 9087d59be5
commit cf9e40ae1c
29 changed files with 103 additions and 234 deletions

View File

@@ -71,7 +71,7 @@ struct LbrTestParams {
};
static
int onMatch(u64a, ReportID, void *ctx) {
int onMatch(u64a, u64a, ReportID, void *ctx) {
unsigned *matches = (unsigned *)ctx;
(*matches)++;
return MO_CONTINUE_MATCHING;
@@ -125,7 +125,6 @@ protected:
q.scratch = nullptr; // not needed by LBR
q.report_current = 0;
q.cb = onMatch;
q.som_cb = nullptr; // only used by Haig
q.context = &matches;
}