mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 10:08:20 +00:00
Val: use IntrusivePtr in check_and_promote()
This commit is contained in:
parent
3d999b53fe
commit
96951c1300
3 changed files with 23 additions and 31 deletions
|
@ -29,6 +29,7 @@ using std::string;
|
|||
|
||||
template <class T> class IntrusivePtr;
|
||||
template<typename T> class PDict;
|
||||
template <class T> class IntrusivePtr;
|
||||
class IterCookie;
|
||||
|
||||
class Val;
|
||||
|
@ -1018,7 +1019,7 @@ protected:
|
|||
// Unref()'ing the original. If not a match, generates an error message
|
||||
// and returns nil, also Unref()'ing v. If is_init is true, then
|
||||
// the checking is done in the context of an initialization.
|
||||
extern Val* check_and_promote(Val* v, const BroType* t, int is_init, const Location* expr_location = nullptr);
|
||||
extern IntrusivePtr<Val> check_and_promote(IntrusivePtr<Val> v, const BroType* t, int is_init, const Location* expr_location = nullptr);
|
||||
|
||||
// Given a pointer to where a Val's core (i.e., its BRO value) resides,
|
||||
// returns a corresponding newly-created or Ref()'d Val. ptr must already
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue