mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 05:58:20 +00:00
Merge remote-tracking branch 'origin/topic/robin/gh-4250-vec-allocator'
* origin/topic/robin/gh-4250-vec-allocator: Spicy: Fix passing vectors to Zeek.
This commit is contained in:
commit
3d25328204
5 changed files with 35 additions and 8 deletions
|
@ -502,8 +502,8 @@ template<typename K, typename V>
|
|||
ValPtr to_val(const hilti::rt::Map<K, V>& s, const TypePtr& target);
|
||||
template<typename T>
|
||||
ValPtr to_val(const hilti::rt::Set<T>& s, const TypePtr& target);
|
||||
template<typename T>
|
||||
ValPtr to_val(const hilti::rt::Vector<T>& v, const TypePtr& target);
|
||||
template<typename T, typename Allocator>
|
||||
ValPtr to_val(const hilti::rt::Vector<T, Allocator>& v, const TypePtr& target);
|
||||
template<typename T>
|
||||
ValPtr to_val(const std::optional<T>& t, const TypePtr& target);
|
||||
template<typename T, typename E>
|
||||
|
@ -695,8 +695,8 @@ inline ValPtr to_val(const hilti::rt::Time& t, const TypePtr& target) {
|
|||
* Converts a Spicy-side vector to a Zeek value. The result is returned with
|
||||
* ref count +1.
|
||||
*/
|
||||
template<typename T>
|
||||
inline ValPtr to_val(const hilti::rt::Vector<T>& v, const TypePtr& target) {
|
||||
template<typename T, typename Allocator>
|
||||
inline ValPtr to_val(const hilti::rt::Vector<T, Allocator>& v, const TypePtr& target) {
|
||||
if ( target->Tag() != TYPE_VECTOR && target->Tag() != TYPE_LIST )
|
||||
throw ParameterMismatch("expected vector or list", target);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue