Commit e7d27780 authored by Kenton Varda's avatar Kenton Varda

Merge branch 'master' of https://github.com/kentonv/capnproto

parents ad1c644a c33b8908
...@@ -189,7 +189,7 @@ public: ...@@ -189,7 +189,7 @@ public:
virtual void reportReadLimitReached() = 0; virtual void reportReadLimitReached() = 0;
// Called to report that the read limit has been reached. See ReadLimiter, below. This invokes // Called to report that the read limit has been reached. See ReadLimiter, below. This invokes
// the VALIDATE_INPUT() macro which may throw an exception; if it return normally, the caller // the VALIDATE_INPUT() macro which may throw an exception; if it returns normally, the caller
// will need to continue with default values. // will need to continue with default values.
virtual kj::Own<const ClientHook> extractCap(const _::StructReader& capDescriptor) = 0; virtual kj::Own<const ClientHook> extractCap(const _::StructReader& capDescriptor) = 0;
......
...@@ -739,6 +739,7 @@ class DynamicValue::Pipeline { ...@@ -739,6 +739,7 @@ class DynamicValue::Pipeline {
public: public:
typedef DynamicValue Pipelines; typedef DynamicValue Pipelines;
inline Pipeline(decltype(nullptr) n = nullptr);
inline Pipeline(DynamicStruct::Pipeline&& value); inline Pipeline(DynamicStruct::Pipeline&& value);
inline Pipeline(DynamicCapability::Client&& value); inline Pipeline(DynamicCapability::Client&& value);
...@@ -749,6 +750,9 @@ public: ...@@ -749,6 +750,9 @@ public:
template <typename T> template <typename T>
inline PipelineFor<T> releaseAs() { return AsImpl<T>::apply(*this); } inline PipelineFor<T> releaseAs() { return AsImpl<T>::apply(*this); }
inline Type getType() { return type; }
// Get the type of this value.
private: private:
Type type; Type type;
union { union {
...@@ -1366,6 +1370,7 @@ struct DynamicValue::Builder::AsImpl<T, Kind::INTERFACE> { ...@@ -1366,6 +1370,7 @@ struct DynamicValue::Builder::AsImpl<T, Kind::INTERFACE> {
} }
}; };
inline DynamicValue::Pipeline::Pipeline(std::nullptr_t n): type(UNKNOWN) {}
inline DynamicValue::Pipeline::Pipeline(DynamicStruct::Pipeline&& value) inline DynamicValue::Pipeline::Pipeline(DynamicStruct::Pipeline&& value)
: type(STRUCT), structValue(kj::mv(value)) {} : type(STRUCT), structValue(kj::mv(value)) {}
inline DynamicValue::Pipeline::Pipeline(DynamicCapability::Client&& value) inline DynamicValue::Pipeline::Pipeline(DynamicCapability::Client&& value)
......
...@@ -51,7 +51,7 @@ void inlineAssertFailure(const char* file, int line, const char* expectation, ...@@ -51,7 +51,7 @@ void inlineAssertFailure(const char* file, int line, const char* expectation,
} }
void unreachable() { void unreachable() {
KJ_FAIL_ASSERT("Supposendly-unreachable branch executed."); KJ_FAIL_ASSERT("Supposedly-unreachable branch executed.");
// Really make sure we abort. // Really make sure we abort.
abort(); abort();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment