mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 09:08:20 +00:00
Type: init_type() returns IntrusivePtr
This commit is contained in:
parent
cf11d78483
commit
f0a357cadf
4 changed files with 10 additions and 10 deletions
|
@ -64,7 +64,7 @@ static void make_var(ID* id, IntrusivePtr<BroType> t, init_class c,
|
|||
if ( id->Type() && id->Type()->Tag() != TYPE_ERROR )
|
||||
{
|
||||
if ( dt != VAR_REDEF &&
|
||||
(! init || ! do_init || (! t && ! (t = {AdoptRef{}, init_type(init.get())}))) )
|
||||
(! init || ! do_init || (! t && ! (t = init_type(init.get())))) )
|
||||
{
|
||||
id->Error("already defined", init.get());
|
||||
return;
|
||||
|
@ -103,7 +103,7 @@ static void make_var(ID* id, IntrusivePtr<BroType> t, init_class c,
|
|||
return;
|
||||
}
|
||||
|
||||
t = {AdoptRef{}, init_type(init.get())};
|
||||
t = init_type(init.get());
|
||||
if ( ! t )
|
||||
{
|
||||
id->SetType({AdoptRef{}, error_type()});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue