Deprecate Func::FType(), replace with Func::GetType()

This commit is contained in:
Jon Siwek 2020-05-15 18:21:06 -07:00
parent 0f5bb4b83d
commit 688bed97bc
9 changed files with 37 additions and 28 deletions

View file

@ -46,7 +46,7 @@ Val::Val(Func* f) : Val({NewRef{}, f})
{}
Val::Val(IntrusivePtr<Func> f)
: val(f.release()), type({NewRef{}, val.func_val->FType()})
: val(f.release()), type(val.func_val->GetType())
{}
static const IntrusivePtr<FileType>& GetStringFileType() noexcept
@ -269,7 +269,7 @@ IntrusivePtr<Val> Val::SizeVal() const
case TYPE_INTERNAL_OTHER:
if ( type->Tag() == TYPE_FUNC )
return val_mgr->Count(val.func_val->FType()->ArgTypes()->Types().size());
return val_mgr->Count(val.func_val->GetType()->ArgTypes()->Types().size());
if ( type->Tag() == TYPE_FILE )
return make_intrusive<Val>(val.file_val->Size(), TYPE_DOUBLE);
@ -2482,7 +2482,7 @@ double TableVal::CallExpireFunc(IntrusivePtr<ListVal> idx)
const Func* f = vf->AsFunc();
zeek::Args vl;
const auto& func_args = f->FType()->ArgTypes()->Types();
const auto& func_args = f->GetType()->ArgTypes()->Types();
// backwards compatibility with idx: any idiom
bool any_idiom = func_args.size() == 2 && func_args.back()->Tag() == TYPE_ANY;