mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-16 17:31:51 +03:00
exhaust: Update interface
- Only use functions in exhaust.h for valid ekeys - Use INVALID_EKEY everywhere (remove dupe END_EXHAUST sentinel)
This commit is contained in:
committed by
Matthew Barr
parent
d75cc809fe
commit
50885f210a
@@ -243,7 +243,7 @@ int roseAdaptor_i(u64a offset, ReportID id, struct hs_scratch *scratch,
|
||||
}
|
||||
}
|
||||
|
||||
if (!is_simple &&
|
||||
if (!is_simple && ir->ekey != INVALID_EKEY &&
|
||||
unlikely(isExhausted(ci->rose, ci->exhaustionVector, ir->ekey))) {
|
||||
DEBUG_PRINTF("ate exhausted match\n");
|
||||
return MO_CONTINUE_MATCHING;
|
||||
@@ -296,7 +296,7 @@ exit:
|
||||
return MO_HALT_MATCHING;
|
||||
}
|
||||
|
||||
if (!is_simple && ir->ekey != END_EXHAUST) {
|
||||
if (!is_simple && ir->ekey != INVALID_EKEY) {
|
||||
markAsMatched(ci->rose, ci->exhaustionVector, ir->ekey);
|
||||
return MO_CONTINUE_MATCHING;
|
||||
} else {
|
||||
@@ -400,7 +400,7 @@ int roseSomAdaptor_i(u64a from_offset, u64a to_offset, ReportID id,
|
||||
|
||||
int halt = 0;
|
||||
|
||||
if (!is_simple &&
|
||||
if (!is_simple && ir->ekey != INVALID_EKEY &&
|
||||
unlikely(isExhausted(ci->rose, ci->exhaustionVector, ir->ekey))) {
|
||||
DEBUG_PRINTF("ate exhausted match\n");
|
||||
goto exit;
|
||||
@@ -446,7 +446,7 @@ int roseSomAdaptor_i(u64a from_offset, u64a to_offset, ReportID id,
|
||||
halt = ci->userCallback((unsigned int)ir->onmatch, from_offset, to_offset,
|
||||
flags, ci->userContext);
|
||||
|
||||
if (!is_simple) {
|
||||
if (!is_simple && ir->ekey != INVALID_EKEY) {
|
||||
markAsMatched(ci->rose, ci->exhaustionVector, ir->ekey);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user