mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Spicy: Fix passing vectors to Zeek.
We missed the allocator argument for the C++-side conversion template, which let vector's of certain types not compile. Closes #4250.
This commit is contained in:
parent
60bd08ca1a
commit
b77faa765a
3 changed files with 19 additions and 7 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