mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 20:18:20 +00:00
revised error-reporting interface for ZVal's, to accommodate ZAM inner loop
This commit is contained in:
parent
d524318154
commit
f3fa8a7c0b
2 changed files with 12 additions and 10 deletions
|
@ -9,7 +9,7 @@
|
|||
using namespace zeek;
|
||||
|
||||
|
||||
bool ZVal::zval_was_nil = false;
|
||||
bool* ZVal::zval_was_nil_addr = nullptr;
|
||||
|
||||
|
||||
ZVal::ZVal(ValPtr v, const TypePtr& t)
|
||||
|
@ -271,7 +271,8 @@ ValPtr ZVal::ToVal(const TypePtr& t) const
|
|||
if ( v )
|
||||
return {NewRef{}, v};
|
||||
|
||||
zval_was_nil = true;
|
||||
if ( zval_was_nil_addr )
|
||||
*zval_was_nil_addr = true;
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue