Replace uses of the old List generation code with new template versions

This commit is contained in:
Tim Wojtulewicz 2019-07-02 18:43:01 -07:00 committed by Jon Siwek
parent 29836b47d0
commit 237c7e4e15
17 changed files with 57 additions and 94 deletions

View file

@ -56,13 +56,9 @@ struct MaskedValue {
uint32 mask;
};
declare(PList, MaskedValue);
typedef PList(MaskedValue) maskedvalue_list;
typedef PList(char) string_list;
declare(PList, BroString);
typedef PList(BroString) bstr_list;
typedef PList<MaskedValue> maskedvalue_list;
typedef PList<char> string_list;
typedef PList<BroString> bstr_list;
// Get values from Bro's script-level variables.
extern void id_to_maskedvallist(const char* id, maskedvalue_list* append_to,
@ -119,8 +115,7 @@ private:
int_list ids; // (only needed for debugging)
};
declare(PList, PatternSet);
typedef PList(PatternSet) pattern_set_list;
typedef PList<PatternSet> pattern_set_list;
pattern_set_list psets[Rule::TYPES];
// List of rules belonging to this node.
@ -136,8 +131,7 @@ private:
int level; // level within the tree
};
declare(PList, RuleHdrTest);
typedef PList(RuleHdrTest) rule_hdr_test_list;
typedef PList<RuleHdrTest> rule_hdr_test_list;
// RuleEndpointState keeps the per-stream matching state of one
// connection endpoint.
@ -172,8 +166,7 @@ private:
Rule::PatternType type;
};
declare(PList, Matcher);
typedef PList(Matcher) matcher_list;
typedef PList<Matcher> matcher_list;
bool is_orig;
analyzer::Analyzer* analyzer;
@ -212,8 +205,7 @@ private:
RE_Match_State* state;
};
declare(PList, Matcher);
typedef PList(Matcher) matcher_list;
typedef PList<Matcher> matcher_list;
matcher_list matchers;
};