mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
fix to correctly track whether a capture needs deep-copying
This commit is contained in:
parent
e6fe20f140
commit
cfb068a922
1 changed files with 3 additions and 0 deletions
|
@ -603,6 +603,9 @@ SetType::~SetType() = default;
|
||||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
FuncType::Capture::Capture(detail::IDPtr _id, bool _deep_copy) : id(std::move(_id)), deep_copy(_deep_copy) {
|
FuncType::Capture::Capture(detail::IDPtr _id, bool _deep_copy) : id(std::move(_id)), deep_copy(_deep_copy) {
|
||||||
is_managed = id ? ZVal::IsManagedType(id->GetType()) : false;
|
is_managed = id ? ZVal::IsManagedType(id->GetType()) : false;
|
||||||
|
if ( ! is_managed )
|
||||||
|
// For non-managed types, deep copying isn't applicable.
|
||||||
|
deep_copy = false;
|
||||||
}
|
}
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue