mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 07:38:19 +00:00
Val: use class IntrusivePtr in class TableVal
This commit is contained in:
parent
93c2064b9a
commit
674e141a15
27 changed files with 88 additions and 109 deletions
|
@ -25,10 +25,8 @@ static Val* empty_connection_table()
|
|||
{
|
||||
TypeList* tbl_index = new TypeList(conn_id);
|
||||
tbl_index->Append(conn_id->Ref());
|
||||
TableType* tbl_type = new TableType(tbl_index, connection_type->Ref());
|
||||
Val* rval = new TableVal(tbl_type);
|
||||
Unref(tbl_type);
|
||||
return rval;
|
||||
auto tbl_type = make_intrusive<TableType>(tbl_index, connection_type->Ref());
|
||||
return new TableVal(std::move(tbl_type));
|
||||
}
|
||||
|
||||
static RecordVal* get_conn_id_val(const Connection* conn)
|
||||
|
|
|
@ -25,7 +25,7 @@ refine flow File += {
|
|||
function characteristics_to_bro(c: uint32, len: uint8): TableVal
|
||||
%{
|
||||
uint64 mask = (len==16) ? 0xFFFF : 0xFFFFFFFF;
|
||||
TableVal* char_set = new TableVal(internal_type("count_set")->AsTableType());
|
||||
TableVal* char_set = new TableVal({NewRef{}, internal_type("count_set")->AsTableType()});
|
||||
for ( uint16 i=0; i < len; ++i )
|
||||
{
|
||||
if ( ((c >> i) & 0x1) == 1 )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue