mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 10:08:20 +00:00
Val: cast_value_to_type() returns IntrusivePtr
This commit is contained in:
parent
96951c1300
commit
3331abb4f2
4 changed files with 6 additions and 8 deletions
|
@ -1037,10 +1037,9 @@ extern void delete_vals(val_list* vals);
|
|||
inline bool is_vector(Val* v) { return v->Type()->Tag() == TYPE_VECTOR; }
|
||||
|
||||
// Returns v casted to type T if the type supports that. Returns null if not.
|
||||
// The returned value will be ref'ed.
|
||||
//
|
||||
// Note: This implements the script-level cast operator.
|
||||
extern Val* cast_value_to_type(Val* v, BroType* t);
|
||||
extern IntrusivePtr<Val> cast_value_to_type(Val* v, BroType* t);
|
||||
|
||||
// Returns true if v can be casted to type T. If so, check_and_cast() will
|
||||
// succeed as well.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue