mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 05:28:20 +00:00
Deprecate Val::Type(), replace with GetType()
This commit is contained in:
parent
737420c359
commit
1eb723fc9d
30 changed files with 270 additions and 255 deletions
|
@ -284,9 +284,9 @@ void TopkVal::Encountered(Val* encountered)
|
|||
// ok, let's see if we already know this one.
|
||||
|
||||
if ( numElements == 0 )
|
||||
Typify(encountered->Type());
|
||||
Typify(encountered->GetType().get());
|
||||
else
|
||||
if ( ! same_type(type, encountered->Type()) )
|
||||
if ( ! same_type(type, encountered->GetType().get()) )
|
||||
{
|
||||
reporter->Error("Trying to add element to topk with differing type from other elements");
|
||||
return;
|
||||
|
|
|
@ -146,10 +146,10 @@ function bloomfilter_add%(bf: opaque of bloomfilter, x: any%): any
|
|||
%{
|
||||
BloomFilterVal* bfv = static_cast<BloomFilterVal*>(bf);
|
||||
|
||||
if ( ! bfv->Type() && ! bfv->Typify(x->Type()) )
|
||||
if ( ! bfv->Type() && ! bfv->Typify(x->GetType().get()) )
|
||||
reporter->Error("failed to set Bloom filter type");
|
||||
|
||||
else if ( ! same_type(bfv->Type(), x->Type()) )
|
||||
else if ( ! same_type(bfv->Type(), x->GetType().get()) )
|
||||
reporter->Error("incompatible Bloom filter types");
|
||||
|
||||
else
|
||||
|
@ -176,7 +176,7 @@ function bloomfilter_lookup%(bf: opaque of bloomfilter, x: any%): count
|
|||
if ( ! bfv->Type() )
|
||||
return val_mgr->Count(0);
|
||||
|
||||
else if ( ! same_type(bfv->Type(), x->Type()) )
|
||||
else if ( ! same_type(bfv->Type(), x->GetType().get()) )
|
||||
reporter->Error("incompatible Bloom filter types");
|
||||
|
||||
else
|
||||
|
|
|
@ -42,13 +42,13 @@ function hll_cardinality_add%(handle: opaque of cardinality, elem: any%): bool
|
|||
%{
|
||||
CardinalityVal* cv = static_cast<CardinalityVal*>(handle);
|
||||
|
||||
if ( ! cv->Type() && ! cv->Typify(elem->Type()) )
|
||||
if ( ! cv->Type() && ! cv->Typify(elem->GetType().get()) )
|
||||
{
|
||||
reporter->Error("failed to set HLL type");
|
||||
return val_mgr->False();
|
||||
}
|
||||
|
||||
else if ( ! same_type(cv->Type(), elem->Type()) )
|
||||
else if ( ! same_type(cv->Type(), elem->GetType().get()) )
|
||||
{
|
||||
reporter->Error("incompatible HLL data type");
|
||||
return val_mgr->False();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue