mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Spicy: Update for https://github.com/zeek/spicy/pull/1738.
This commit is contained in:
parent
a9649026ae
commit
747e26297b
2 changed files with 6 additions and 7 deletions
|
@ -1 +1 @@
|
||||||
Subproject commit 92f76542eebfcc24b0212aa6c63a3b7af1a0f840
|
Subproject commit 2f513be28536067afb1c6f60eaa2fbca01b0ce7e
|
|
@ -7,7 +7,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <memory>
|
|
||||||
#include <optional>
|
#include <optional>
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -489,8 +488,8 @@ template<typename T>
|
||||||
ValPtr to_val(const hilti::rt::Vector<T>& v, const TypePtr& target);
|
ValPtr to_val(const hilti::rt::Vector<T>& v, const TypePtr& target);
|
||||||
template<typename T>
|
template<typename T>
|
||||||
ValPtr to_val(const std::optional<T>& t, const TypePtr& target);
|
ValPtr to_val(const std::optional<T>& t, const TypePtr& target);
|
||||||
template<typename T>
|
template<typename T, typename E>
|
||||||
ValPtr to_val(const hilti::rt::DeferredExpression<T>& t, const TypePtr& target);
|
ValPtr to_val(const hilti::rt::DeferredExpression<T, E>& t, const TypePtr& target);
|
||||||
template<typename T>
|
template<typename T>
|
||||||
ValPtr to_val(hilti::rt::integer::safe<T> i, const TypePtr& target);
|
ValPtr to_val(hilti::rt::integer::safe<T> i, const TypePtr& target);
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
@ -519,13 +518,13 @@ inline ValPtr to_val(const std::optional<T>& t, const TypePtr& target) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts a Spicy-side DeferredExpression<T> value to a Zeek value. Such
|
* Converts a Spicy-side DeferredExpression<T,E> value to a Zeek value. Such
|
||||||
* result values are returned by the ``.?`` operator. If the result is not
|
* result values are returned by the ``.?`` operator. If the result is not
|
||||||
* set, this will convert into nullptr (which the tuple-to-record to_val()
|
* set, this will convert into nullptr (which the tuple-to-record to_val()
|
||||||
* picks up on).
|
* picks up on).
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
template<typename T, typename E>
|
||||||
inline ValPtr to_val(const hilti::rt::DeferredExpression<T>& t, const TypePtr& target) {
|
inline ValPtr to_val(const hilti::rt::DeferredExpression<T, E>& t, const TypePtr& target) {
|
||||||
try {
|
try {
|
||||||
return to_val(t(), target);
|
return to_val(t(), target);
|
||||||
} catch ( const hilti::rt::AttributeNotSet& ) {
|
} catch ( const hilti::rt::AttributeNotSet& ) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue