mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
Move Location to zeek::detail and BroObj to zeek
This commit is contained in:
parent
58c6e10b62
commit
40ecede4ea
41 changed files with 158 additions and 131 deletions
|
@ -122,7 +122,7 @@ static void make_var(const zeek::detail::IDPtr& id, zeek::TypePtr t,
|
|||
{
|
||||
if ( id->IsRedefinable() || (! init && attr && ! zeek::IsFunc(id->GetType()->Tag())) )
|
||||
{
|
||||
BroObj* redef_obj = init ? (BroObj*) init.get() : (BroObj*) t.get();
|
||||
zeek::BroObj* redef_obj = init ? (zeek::BroObj*) init.get() : (zeek::BroObj*) t.get();
|
||||
if ( dt != VAR_REDEF )
|
||||
id->Warn("redefinition requires \"redef\"", redef_obj, true);
|
||||
}
|
||||
|
@ -336,8 +336,8 @@ zeek::detail::StmtPtr add_local(
|
|||
id->Error("can't use += / -= for initializations of local variables");
|
||||
|
||||
// copy Location to the stack, because AssignExpr may free "init"
|
||||
const Location location = init->GetLocationInfo() ?
|
||||
*init->GetLocationInfo() : no_location;
|
||||
const zeek::detail::Location location = init->GetLocationInfo() ?
|
||||
*init->GetLocationInfo() : zeek::detail::no_location;
|
||||
|
||||
auto name_expr = zeek::make_intrusive<zeek::detail::NameExpr>(id, dt == VAR_CONST);
|
||||
auto assign_expr = zeek::make_intrusive<zeek::detail::AssignExpr>(std::move(name_expr),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue