GH-1624: Migrate check_and_promote and a few Expr methods to IntrusivePtr

This commit is contained in:
Tim Wojtulewicz 2021-12-13 13:19:12 -07:00
parent 75b7bd0c6e
commit edf90a51e4
7 changed files with 76 additions and 65 deletions

View file

@ -1699,8 +1699,11 @@ UNDERLYING_ACCESSOR_DEF(TypeVal, zeek::Type*, AsType)
// exact match, returns it. If promotable, returns the promoted version.
// If not a match, generates an error message and return nil. If is_init is
// true, then the checking is done in the context of an initialization.
extern ValPtr check_and_promote(ValPtr v, const Type* t, bool is_init,
extern ValPtr check_and_promote(ValPtr v, const TypePtr& t, bool is_init,
const detail::Location* expr_location = nullptr);
[[deprecated("Remove in v5.1. Use version that takes TypePtr instead.")]] extern ValPtr
check_and_promote(ValPtr v, const Type* t, bool is_init,
const detail::Location* expr_location = nullptr);
extern bool same_val(const Val* v1, const Val* v2);
extern bool same_atomic_val(const Val* v1, const Val* v2);