mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-10-09 07:42:21 +03:00
nfa: switch to using bytecode_ptr<NFA>
This commit is contained in:
committed by
Matthew Barr
parent
905ac78061
commit
a197074c5d
@@ -26,9 +26,11 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/** \file
|
||||
/**
|
||||
* \file
|
||||
* \brief Castle: multi-tenant repeat engine, compiler code.
|
||||
*/
|
||||
|
||||
#include "castlecompile.h"
|
||||
|
||||
#include "castle_internal.h"
|
||||
@@ -439,7 +441,7 @@ void buildSubcastles(const CastleProto &proto, vector<SubCastle> &subs,
|
||||
}
|
||||
}
|
||||
|
||||
aligned_unique_ptr<NFA>
|
||||
bytecode_ptr<NFA>
|
||||
buildCastle(const CastleProto &proto,
|
||||
const map<u32, vector<vector<CharReach>>> &triggers,
|
||||
const CompileContext &cc, const ReportManager &rm) {
|
||||
@@ -577,7 +579,7 @@ buildCastle(const CastleProto &proto,
|
||||
total_size = ROUNDUP_N(total_size, alignof(mmbit_sparse_iter));
|
||||
total_size += byte_length(stale_iter); // stale sparse iter
|
||||
|
||||
aligned_unique_ptr<NFA> nfa = aligned_zmalloc_unique<NFA>(total_size);
|
||||
auto nfa = make_bytecode_ptr<NFA>(total_size);
|
||||
nfa->type = verify_u8(CASTLE_NFA);
|
||||
nfa->length = verify_u32(total_size);
|
||||
nfa->nPositions = verify_u32(subs.size());
|
||||
|
Reference in New Issue
Block a user