Make pycapnp more GIL friendly (#308)
* Mark c++ capnp api with nogil * Release gil before blocking in capnp during message reading
This commit is contained in:
committed by
GitHub
parent
5061cdd1ee
commit
701cabe61d
@@ -15,7 +15,7 @@ from capnp.includes.types cimport *
|
|||||||
cdef extern from "capnp/common.h" namespace " ::capnp":
|
cdef extern from "capnp/common.h" namespace " ::capnp":
|
||||||
enum Void:
|
enum Void:
|
||||||
VOID " ::capnp::VOID"
|
VOID " ::capnp::VOID"
|
||||||
cdef cppclass MessageSize:
|
cdef cppclass MessageSize nogil:
|
||||||
uint64_t wordCount
|
uint64_t wordCount
|
||||||
uint capCount
|
uint capCount
|
||||||
|
|
||||||
@@ -26,20 +26,20 @@ cdef extern from "capnp/common.h":
|
|||||||
int CAPNP_VERSION
|
int CAPNP_VERSION
|
||||||
|
|
||||||
cdef extern from "kj/string.h" namespace " ::kj":
|
cdef extern from "kj/string.h" namespace " ::kj":
|
||||||
cdef cppclass StringPtr:
|
cdef cppclass StringPtr nogil:
|
||||||
StringPtr()
|
StringPtr()
|
||||||
StringPtr(char *)
|
StringPtr(char *)
|
||||||
StringPtr(char *, size_t)
|
StringPtr(char *, size_t)
|
||||||
char* cStr()
|
char* cStr()
|
||||||
size_t size()
|
size_t size()
|
||||||
char* begin()
|
char* begin()
|
||||||
cdef cppclass String:
|
cdef cppclass String nogil:
|
||||||
char* cStr()
|
char* cStr()
|
||||||
size_t size()
|
size_t size()
|
||||||
char* begin()
|
char* begin()
|
||||||
|
|
||||||
cdef extern from "kj/exception.h" namespace " ::kj":
|
cdef extern from "kj/exception.h" namespace " ::kj":
|
||||||
cdef cppclass Exception:
|
cdef cppclass Exception nogil:
|
||||||
Exception(Exception)
|
Exception(Exception)
|
||||||
char* getFile()
|
char* getFile()
|
||||||
int getLine()
|
int getLine()
|
||||||
@@ -47,7 +47,7 @@ cdef extern from "kj/exception.h" namespace " ::kj":
|
|||||||
StringPtr getDescription()
|
StringPtr getDescription()
|
||||||
|
|
||||||
cdef extern from "kj/memory.h" namespace " ::kj":
|
cdef extern from "kj/memory.h" namespace " ::kj":
|
||||||
cdef cppclass Own[T]:
|
cdef cppclass Own[T] nogil:
|
||||||
T& operator*()
|
T& operator*()
|
||||||
T* get()
|
T* get()
|
||||||
Own[TwoPartyVatNetwork] makeTwoPartyVatNetwork" ::kj::heap< ::capnp::TwoPartyVatNetwork>"(
|
Own[TwoPartyVatNetwork] makeTwoPartyVatNetwork" ::kj::heap< ::capnp::TwoPartyVatNetwork>"(
|
||||||
@@ -77,38 +77,38 @@ ctypedef Promise[PyObject *] PyPromise
|
|||||||
ctypedef Promise[void] VoidPromise
|
ctypedef Promise[void] VoidPromise
|
||||||
|
|
||||||
cdef extern from "kj/string-tree.h" namespace " ::kj":
|
cdef extern from "kj/string-tree.h" namespace " ::kj":
|
||||||
cdef cppclass StringTree:
|
cdef cppclass StringTree nogil:
|
||||||
String flatten()
|
String flatten()
|
||||||
|
|
||||||
cdef extern from "kj/common.h" namespace " ::kj":
|
cdef extern from "kj/common.h" namespace " ::kj":
|
||||||
cdef cppclass Maybe[T]:
|
cdef cppclass Maybe[T] nogil:
|
||||||
pass
|
pass
|
||||||
cdef cppclass ArrayPtr[T]:
|
cdef cppclass ArrayPtr[T] nogil:
|
||||||
ArrayPtr()
|
ArrayPtr()
|
||||||
ArrayPtr(T *, size_t size)
|
ArrayPtr(T *, size_t size)
|
||||||
size_t size()
|
size_t size()
|
||||||
T& operator[](size_t index)
|
T& operator[](size_t index)
|
||||||
|
|
||||||
cdef extern from "kj/array.h" namespace " ::kj":
|
cdef extern from "kj/array.h" namespace " ::kj":
|
||||||
cdef cppclass Array[T]:
|
cdef cppclass Array[T] nogil:
|
||||||
T* begin()
|
T* begin()
|
||||||
size_t size()
|
size_t size()
|
||||||
T& operator[](size_t index)
|
T& operator[](size_t index)
|
||||||
cdef cppclass ArrayBuilder[T]:
|
cdef cppclass ArrayBuilder[T] nogil:
|
||||||
T* begin()
|
T* begin()
|
||||||
size_t size()
|
size_t size()
|
||||||
T& operator[](size_t index)
|
T& operator[](size_t index)
|
||||||
T& add(T&)
|
T& add(T&)
|
||||||
Array[T] finish()
|
Array[T] finish()
|
||||||
|
|
||||||
ArrayBuilder[PyPromise] heapArrayBuilderPyPromise"::kj::heapArrayBuilder< ::kj::Promise<PyObject *> >"(size_t)
|
ArrayBuilder[PyPromise] heapArrayBuilderPyPromise"::kj::heapArrayBuilder< ::kj::Promise<PyObject *> >"(size_t) nogil
|
||||||
|
|
||||||
ctypedef Array[PyObject *] PyArray' ::kj::Array<PyObject *>'
|
ctypedef Array[PyObject *] PyArray' ::kj::Array<PyObject *>'
|
||||||
|
|
||||||
ctypedef Promise[PyArray] PyPromiseArray
|
ctypedef Promise[PyArray] PyPromiseArray
|
||||||
|
|
||||||
cdef extern from "kj/time.h" namespace " ::kj":
|
cdef extern from "kj/time.h" namespace " ::kj":
|
||||||
cdef cppclass Duration:
|
cdef cppclass Duration nogil:
|
||||||
Duration operator*(int64_t)
|
Duration operator*(int64_t)
|
||||||
Duration NANOSECONDS
|
Duration NANOSECONDS
|
||||||
Duration MICROSECONDS
|
Duration MICROSECONDS
|
||||||
@@ -119,7 +119,7 @@ cdef extern from "kj/time.h" namespace " ::kj":
|
|||||||
Duration DAYS
|
Duration DAYS
|
||||||
# cdef cppclass TimePoint:
|
# cdef cppclass TimePoint:
|
||||||
# TimePoint(Duration)
|
# TimePoint(Duration)
|
||||||
cdef cppclass Timer:
|
cdef cppclass Timer nogil:
|
||||||
# int64_t now()
|
# int64_t now()
|
||||||
# VoidPromise atTime(TimePoint time)
|
# VoidPromise atTime(TimePoint time)
|
||||||
VoidPromise afterDelay(Duration delay)
|
VoidPromise afterDelay(Duration delay)
|
||||||
@@ -128,35 +128,35 @@ cdef inline Duration Nanoseconds(int64_t nanos):
|
|||||||
return NANOSECONDS * nanos
|
return NANOSECONDS * nanos
|
||||||
|
|
||||||
cdef extern from "kj/async-io.h" namespace " ::kj":
|
cdef extern from "kj/async-io.h" namespace " ::kj":
|
||||||
cdef cppclass AsyncIoStream:
|
cdef cppclass AsyncIoStream nogil:
|
||||||
Promise[size_t] read(void*, size_t, size_t)
|
Promise[size_t] read(void*, size_t, size_t)
|
||||||
Promise[void] write(const void*, size_t)
|
Promise[void] write(const void*, size_t)
|
||||||
|
|
||||||
cdef cppclass LowLevelAsyncIoProvider:
|
cdef cppclass LowLevelAsyncIoProvider nogil:
|
||||||
# Own[AsyncInputStream] wrapInputFd(int)
|
# Own[AsyncInputStream] wrapInputFd(int)
|
||||||
# Own[AsyncOutputStream] wrapOutputFd(int)
|
# Own[AsyncOutputStream] wrapOutputFd(int)
|
||||||
Own[AsyncIoStream] wrapSocketFd(int)
|
Own[AsyncIoStream] wrapSocketFd(int)
|
||||||
Timer& getTimer() except +reraise_kj_exception
|
Timer& getTimer() except +reraise_kj_exception
|
||||||
|
|
||||||
cdef cppclass AsyncIoProvider:
|
cdef cppclass AsyncIoProvider nogil:
|
||||||
TwoWayPipe newTwoWayPipe()
|
TwoWayPipe newTwoWayPipe()
|
||||||
|
|
||||||
cdef cppclass WaitScope:
|
cdef cppclass WaitScope nogil:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
cdef cppclass AsyncIoContext:
|
cdef cppclass AsyncIoContext nogil:
|
||||||
AsyncIoContext(AsyncIoContext&)
|
AsyncIoContext(AsyncIoContext&)
|
||||||
Own[LowLevelAsyncIoProvider] lowLevelProvider
|
Own[LowLevelAsyncIoProvider] lowLevelProvider
|
||||||
Own[AsyncIoProvider] provider
|
Own[AsyncIoProvider] provider
|
||||||
WaitScope waitScope
|
WaitScope waitScope
|
||||||
|
|
||||||
cdef cppclass TaskSet:
|
cdef cppclass TaskSet nogil:
|
||||||
TaskSet(ErrorHandler &)
|
TaskSet(ErrorHandler &)
|
||||||
|
|
||||||
cdef cppclass TwoWayPipe:
|
cdef cppclass TwoWayPipe nogil:
|
||||||
Own[AsyncIoStream] ends[2]
|
Own[AsyncIoStream] ends[2]
|
||||||
|
|
||||||
AsyncIoContext setupAsyncIo()
|
AsyncIoContext setupAsyncIo() nogil
|
||||||
|
|
||||||
cdef extern from "capnp/schema.capnp.h" namespace " ::capnp":
|
cdef extern from "capnp/schema.capnp.h" namespace " ::capnp":
|
||||||
enum TypeWhich" ::capnp::schema::Type::Which":
|
enum TypeWhich" ::capnp::schema::Type::Which":
|
||||||
@@ -181,7 +181,7 @@ cdef extern from "capnp/schema.capnp.h" namespace " ::capnp":
|
|||||||
TypeWhichANY_POINTER " ::capnp::schema::Type::Which::ANY_POINTER"
|
TypeWhichANY_POINTER " ::capnp::schema::Type::Which::ANY_POINTER"
|
||||||
|
|
||||||
cdef extern from "capnp/schema.h" namespace " ::capnp":
|
cdef extern from "capnp/schema.h" namespace " ::capnp":
|
||||||
cdef cppclass SchemaType" ::capnp::Type":
|
cdef cppclass SchemaType" ::capnp::Type" nogil:
|
||||||
SchemaType()
|
SchemaType()
|
||||||
SchemaType(TypeWhich)
|
SchemaType(TypeWhich)
|
||||||
cbool isList()
|
cbool isList()
|
||||||
@@ -194,7 +194,7 @@ cdef extern from "capnp/schema.h" namespace " ::capnp":
|
|||||||
InterfaceSchema asInterface() except +reraise_kj_exception
|
InterfaceSchema asInterface() except +reraise_kj_exception
|
||||||
ListSchema asList() except +reraise_kj_exception
|
ListSchema asList() except +reraise_kj_exception
|
||||||
|
|
||||||
cdef cppclass Schema:
|
cdef cppclass Schema nogil:
|
||||||
Node.Reader getProto() except +reraise_kj_exception
|
Node.Reader getProto() except +reraise_kj_exception
|
||||||
StructSchema asStruct() except +reraise_kj_exception
|
StructSchema asStruct() except +reraise_kj_exception
|
||||||
EnumSchema asEnum() except +reraise_kj_exception
|
EnumSchema asEnum() except +reraise_kj_exception
|
||||||
@@ -202,12 +202,12 @@ cdef extern from "capnp/schema.h" namespace " ::capnp":
|
|||||||
Schema getDependency(uint64_t id) except +reraise_kj_exception
|
Schema getDependency(uint64_t id) except +reraise_kj_exception
|
||||||
InterfaceSchema asInterface() except +reraise_kj_exception
|
InterfaceSchema asInterface() except +reraise_kj_exception
|
||||||
|
|
||||||
cdef cppclass InterfaceSchema(Schema):
|
cdef cppclass InterfaceSchema(Schema) nogil:
|
||||||
cppclass SuperclassList:
|
cppclass SuperclassList nogil:
|
||||||
uint size()
|
uint size()
|
||||||
InterfaceSchema operator[](uint index)
|
InterfaceSchema operator[](uint index)
|
||||||
|
|
||||||
cppclass Method:
|
cppclass Method nogil:
|
||||||
InterfaceNode.Method.Reader getProto()
|
InterfaceNode.Method.Reader getProto()
|
||||||
InterfaceSchema getContainingInterface()
|
InterfaceSchema getContainingInterface()
|
||||||
uint16_t getOrdinal()
|
uint16_t getOrdinal()
|
||||||
@@ -215,7 +215,7 @@ cdef extern from "capnp/schema.h" namespace " ::capnp":
|
|||||||
StructSchema getParamType()
|
StructSchema getParamType()
|
||||||
StructSchema getResultType()
|
StructSchema getResultType()
|
||||||
|
|
||||||
cppclass MethodList:
|
cppclass MethodList nogil:
|
||||||
uint size()
|
uint size()
|
||||||
Method operator[](uint index)
|
Method operator[](uint index)
|
||||||
|
|
||||||
@@ -226,18 +226,18 @@ cdef extern from "capnp/schema.h" namespace " ::capnp":
|
|||||||
SuperclassList getSuperclasses()
|
SuperclassList getSuperclasses()
|
||||||
# kj::Maybe<InterfaceSchema> findSuperclass(uint64_t typeId) const;
|
# kj::Maybe<InterfaceSchema> findSuperclass(uint64_t typeId) const;
|
||||||
|
|
||||||
cdef cppclass StructSchema(Schema):
|
cdef cppclass StructSchema(Schema) nogil:
|
||||||
cppclass Field:
|
cppclass Field nogil:
|
||||||
StructNode.Member.Reader getProto()
|
StructNode.Member.Reader getProto()
|
||||||
StructSchema getContainingStruct()
|
StructSchema getContainingStruct()
|
||||||
uint getIndex()
|
uint getIndex()
|
||||||
SchemaType getType()
|
SchemaType getType()
|
||||||
|
|
||||||
cppclass FieldList:
|
cppclass FieldList nogil:
|
||||||
uint size()
|
uint size()
|
||||||
Field operator[](uint index)
|
Field operator[](uint index)
|
||||||
|
|
||||||
cppclass FieldSubset:
|
cppclass FieldSubset nogil:
|
||||||
uint size()
|
uint size()
|
||||||
Field operator[](uint index)
|
Field operator[](uint index)
|
||||||
|
|
||||||
@@ -249,13 +249,13 @@ cdef extern from "capnp/schema.h" namespace " ::capnp":
|
|||||||
|
|
||||||
cbool operator == (StructSchema)
|
cbool operator == (StructSchema)
|
||||||
|
|
||||||
cdef cppclass EnumSchema:
|
cdef cppclass EnumSchema nogil:
|
||||||
cppclass Enumerant:
|
cppclass Enumerant nogil:
|
||||||
EnumNode.Enumerant.Reader getProto()
|
EnumNode.Enumerant.Reader getProto()
|
||||||
EnumSchema getContainingEnum()
|
EnumSchema getContainingEnum()
|
||||||
uint16_t getOrdinal()
|
uint16_t getOrdinal()
|
||||||
|
|
||||||
cppclass EnumerantList:
|
cppclass EnumerantList nogil:
|
||||||
uint size()
|
uint size()
|
||||||
Enumerant operator[](uint index)
|
Enumerant operator[](uint index)
|
||||||
|
|
||||||
@@ -263,25 +263,25 @@ cdef extern from "capnp/schema.h" namespace " ::capnp":
|
|||||||
Enumerant getEnumerantByName(char * name)
|
Enumerant getEnumerantByName(char * name)
|
||||||
Node.Reader getProto()
|
Node.Reader getProto()
|
||||||
|
|
||||||
cdef cppclass ListSchema:
|
cdef cppclass ListSchema nogil:
|
||||||
SchemaType getElementType()
|
SchemaType getElementType()
|
||||||
|
|
||||||
ListSchema listSchemaOfStruct" ::capnp::ListSchema::of"(StructSchema)
|
ListSchema listSchemaOfStruct" ::capnp::ListSchema::of"(StructSchema) nogil
|
||||||
ListSchema listSchemaOfEnum" ::capnp::ListSchema::of"(EnumSchema)
|
ListSchema listSchemaOfEnum" ::capnp::ListSchema::of"(EnumSchema) nogil
|
||||||
ListSchema listSchemaOfInterface" ::capnp::ListSchema::of"(InterfaceSchema)
|
ListSchema listSchemaOfInterface" ::capnp::ListSchema::of"(InterfaceSchema) nogil
|
||||||
ListSchema listSchemaOfList" ::capnp::ListSchema::of"(ListSchema)
|
ListSchema listSchemaOfList" ::capnp::ListSchema::of"(ListSchema) nogil
|
||||||
ListSchema listSchemaOfType" ::capnp::ListSchema::of"(SchemaType)
|
ListSchema listSchemaOfType" ::capnp::ListSchema::of"(SchemaType) nogil
|
||||||
|
|
||||||
cdef cppclass ConstSchema:
|
cdef cppclass ConstSchema:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
cdef extern from "capnp/dynamic.h" namespace " ::capnp":
|
cdef extern from "capnp/dynamic.h" namespace " ::capnp":
|
||||||
cdef cppclass DynamicValueForward" ::capnp::DynamicValue":
|
cdef cppclass DynamicValueForward" ::capnp::DynamicValue" nogil:
|
||||||
cppclass Reader:
|
cppclass Reader nogil:
|
||||||
pass
|
pass
|
||||||
cppclass Builder:
|
cppclass Builder nogil:
|
||||||
pass
|
pass
|
||||||
cppclass Pipeline:
|
cppclass Pipeline nogil:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
enum Type:
|
enum Type:
|
||||||
@@ -299,8 +299,8 @@ cdef extern from "capnp/dynamic.h" namespace " ::capnp":
|
|||||||
TYPE_CAPABILITY " ::capnp::DynamicValue::CAPABILITY"
|
TYPE_CAPABILITY " ::capnp::DynamicValue::CAPABILITY"
|
||||||
TYPE_ANY_POINTER " ::capnp::DynamicValue::ANY_POINTER"
|
TYPE_ANY_POINTER " ::capnp::DynamicValue::ANY_POINTER"
|
||||||
|
|
||||||
cdef cppclass DynamicStruct:
|
cdef cppclass DynamicStruct nogil:
|
||||||
cppclass Reader:
|
cppclass Reader nogil:
|
||||||
DynamicValueForward.Reader get(char *) except +reraise_kj_exception
|
DynamicValueForward.Reader get(char *) except +reraise_kj_exception
|
||||||
DynamicValueForward.Reader getByField"get"(StructSchema.Field) except +reraise_kj_exception
|
DynamicValueForward.Reader getByField"get"(StructSchema.Field) except +reraise_kj_exception
|
||||||
bint has(char *) except +reraise_kj_exception
|
bint has(char *) except +reraise_kj_exception
|
||||||
@@ -309,13 +309,13 @@ cdef extern from "capnp/dynamic.h" namespace " ::capnp":
|
|||||||
uint64_t getId"getSchema().getProto().getId"()
|
uint64_t getId"getSchema().getProto().getId"()
|
||||||
Maybe[StructSchema.Field] which()
|
Maybe[StructSchema.Field] which()
|
||||||
MessageSize totalSize()
|
MessageSize totalSize()
|
||||||
cppclass Pipeline:
|
cppclass Pipeline nogil:
|
||||||
Pipeline()
|
Pipeline()
|
||||||
Pipeline(Pipeline &)
|
Pipeline(Pipeline &)
|
||||||
DynamicValueForward.Pipeline get(char *)
|
DynamicValueForward.Pipeline get(char *)
|
||||||
StructSchema getSchema()
|
StructSchema getSchema()
|
||||||
|
|
||||||
cdef cppclass DynamicStruct_Builder" ::capnp::DynamicStruct::Builder":
|
cdef cppclass DynamicStruct_Builder" ::capnp::DynamicStruct::Builder" nogil:
|
||||||
# Need to flatten this class out, since nested C++ classes cause havoc with cython fused types
|
# Need to flatten this class out, since nested C++ classes cause havoc with cython fused types
|
||||||
DynamicStruct_Builder()
|
DynamicStruct_Builder()
|
||||||
DynamicStruct_Builder(DynamicStruct_Builder &)
|
DynamicStruct_Builder(DynamicStruct_Builder &)
|
||||||
@@ -338,8 +338,8 @@ cdef extern from "capnp/dynamic.h" namespace " ::capnp":
|
|||||||
MessageSize totalSize()
|
MessageSize totalSize()
|
||||||
|
|
||||||
cdef extern from "capnp/dynamic.h" namespace " ::capnp":
|
cdef extern from "capnp/dynamic.h" namespace " ::capnp":
|
||||||
cdef cppclass DynamicCapability:
|
cdef cppclass DynamicCapability nogil:
|
||||||
cppclass Client:
|
cppclass Client nogil:
|
||||||
Client()
|
Client()
|
||||||
Client(Client&)
|
Client(Client&)
|
||||||
Client upcast(InterfaceSchema requestedSchema)
|
Client upcast(InterfaceSchema requestedSchema)
|
||||||
@@ -349,34 +349,34 @@ cdef extern from "capnp/dynamic.h" namespace " ::capnp":
|
|||||||
# Request newRequest(char * methodName, MessageSize)
|
# Request newRequest(char * methodName, MessageSize)
|
||||||
|
|
||||||
cdef extern from "capnp/capability.h" namespace " ::capnp":
|
cdef extern from "capnp/capability.h" namespace " ::capnp":
|
||||||
cdef cppclass Response" ::capnp::Response< ::capnp::DynamicStruct>"(DynamicStruct.Reader):
|
cdef cppclass Response" ::capnp::Response< ::capnp::DynamicStruct>"(DynamicStruct.Reader) nogil:
|
||||||
Response(Response)
|
Response(Response)
|
||||||
cdef cppclass RemotePromise" ::capnp::RemotePromise< ::capnp::DynamicStruct>"(
|
cdef cppclass RemotePromise" ::capnp::RemotePromise< ::capnp::DynamicStruct>"(
|
||||||
Promise[Response], DynamicStruct.Pipeline):
|
Promise[Response], DynamicStruct.Pipeline) nogil:
|
||||||
RemotePromise(RemotePromise)
|
RemotePromise(RemotePromise)
|
||||||
cdef cppclass Capability:
|
cdef cppclass Capability nogil:
|
||||||
cppclass Client:
|
cppclass Client nogil:
|
||||||
Client(Client&)
|
Client(Client&)
|
||||||
DynamicCapability.Client castAs"castAs< ::capnp::DynamicCapability>"(InterfaceSchema)
|
DynamicCapability.Client castAs"castAs< ::capnp::DynamicCapability>"(InterfaceSchema)
|
||||||
|
|
||||||
cdef extern from "capnp/rpc-twoparty.h" namespace " ::capnp":
|
cdef extern from "capnp/rpc-twoparty.h" namespace " ::capnp":
|
||||||
cdef cppclass RpcSystem" ::capnp::RpcSystem<capnp::rpc::twoparty::SturdyRefHostId>":
|
cdef cppclass RpcSystem" ::capnp::RpcSystem<capnp::rpc::twoparty::SturdyRefHostId>" nogil:
|
||||||
RpcSystem(RpcSystem&&)
|
RpcSystem(RpcSystem&&)
|
||||||
|
|
||||||
cdef cppclass Side" ::capnp::rpc::twoparty::Side":
|
cdef cppclass Side" ::capnp::rpc::twoparty::Side" nogil:
|
||||||
pass
|
pass
|
||||||
cdef Side CLIENT" ::capnp::rpc::twoparty::Side::CLIENT"
|
cdef Side CLIENT" ::capnp::rpc::twoparty::Side::CLIENT"
|
||||||
cdef Side SERVER" ::capnp::rpc::twoparty::Side::SERVER"
|
cdef Side SERVER" ::capnp::rpc::twoparty::Side::SERVER"
|
||||||
|
|
||||||
cdef cppclass TwoPartyVatNetwork:
|
cdef cppclass TwoPartyVatNetwork nogil:
|
||||||
TwoPartyVatNetwork(EventLoop &, AsyncIoStream& stream, Side, ReaderOptions)
|
TwoPartyVatNetwork(EventLoop &, AsyncIoStream& stream, Side, ReaderOptions)
|
||||||
VoidPromise onDisconnect()
|
VoidPromise onDisconnect()
|
||||||
VoidPromise onDrained()
|
VoidPromise onDrained()
|
||||||
RpcSystem makeRpcServerBootstrap"makeRpcServer"(TwoPartyVatNetwork&, Capability.Client)
|
RpcSystem makeRpcServerBootstrap"makeRpcServer"(TwoPartyVatNetwork&, Capability.Client) nogil
|
||||||
RpcSystem makeRpcClient(TwoPartyVatNetwork&)
|
RpcSystem makeRpcClient(TwoPartyVatNetwork&) nogil
|
||||||
|
|
||||||
cdef extern from "capnp/dynamic.h" namespace " ::capnp":
|
cdef extern from "capnp/dynamic.h" namespace " ::capnp":
|
||||||
cdef cppclass Request" ::capnp::Request< ::capnp::DynamicStruct, ::capnp::DynamicStruct>":
|
cdef cppclass Request" ::capnp::Request< ::capnp::DynamicStruct, ::capnp::DynamicStruct>" nogil:
|
||||||
Request()
|
Request()
|
||||||
Request(Request &)
|
Request(Request &)
|
||||||
DynamicValueForward.Builder get(char *) except +reraise_kj_exception
|
DynamicValueForward.Builder get(char *) except +reraise_kj_exception
|
||||||
@@ -389,15 +389,15 @@ cdef extern from "capnp/dynamic.h" namespace " ::capnp":
|
|||||||
RemotePromise send()
|
RemotePromise send()
|
||||||
|
|
||||||
cdef extern from "capnp/dynamic.h" namespace " ::capnp":
|
cdef extern from "capnp/dynamic.h" namespace " ::capnp":
|
||||||
cdef cppclass DynamicEnum:
|
cdef cppclass DynamicEnum nogil:
|
||||||
uint16_t getRaw()
|
uint16_t getRaw()
|
||||||
Maybe[EnumSchema.Enumerant] getEnumerant()
|
Maybe[EnumSchema.Enumerant] getEnumerant()
|
||||||
|
|
||||||
cdef cppclass DynamicList:
|
cdef cppclass DynamicList nogil:
|
||||||
cppclass Reader:
|
cppclass Reader nogil:
|
||||||
DynamicValueForward.Reader operator[](uint) except +reraise_kj_exception
|
DynamicValueForward.Reader operator[](uint) except +reraise_kj_exception
|
||||||
uint size()
|
uint size()
|
||||||
cppclass Builder:
|
cppclass Builder nogil:
|
||||||
Builder()
|
Builder()
|
||||||
Builder(Builder &)
|
Builder(Builder &)
|
||||||
DynamicValueForward.Builder operator[](uint) except +reraise_kj_exception
|
DynamicValueForward.Builder operator[](uint) except +reraise_kj_exception
|
||||||
@@ -409,14 +409,14 @@ cdef extern from "capnp/dynamic.h" namespace " ::capnp":
|
|||||||
StructSchema getStructElementType'getSchema().getStructElementType'()
|
StructSchema getStructElementType'getSchema().getStructElementType'()
|
||||||
|
|
||||||
cdef extern from "capnp/any.h" namespace " ::capnp":
|
cdef extern from "capnp/any.h" namespace " ::capnp":
|
||||||
cdef cppclass AnyPointer:
|
cdef cppclass AnyPointer nogil:
|
||||||
cppclass Reader:
|
cppclass Reader nogil:
|
||||||
DynamicStruct.Reader getAs"getAs< ::capnp::DynamicStruct>"(StructSchema) except +reraise_kj_exception
|
DynamicStruct.Reader getAs"getAs< ::capnp::DynamicStruct>"(StructSchema) except +reraise_kj_exception
|
||||||
DynamicCapability.Client getAsCapability"getAs< ::capnp::DynamicCapability>"(
|
DynamicCapability.Client getAsCapability"getAs< ::capnp::DynamicCapability>"(
|
||||||
InterfaceSchema) except +reraise_kj_exception
|
InterfaceSchema) except +reraise_kj_exception
|
||||||
DynamicList.Reader getAsList"getAs< ::capnp::DynamicList>"(ListSchema) except +reraise_kj_exception
|
DynamicList.Reader getAsList"getAs< ::capnp::DynamicList>"(ListSchema) except +reraise_kj_exception
|
||||||
StringPtr getAsText"getAs< ::capnp::Text>"() except +reraise_kj_exception
|
StringPtr getAsText"getAs< ::capnp::Text>"() except +reraise_kj_exception
|
||||||
cppclass Builder:
|
cppclass Builder nogil:
|
||||||
Builder(Builder)
|
Builder(Builder)
|
||||||
DynamicStruct_Builder getAs"getAs< ::capnp::DynamicStruct>"(StructSchema) except +reraise_kj_exception
|
DynamicStruct_Builder getAs"getAs< ::capnp::DynamicStruct>"(StructSchema) except +reraise_kj_exception
|
||||||
DynamicCapability.Client getAsCapability"getAs< ::capnp::DynamicCapability>"(
|
DynamicCapability.Client getAsCapability"getAs< ::capnp::DynamicCapability>"(
|
||||||
@@ -433,8 +433,8 @@ cdef extern from "capnp/any.h" namespace " ::capnp":
|
|||||||
|
|
||||||
|
|
||||||
cdef extern from "capnp/dynamic.h" namespace " ::capnp":
|
cdef extern from "capnp/dynamic.h" namespace " ::capnp":
|
||||||
cdef cppclass DynamicValue:
|
cdef cppclass DynamicValue nogil:
|
||||||
cppclass Reader:
|
cppclass Reader nogil:
|
||||||
Reader()
|
Reader()
|
||||||
Reader(Void value)
|
Reader(Void value)
|
||||||
Reader(cbool value)
|
Reader(cbool value)
|
||||||
@@ -471,7 +471,7 @@ cdef extern from "capnp/dynamic.h" namespace " ::capnp":
|
|||||||
DynamicEnum asEnum"as< ::capnp::DynamicEnum>"()
|
DynamicEnum asEnum"as< ::capnp::DynamicEnum>"()
|
||||||
Data.Reader asData"as< ::capnp::Data>"()
|
Data.Reader asData"as< ::capnp::Data>"()
|
||||||
|
|
||||||
cppclass Builder:
|
cppclass Builder nogil:
|
||||||
Type getType()
|
Type getType()
|
||||||
int64_t asInt"as<int64_t>"()
|
int64_t asInt"as<int64_t>"()
|
||||||
uint64_t asUint"as<uint64_t>"()
|
uint64_t asUint"as<uint64_t>"()
|
||||||
@@ -485,26 +485,26 @@ cdef extern from "capnp/dynamic.h" namespace " ::capnp":
|
|||||||
DynamicEnum asEnum"as< ::capnp::DynamicEnum>"()
|
DynamicEnum asEnum"as< ::capnp::DynamicEnum>"()
|
||||||
Data.Builder asData"as< ::capnp::Data>"()
|
Data.Builder asData"as< ::capnp::Data>"()
|
||||||
|
|
||||||
cppclass Pipeline:
|
cppclass Pipeline nogil:
|
||||||
Pipeline(Pipeline)
|
Pipeline(Pipeline)
|
||||||
DynamicCapability.Client asCapability"releaseAs< ::capnp::DynamicCapability>"()
|
DynamicCapability.Client asCapability"releaseAs< ::capnp::DynamicCapability>"()
|
||||||
DynamicStruct.Pipeline asStruct"releaseAs< ::capnp::DynamicStruct>"()
|
DynamicStruct.Pipeline asStruct"releaseAs< ::capnp::DynamicStruct>"()
|
||||||
Type getType()
|
Type getType()
|
||||||
|
|
||||||
cdef extern from "capnp/schema-parser.h" namespace " ::capnp":
|
cdef extern from "capnp/schema-parser.h" namespace " ::capnp":
|
||||||
cdef cppclass ParsedSchema(Schema):
|
cdef cppclass ParsedSchema(Schema) nogil:
|
||||||
ParsedSchema getNested(char * name) except +reraise_kj_exception
|
ParsedSchema getNested(char * name) except +reraise_kj_exception
|
||||||
cdef cppclass SchemaParser:
|
cdef cppclass SchemaParser nogil:
|
||||||
SchemaParser()
|
SchemaParser()
|
||||||
ParsedSchema parseDiskFile(char * displayName, char * diskPath, ArrayPtr[StringPtr] importPath)
|
ParsedSchema parseDiskFile(char * displayName, char * diskPath, ArrayPtr[StringPtr] importPath)
|
||||||
|
|
||||||
cdef extern from "capnp/orphan.h" namespace " ::capnp":
|
cdef extern from "capnp/orphan.h" namespace " ::capnp":
|
||||||
cdef cppclass DynamicOrphan" ::capnp::Orphan< ::capnp::DynamicValue>":
|
cdef cppclass DynamicOrphan" ::capnp::Orphan< ::capnp::DynamicValue>" nogil:
|
||||||
DynamicValue.Builder get()
|
DynamicValue.Builder get()
|
||||||
DynamicValue.Reader getReader()
|
DynamicValue.Reader getReader()
|
||||||
|
|
||||||
cdef extern from "capnp/capability.h" namespace " ::capnp":
|
cdef extern from "capnp/capability.h" namespace " ::capnp":
|
||||||
cdef cppclass CallContext' ::capnp::CallContext< ::capnp::DynamicStruct, ::capnp::DynamicStruct>':
|
cdef cppclass CallContext' ::capnp::CallContext< ::capnp::DynamicStruct, ::capnp::DynamicStruct>' nogil:
|
||||||
CallContext(CallContext&)
|
CallContext(CallContext&)
|
||||||
DynamicStruct.Reader getParams() except +reraise_kj_exception
|
DynamicStruct.Reader getParams() except +reraise_kj_exception
|
||||||
void releaseParams() except +reraise_kj_exception
|
void releaseParams() except +reraise_kj_exception
|
||||||
@@ -518,19 +518,19 @@ cdef extern from "capnp/capability.h" namespace " ::capnp":
|
|||||||
void allowCancellation() except +reraise_kj_exception
|
void allowCancellation() except +reraise_kj_exception
|
||||||
|
|
||||||
cdef extern from "kj/async.h" namespace " ::kj":
|
cdef extern from "kj/async.h" namespace " ::kj":
|
||||||
cdef cppclass EventLoop:
|
cdef cppclass EventLoop nogil:
|
||||||
EventLoop()
|
EventLoop()
|
||||||
EventLoop(PyEventPort &)
|
EventLoop(PyEventPort &)
|
||||||
cdef cppclass PromiseFulfiller:
|
cdef cppclass PromiseFulfiller nogil:
|
||||||
void fulfill()
|
void fulfill()
|
||||||
cdef cppclass PromiseFulfillerPair" ::kj::PromiseFulfillerPair<void>":
|
cdef cppclass PromiseFulfillerPair" ::kj::PromiseFulfillerPair<void>" nogil:
|
||||||
VoidPromise promise
|
VoidPromise promise
|
||||||
Own[PromiseFulfiller] fulfiller
|
Own[PromiseFulfiller] fulfiller
|
||||||
PromiseFulfillerPair newPromiseAndFulfiller" ::kj::newPromiseAndFulfiller<void>"()
|
PromiseFulfillerPair newPromiseAndFulfiller" ::kj::newPromiseAndFulfiller<void>"() nogil
|
||||||
PyPromiseArray joinPromises(Array[PyPromise])
|
PyPromiseArray joinPromises(Array[PyPromise]) nogil
|
||||||
|
|
||||||
cdef extern from "capnp/helpers/asyncIoHelper.h":
|
cdef extern from "capnp/helpers/asyncIoHelper.h":
|
||||||
cdef cppclass AsyncIoStreamReadHelper:
|
cdef cppclass AsyncIoStreamReadHelper nogil:
|
||||||
AsyncIoStreamReadHelper(AsyncIoStream *, WaitScope *, size_t)
|
AsyncIoStreamReadHelper(AsyncIoStream *, WaitScope *, size_t)
|
||||||
bool poll()
|
bool poll()
|
||||||
size_t read_size()
|
size_t read_size()
|
||||||
|
|||||||
@@ -7,55 +7,55 @@ from capnp.helpers.non_circular cimport reraise_kj_exception
|
|||||||
from capnp.includes.types cimport *
|
from capnp.includes.types cimport *
|
||||||
|
|
||||||
cdef extern from "capnp/dynamic.h" namespace " ::capnp":
|
cdef extern from "capnp/dynamic.h" namespace " ::capnp":
|
||||||
cdef cppclass DynamicValue:
|
cdef cppclass DynamicValue nogil:
|
||||||
cppclass Reader:
|
cppclass Reader nogil:
|
||||||
pass
|
pass
|
||||||
cppclass Builder:
|
cppclass Builder nogil:
|
||||||
pass
|
pass
|
||||||
cdef cppclass DynamicStruct:
|
cdef cppclass DynamicStruct nogil:
|
||||||
cppclass Reader:
|
cppclass Reader nogil:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
cdef cppclass DynamicStruct_Builder" ::capnp::DynamicStruct::Builder":
|
cdef cppclass DynamicStruct_Builder" ::capnp::DynamicStruct::Builder" nogil:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
cdef extern from "capnp/orphan.h" namespace " ::capnp":
|
cdef extern from "capnp/orphan.h" namespace " ::capnp":
|
||||||
cdef cppclass DynamicOrphan" ::capnp::Orphan< ::capnp::DynamicValue>":
|
cdef cppclass DynamicOrphan" ::capnp::Orphan< ::capnp::DynamicValue>" nogil:
|
||||||
DynamicValue.Builder get()
|
DynamicValue.Builder get()
|
||||||
DynamicValue.Reader getReader()
|
DynamicValue.Reader getReader()
|
||||||
|
|
||||||
cdef extern from "capnp/schema.h" namespace " ::capnp":
|
cdef extern from "capnp/schema.h" namespace " ::capnp":
|
||||||
cdef cppclass Schema:
|
cdef cppclass Schema nogil:
|
||||||
pass
|
pass
|
||||||
cdef cppclass StructSchema(Schema):
|
cdef cppclass StructSchema(Schema) nogil:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
cdef extern from "capnp/any.h" namespace " ::capnp":
|
cdef extern from "capnp/any.h" namespace " ::capnp":
|
||||||
cdef cppclass AnyPointer:
|
cdef cppclass AnyPointer nogil:
|
||||||
cppclass Reader:
|
cppclass Reader nogil:
|
||||||
pass
|
pass
|
||||||
cppclass Builder:
|
cppclass Builder nogil:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
cdef extern from "capnp/blob.h" namespace " ::capnp":
|
cdef extern from "capnp/blob.h" namespace " ::capnp":
|
||||||
cdef cppclass Data:
|
cdef cppclass Data nogil:
|
||||||
cppclass Reader:
|
cppclass Reader nogil:
|
||||||
char * begin()
|
char * begin()
|
||||||
size_t size()
|
size_t size()
|
||||||
cppclass Builder:
|
cppclass Builder nogil:
|
||||||
char * begin()
|
char * begin()
|
||||||
size_t size()
|
size_t size()
|
||||||
cdef cppclass Text:
|
cdef cppclass Text nogil:
|
||||||
cppclass Reader:
|
cppclass Reader nogil:
|
||||||
char * cStr()
|
char * cStr()
|
||||||
cppclass Builder:
|
cppclass Builder nogil:
|
||||||
char * cStr()
|
char * cStr()
|
||||||
cdef extern from "capnp/message.h" namespace " ::capnp":
|
cdef extern from "capnp/message.h" namespace " ::capnp":
|
||||||
cdef cppclass List[T]:
|
cdef cppclass List[T] nogil:
|
||||||
cppclass Reader:
|
cppclass Reader nogil:
|
||||||
T operator[](uint)
|
T operator[](uint)
|
||||||
uint size()
|
uint size()
|
||||||
cppclass Builder:
|
cppclass Builder nogil:
|
||||||
T operator[](uint)
|
T operator[](uint)
|
||||||
uint size()
|
uint size()
|
||||||
|
|
||||||
@@ -131,34 +131,34 @@ cdef extern from "capnp/schema.capnp.h" namespace " ::capnp::schema":
|
|||||||
cdef cppclass EnumNode
|
cdef cppclass EnumNode
|
||||||
cdef cppclass StructNode
|
cdef cppclass StructNode
|
||||||
cdef cppclass Annotation
|
cdef cppclass Annotation
|
||||||
cdef cppclass CodeGeneratorRequest:
|
cdef cppclass CodeGeneratorRequest nogil:
|
||||||
|
|
||||||
cppclass Reader:
|
cppclass Reader nogil:
|
||||||
|
|
||||||
List[CodeGeneratorRequest.Node].Reader getNodes()
|
List[CodeGeneratorRequest.Node].Reader getNodes()
|
||||||
List[UInt64].Reader getRequestedFiles()
|
List[UInt64].Reader getRequestedFiles()
|
||||||
cppclass Builder:
|
cppclass Builder nogil:
|
||||||
|
|
||||||
List[CodeGeneratorRequest.Node].Builder getNodes()
|
List[CodeGeneratorRequest.Node].Builder getNodes()
|
||||||
List[CodeGeneratorRequest.Node].Builder initNodes(int)
|
List[CodeGeneratorRequest.Node].Builder initNodes(int)
|
||||||
List[UInt64].Builder getRequestedFiles()
|
List[UInt64].Builder getRequestedFiles()
|
||||||
List[UInt64].Builder initRequestedFiles(int)
|
List[UInt64].Builder initRequestedFiles(int)
|
||||||
|
|
||||||
cdef cppclass InterfaceNode:
|
cdef cppclass InterfaceNode nogil:
|
||||||
cppclass Method
|
cppclass Method
|
||||||
|
|
||||||
cppclass Method:
|
cppclass Method:
|
||||||
cppclass Param
|
cppclass Param
|
||||||
|
|
||||||
cppclass Param:
|
cppclass Param nogil:
|
||||||
|
|
||||||
cppclass Reader:
|
cppclass Reader nogil:
|
||||||
|
|
||||||
Value getDefaultValue()
|
Value getDefaultValue()
|
||||||
Type getType()
|
Type getType()
|
||||||
Text.Reader getName()
|
Text.Reader getName()
|
||||||
List[InterfaceNode.Method.Param.Annotation].Reader getAnnotations()
|
List[InterfaceNode.Method.Param.Annotation].Reader getAnnotations()
|
||||||
cppclass Builder:
|
cppclass Builder nogil:
|
||||||
|
|
||||||
Value getDefaultValue()
|
Value getDefaultValue()
|
||||||
void setDefaultValue(Value)
|
void setDefaultValue(Value)
|
||||||
@@ -169,7 +169,7 @@ cdef extern from "capnp/schema.capnp.h" namespace " ::capnp::schema":
|
|||||||
List[InterfaceNode.Method.Param.Annotation].Builder getAnnotations()
|
List[InterfaceNode.Method.Param.Annotation].Builder getAnnotations()
|
||||||
List[InterfaceNode.Method.Param.Annotation].Builder initAnnotations(int)
|
List[InterfaceNode.Method.Param.Annotation].Builder initAnnotations(int)
|
||||||
|
|
||||||
cppclass Reader:
|
cppclass Reader nogil:
|
||||||
|
|
||||||
UInt16 getCodeOrder()
|
UInt16 getCodeOrder()
|
||||||
Text.Reader getName()
|
Text.Reader getName()
|
||||||
@@ -178,7 +178,7 @@ cdef extern from "capnp/schema.capnp.h" namespace " ::capnp::schema":
|
|||||||
Type getReturnType()
|
Type getReturnType()
|
||||||
List[InterfaceNode.Method.Annotation].Reader getAnnotations()
|
List[InterfaceNode.Method.Annotation].Reader getAnnotations()
|
||||||
|
|
||||||
cppclass Builder:
|
cppclass Builder nogil:
|
||||||
|
|
||||||
UInt16 getCodeOrder()
|
UInt16 getCodeOrder()
|
||||||
void setCodeOrder(UInt16)
|
void setCodeOrder(UInt16)
|
||||||
@@ -193,21 +193,21 @@ cdef extern from "capnp/schema.capnp.h" namespace " ::capnp::schema":
|
|||||||
List[InterfaceNode.Method.Annotation].Builder getAnnotations()
|
List[InterfaceNode.Method.Annotation].Builder getAnnotations()
|
||||||
List[InterfaceNode.Method.Annotation].Builder initAnnotations(int)
|
List[InterfaceNode.Method.Annotation].Builder initAnnotations(int)
|
||||||
|
|
||||||
cppclass Reader:
|
cppclass Reader nogil:
|
||||||
|
|
||||||
List[InterfaceNode.InterfaceNode.Method].Reader getMethods()
|
List[InterfaceNode.InterfaceNode.Method].Reader getMethods()
|
||||||
|
|
||||||
cppclass Builder:
|
cppclass Builder nogil:
|
||||||
|
|
||||||
List[InterfaceNode.InterfaceNode.Method].Builder getMethods()
|
List[InterfaceNode.InterfaceNode.Method].Builder getMethods()
|
||||||
List[InterfaceNode.InterfaceNode.Method].Builder initMethods(int)
|
List[InterfaceNode.InterfaceNode.Method].Builder initMethods(int)
|
||||||
|
|
||||||
cdef cppclass Value:
|
cdef cppclass Value nogil:
|
||||||
cppclass Body
|
cppclass Body
|
||||||
|
|
||||||
cppclass Body:
|
cppclass Body nogil:
|
||||||
|
|
||||||
cppclass Reader:
|
cppclass Reader nogil:
|
||||||
int which()
|
int which()
|
||||||
UInt32 getUint32Value()
|
UInt32 getUint32Value()
|
||||||
Float64 getFloat64Value()
|
Float64 getFloat64Value()
|
||||||
@@ -229,7 +229,7 @@ cdef extern from "capnp/schema.capnp.h" namespace " ::capnp::schema":
|
|||||||
UInt64 getUint64Value()
|
UInt64 getUint64Value()
|
||||||
Object getObjectValue()
|
Object getObjectValue()
|
||||||
|
|
||||||
cppclass Builder:
|
cppclass Builder nogil:
|
||||||
int which()
|
int which()
|
||||||
UInt32 getUint32Value()
|
UInt32 getUint32Value()
|
||||||
void setUint32Value(UInt32)
|
void setUint32Value(UInt32)
|
||||||
@@ -270,35 +270,35 @@ cdef extern from "capnp/schema.capnp.h" namespace " ::capnp::schema":
|
|||||||
Object getObjectValue()
|
Object getObjectValue()
|
||||||
void setObjectValue(Object)
|
void setObjectValue(Object)
|
||||||
|
|
||||||
cppclass Reader:
|
cppclass Reader nogil:
|
||||||
|
|
||||||
Value.Body getBody()
|
Value.Body getBody()
|
||||||
|
|
||||||
cppclass Builder:
|
cppclass Builder nogil:
|
||||||
|
|
||||||
Value.Body getBody()
|
Value.Body getBody()
|
||||||
void setBody(Value.Body)
|
void setBody(Value.Body)
|
||||||
|
|
||||||
cdef cppclass ConstNode:
|
cdef cppclass ConstNode nogil:
|
||||||
|
|
||||||
cppclass Reader:
|
cppclass Reader nogil:
|
||||||
|
|
||||||
Type getType()
|
Type getType()
|
||||||
Value getValue()
|
Value getValue()
|
||||||
|
|
||||||
cppclass Builder:
|
cppclass Builder nogil:
|
||||||
|
|
||||||
Type getType()
|
Type getType()
|
||||||
void setType(Type)
|
void setType(Type)
|
||||||
Value getValue()
|
Value getValue()
|
||||||
void setValue(Value)
|
void setValue(Value)
|
||||||
|
|
||||||
cdef cppclass Type:
|
cdef cppclass Type nogil:
|
||||||
cppclass Body
|
cppclass Body
|
||||||
|
|
||||||
cppclass Body:
|
cppclass Body nogil:
|
||||||
|
|
||||||
cppclass Reader:
|
cppclass Reader nogil:
|
||||||
int which()
|
int which()
|
||||||
Void getBoolType()
|
Void getBoolType()
|
||||||
UInt64 getStructType()
|
UInt64 getStructType()
|
||||||
@@ -320,7 +320,7 @@ cdef extern from "capnp/schema.capnp.h" namespace " ::capnp::schema":
|
|||||||
Void getTextType()
|
Void getTextType()
|
||||||
Void getInt16Type()
|
Void getInt16Type()
|
||||||
|
|
||||||
cppclass Builder:
|
cppclass Builder nogil:
|
||||||
int which()
|
int which()
|
||||||
Void getBoolType()
|
Void getBoolType()
|
||||||
void setBoolType(Void)
|
void setBoolType(Void)
|
||||||
@@ -361,48 +361,48 @@ cdef extern from "capnp/schema.capnp.h" namespace " ::capnp::schema":
|
|||||||
Void getInt16Type()
|
Void getInt16Type()
|
||||||
void setInt16Type(Void)
|
void setInt16Type(Void)
|
||||||
|
|
||||||
cppclass Reader:
|
cppclass Reader nogil:
|
||||||
|
|
||||||
Type.Body getBody()
|
Type.Body getBody()
|
||||||
|
|
||||||
cppclass Builder:
|
cppclass Builder nogil:
|
||||||
|
|
||||||
Type.Body getBody()
|
Type.Body getBody()
|
||||||
void setBody(Type.Body)
|
void setBody(Type.Body)
|
||||||
|
|
||||||
cdef cppclass FileNode:
|
cdef cppclass FileNode nogil:
|
||||||
cppclass Import
|
cppclass Import
|
||||||
|
|
||||||
cppclass Import:
|
cppclass Import nogil:
|
||||||
|
|
||||||
cppclass Reader:
|
cppclass Reader nogil:
|
||||||
|
|
||||||
UInt64 getId()
|
UInt64 getId()
|
||||||
Text.Reader getName()
|
Text.Reader getName()
|
||||||
|
|
||||||
cppclass Builder:
|
cppclass Builder nogil:
|
||||||
|
|
||||||
UInt64 getId()
|
UInt64 getId()
|
||||||
void setId(UInt64)
|
void setId(UInt64)
|
||||||
Text.Builder getName()
|
Text.Builder getName()
|
||||||
void setName(Text)
|
void setName(Text)
|
||||||
|
|
||||||
cppclass Reader:
|
cppclass Reader nogil:
|
||||||
|
|
||||||
List[FileNode.FileNode.Import].Reader getImports()
|
List[FileNode.FileNode.Import].Reader getImports()
|
||||||
|
|
||||||
cppclass Builder:
|
cppclass Builder nogil:
|
||||||
|
|
||||||
List[FileNode.FileNode.Import].Builder getImports()
|
List[FileNode.FileNode.Import].Builder getImports()
|
||||||
List[FileNode.FileNode.Import].Builder initImports(int)
|
List[FileNode.FileNode.Import].Builder initImports(int)
|
||||||
|
|
||||||
cdef cppclass Node:
|
cdef cppclass Node nogil:
|
||||||
cppclass Body
|
cppclass Body
|
||||||
cppclass NestedNode
|
cppclass NestedNode
|
||||||
|
|
||||||
cppclass Body:
|
cppclass Body nogil:
|
||||||
|
|
||||||
cppclass Reader:
|
cppclass Reader nogil:
|
||||||
int which()
|
int which()
|
||||||
AnnotationNode getAnnotationNode()
|
AnnotationNode getAnnotationNode()
|
||||||
InterfaceNode getInterfaceNode()
|
InterfaceNode getInterfaceNode()
|
||||||
@@ -410,7 +410,7 @@ cdef extern from "capnp/schema.capnp.h" namespace " ::capnp::schema":
|
|||||||
StructNode getStructNode()
|
StructNode getStructNode()
|
||||||
ConstNode getConstNode()
|
ConstNode getConstNode()
|
||||||
FileNode getFileNode()
|
FileNode getFileNode()
|
||||||
cppclass Builder:
|
cppclass Builder nogil:
|
||||||
int which()
|
int which()
|
||||||
AnnotationNode getAnnotationNode()
|
AnnotationNode getAnnotationNode()
|
||||||
void setAnnotationNode(AnnotationNode)
|
void setAnnotationNode(AnnotationNode)
|
||||||
@@ -425,19 +425,19 @@ cdef extern from "capnp/schema.capnp.h" namespace " ::capnp::schema":
|
|||||||
FileNode getFileNode()
|
FileNode getFileNode()
|
||||||
void setFileNode(FileNode)
|
void setFileNode(FileNode)
|
||||||
|
|
||||||
cppclass NestedNode:
|
cppclass NestedNode nogil:
|
||||||
|
|
||||||
cppclass Reader:
|
cppclass Reader nogil:
|
||||||
|
|
||||||
Text.Reader getName()
|
Text.Reader getName()
|
||||||
UInt64 getId()
|
UInt64 getId()
|
||||||
cppclass Builder:
|
cppclass Builder nogil:
|
||||||
|
|
||||||
Text.Builder getName()
|
Text.Builder getName()
|
||||||
void setName(Text)
|
void setName(Text)
|
||||||
UInt64 getId()
|
UInt64 getId()
|
||||||
void setId(UInt64)
|
void setId(UInt64)
|
||||||
cppclass Reader:
|
cppclass Reader nogil:
|
||||||
|
|
||||||
Node.Body getBody()
|
Node.Body getBody()
|
||||||
Text.Reader getDisplayName()
|
Text.Reader getDisplayName()
|
||||||
@@ -452,7 +452,7 @@ cdef extern from "capnp/schema.capnp.h" namespace " ::capnp::schema":
|
|||||||
bint isConst()
|
bint isConst()
|
||||||
bint isAnnotation()
|
bint isAnnotation()
|
||||||
|
|
||||||
cppclass Builder:
|
cppclass Builder nogil:
|
||||||
|
|
||||||
Node.Body getBody()
|
Node.Body getBody()
|
||||||
void setBody(Node.Body)
|
void setBody(Node.Body)
|
||||||
@@ -473,9 +473,9 @@ cdef extern from "capnp/schema.capnp.h" namespace " ::capnp::schema":
|
|||||||
bint isConst()
|
bint isConst()
|
||||||
bint isAnnotation()
|
bint isAnnotation()
|
||||||
|
|
||||||
cdef cppclass AnnotationNode:
|
cdef cppclass AnnotationNode nogil:
|
||||||
|
|
||||||
cppclass Reader:
|
cppclass Reader nogil:
|
||||||
|
|
||||||
Bool getTargetsField()
|
Bool getTargetsField()
|
||||||
Bool getTargetsConst()
|
Bool getTargetsConst()
|
||||||
@@ -490,7 +490,7 @@ cdef extern from "capnp/schema.capnp.h" namespace " ::capnp::schema":
|
|||||||
Bool getTargetsInterface()
|
Bool getTargetsInterface()
|
||||||
Bool getTargetsMethod()
|
Bool getTargetsMethod()
|
||||||
|
|
||||||
cppclass Builder:
|
cppclass Builder nogil:
|
||||||
|
|
||||||
Bool getTargetsField()
|
Bool getTargetsField()
|
||||||
void setTargetsField(Bool)
|
void setTargetsField(Bool)
|
||||||
@@ -517,18 +517,18 @@ cdef extern from "capnp/schema.capnp.h" namespace " ::capnp::schema":
|
|||||||
Bool getTargetsMethod()
|
Bool getTargetsMethod()
|
||||||
void setTargetsMethod(Bool)
|
void setTargetsMethod(Bool)
|
||||||
|
|
||||||
cdef cppclass EnumNode:
|
cdef cppclass EnumNode nogil:
|
||||||
cppclass Enumerant
|
cppclass Enumerant
|
||||||
|
|
||||||
cppclass Enumerant:
|
cppclass Enumerant nogil:
|
||||||
|
|
||||||
cppclass Reader:
|
cppclass Reader nogil:
|
||||||
|
|
||||||
UInt16 getCodeOrder()
|
UInt16 getCodeOrder()
|
||||||
Text.Reader getName()
|
Text.Reader getName()
|
||||||
List[EnumNode.Enumerant.Annotation].Reader getAnnotations()
|
List[EnumNode.Enumerant.Annotation].Reader getAnnotations()
|
||||||
|
|
||||||
cppclass Builder:
|
cppclass Builder nogil:
|
||||||
|
|
||||||
UInt16 getCodeOrder()
|
UInt16 getCodeOrder()
|
||||||
void setCodeOrder(UInt16)
|
void setCodeOrder(UInt16)
|
||||||
@@ -537,55 +537,55 @@ cdef extern from "capnp/schema.capnp.h" namespace " ::capnp::schema":
|
|||||||
List[EnumNode.Enumerant.Annotation].Builder getAnnotations()
|
List[EnumNode.Enumerant.Annotation].Builder getAnnotations()
|
||||||
List[EnumNode.Enumerant.Annotation].Builder initAnnotations(int)
|
List[EnumNode.Enumerant.Annotation].Builder initAnnotations(int)
|
||||||
|
|
||||||
cppclass Reader:
|
cppclass Reader nogil:
|
||||||
|
|
||||||
List[EnumNode.EnumNode.Enumerant].Reader getEnumerants()
|
List[EnumNode.EnumNode.Enumerant].Reader getEnumerants()
|
||||||
|
|
||||||
cppclass Builder:
|
cppclass Builder nogil:
|
||||||
|
|
||||||
List[EnumNode.EnumNode.Enumerant].Builder getEnumerants()
|
List[EnumNode.EnumNode.Enumerant].Builder getEnumerants()
|
||||||
List[EnumNode.EnumNode.Enumerant].Builder initEnumerants(int)
|
List[EnumNode.EnumNode.Enumerant].Builder initEnumerants(int)
|
||||||
|
|
||||||
cdef cppclass StructNode:
|
cdef cppclass StructNode nogil:
|
||||||
cppclass Union
|
cppclass Union
|
||||||
cppclass Member
|
cppclass Member
|
||||||
cppclass Field
|
cppclass Field
|
||||||
|
|
||||||
cppclass Union:
|
cppclass Union nogil:
|
||||||
|
|
||||||
cppclass Reader:
|
cppclass Reader nogil:
|
||||||
|
|
||||||
UInt32 getDiscriminantOffset()
|
UInt32 getDiscriminantOffset()
|
||||||
List[StructNode.Union.StructNode.Member].Reader getMembers()
|
List[StructNode.Union.StructNode.Member].Reader getMembers()
|
||||||
cppclass Builder:
|
cppclass Builder nogil:
|
||||||
|
|
||||||
UInt32 getDiscriminantOffset()
|
UInt32 getDiscriminantOffset()
|
||||||
void setDiscriminantOffset(UInt32)
|
void setDiscriminantOffset(UInt32)
|
||||||
List[StructNode.Union.StructNode.Member].Builder getMembers()
|
List[StructNode.Union.StructNode.Member].Builder getMembers()
|
||||||
List[StructNode.Union.StructNode.Member].Builder initMembers(int)
|
List[StructNode.Union.StructNode.Member].Builder initMembers(int)
|
||||||
cppclass Member:
|
cppclass Member nogil:
|
||||||
cppclass Body
|
cppclass Body
|
||||||
|
|
||||||
cppclass Body:
|
cppclass Body nogil:
|
||||||
|
|
||||||
cppclass Reader:
|
cppclass Reader nogil:
|
||||||
int which()
|
int which()
|
||||||
Field getFieldMember()
|
Field getFieldMember()
|
||||||
Union getUnionMember()
|
Union getUnionMember()
|
||||||
cppclass Builder:
|
cppclass Builder nogil:
|
||||||
int which()
|
int which()
|
||||||
Field getFieldMember()
|
Field getFieldMember()
|
||||||
void setFieldMember(Field)
|
void setFieldMember(Field)
|
||||||
Union getUnionMember()
|
Union getUnionMember()
|
||||||
void setUnionMember(Union)
|
void setUnionMember(Union)
|
||||||
cppclass Reader:
|
cppclass Reader nogil:
|
||||||
|
|
||||||
UInt16 getOrdinal()
|
UInt16 getOrdinal()
|
||||||
StructNode.Member.Body getBody()
|
StructNode.Member.Body getBody()
|
||||||
UInt16 getCodeOrder()
|
UInt16 getCodeOrder()
|
||||||
Text.Reader getName()
|
Text.Reader getName()
|
||||||
List[StructNode.Member.Annotation].Reader getAnnotations()
|
List[StructNode.Member.Annotation].Reader getAnnotations()
|
||||||
cppclass Builder:
|
cppclass Builder nogil:
|
||||||
|
|
||||||
UInt16 getOrdinal()
|
UInt16 getOrdinal()
|
||||||
void setOrdinal(UInt16)
|
void setOrdinal(UInt16)
|
||||||
@@ -598,14 +598,14 @@ cdef extern from "capnp/schema.capnp.h" namespace " ::capnp::schema":
|
|||||||
List[StructNode.Member.Annotation].Builder getAnnotations()
|
List[StructNode.Member.Annotation].Builder getAnnotations()
|
||||||
List[StructNode.Member.Annotation].Builder initAnnotations(int)
|
List[StructNode.Member.Annotation].Builder initAnnotations(int)
|
||||||
|
|
||||||
cppclass Field:
|
cppclass Field nogil:
|
||||||
|
|
||||||
cppclass Reader:
|
cppclass Reader nogil:
|
||||||
|
|
||||||
Value getDefaultValue()
|
Value getDefaultValue()
|
||||||
Type getType()
|
Type getType()
|
||||||
UInt32 getOffset()
|
UInt32 getOffset()
|
||||||
cppclass Builder:
|
cppclass Builder nogil:
|
||||||
|
|
||||||
Value getDefaultValue()
|
Value getDefaultValue()
|
||||||
void setDefaultValue(Value)
|
void setDefaultValue(Value)
|
||||||
@@ -613,12 +613,12 @@ cdef extern from "capnp/schema.capnp.h" namespace " ::capnp::schema":
|
|||||||
void setType(Type)
|
void setType(Type)
|
||||||
UInt32 getOffset()
|
UInt32 getOffset()
|
||||||
void setOffset(UInt32)
|
void setOffset(UInt32)
|
||||||
cppclass Reader:
|
cppclass Reader nogil:
|
||||||
|
|
||||||
UInt16 getDataSectionWordSize()
|
UInt16 getDataSectionWordSize()
|
||||||
List[StructNode.StructNode.Member].Reader getMembers()
|
List[StructNode.StructNode.Member].Reader getMembers()
|
||||||
UInt16 getPointerSectionSize()
|
UInt16 getPointerSectionSize()
|
||||||
cppclass Builder:
|
cppclass Builder nogil:
|
||||||
|
|
||||||
UInt16 getDataSectionWordSize()
|
UInt16 getDataSectionWordSize()
|
||||||
void setDataSectionWordSize(UInt16)
|
void setDataSectionWordSize(UInt16)
|
||||||
@@ -626,30 +626,30 @@ cdef extern from "capnp/schema.capnp.h" namespace " ::capnp::schema":
|
|||||||
List[StructNode.StructNode.Member].Builder initMembers(int)
|
List[StructNode.StructNode.Member].Builder initMembers(int)
|
||||||
UInt16 getPointerSectionSize()
|
UInt16 getPointerSectionSize()
|
||||||
void setPointerSectionSize(UInt16)
|
void setPointerSectionSize(UInt16)
|
||||||
cdef cppclass Annotation:
|
cdef cppclass Annotation nogil:
|
||||||
|
|
||||||
cppclass Reader:
|
cppclass Reader nogil:
|
||||||
|
|
||||||
UInt64 getId()
|
UInt64 getId()
|
||||||
Value getValue()
|
Value getValue()
|
||||||
cppclass Builder:
|
cppclass Builder nogil:
|
||||||
|
|
||||||
UInt64 getId()
|
UInt64 getId()
|
||||||
void setId(UInt64)
|
void setId(UInt64)
|
||||||
Value getValue()
|
Value getValue()
|
||||||
void setValue(Value)
|
void setValue(Value)
|
||||||
cdef cppclass ListNestedNodeReader"capnp::List<capnp::schema::Node::NestedNode>::Reader":
|
cdef cppclass ListNestedNodeReader"capnp::List<capnp::schema::Node::NestedNode>::Reader" nogil:
|
||||||
ListNestedNodeReader()
|
ListNestedNodeReader()
|
||||||
ListNestedNodeReader(ListNestedNodeReader)
|
ListNestedNodeReader(ListNestedNodeReader)
|
||||||
Node.NestedNode.Reader operator[](uint)
|
Node.NestedNode.Reader operator[](uint)
|
||||||
uint size()
|
uint size()
|
||||||
|
|
||||||
cdef extern from "capnp/message.h" namespace " ::capnp":
|
cdef extern from "capnp/message.h" namespace " ::capnp":
|
||||||
cdef cppclass ReaderOptions:
|
cdef cppclass ReaderOptions nogil:
|
||||||
uint64_t traversalLimitInWords
|
uint64_t traversalLimitInWords
|
||||||
uint nestingLimit
|
uint nestingLimit
|
||||||
|
|
||||||
cdef cppclass MessageBuilder:
|
cdef cppclass MessageBuilder nogil:
|
||||||
CodeGeneratorRequest.Builder getRootCodeGeneratorRequest'getRoot< ::capnp::schema::CodeGeneratorRequest>'()
|
CodeGeneratorRequest.Builder getRootCodeGeneratorRequest'getRoot< ::capnp::schema::CodeGeneratorRequest>'()
|
||||||
CodeGeneratorRequest.Builder initRootCodeGeneratorRequest'initRoot< ::capnp::schema::CodeGeneratorRequest>'()
|
CodeGeneratorRequest.Builder initRootCodeGeneratorRequest'initRoot< ::capnp::schema::CodeGeneratorRequest>'()
|
||||||
InterfaceNode.Builder getRootInterfaceNode'getRoot< ::capnp::schema::InterfaceNode>'()
|
InterfaceNode.Builder getRootInterfaceNode'getRoot< ::capnp::schema::InterfaceNode>'()
|
||||||
@@ -683,7 +683,7 @@ cdef extern from "capnp/message.h" namespace " ::capnp":
|
|||||||
|
|
||||||
DynamicOrphan newOrphan'getOrphanage().newOrphan'(StructSchema)
|
DynamicOrphan newOrphan'getOrphanage().newOrphan'(StructSchema)
|
||||||
|
|
||||||
cdef cppclass MessageReader:
|
cdef cppclass MessageReader nogil:
|
||||||
CodeGeneratorRequest.Reader getRootCodeGeneratorRequest'getRoot< ::capnp::schema::CodeGeneratorRequest>'()
|
CodeGeneratorRequest.Reader getRootCodeGeneratorRequest'getRoot< ::capnp::schema::CodeGeneratorRequest>'()
|
||||||
InterfaceNode.Reader getRootInterfaceNode'getRoot< ::capnp::schema::InterfaceNode>'()
|
InterfaceNode.Reader getRootInterfaceNode'getRoot< ::capnp::schema::InterfaceNode>'()
|
||||||
Value.Reader getRootValue'getRoot< ::capnp::schema::Value>'()
|
Value.Reader getRootValue'getRoot< ::capnp::schema::Value>'()
|
||||||
@@ -699,15 +699,15 @@ cdef extern from "capnp/message.h" namespace " ::capnp":
|
|||||||
DynamicStruct.Reader getRootDynamicStruct'getRoot< ::capnp::DynamicStruct>'(StructSchema)
|
DynamicStruct.Reader getRootDynamicStruct'getRoot< ::capnp::DynamicStruct>'(StructSchema)
|
||||||
AnyPointer.Reader getRootAnyPointer'getRoot< ::capnp::AnyPointer>'()
|
AnyPointer.Reader getRootAnyPointer'getRoot< ::capnp::AnyPointer>'()
|
||||||
|
|
||||||
cdef cppclass MallocMessageBuilder(MessageBuilder):
|
cdef cppclass MallocMessageBuilder(MessageBuilder) nogil:
|
||||||
MallocMessageBuilder()
|
MallocMessageBuilder()
|
||||||
MallocMessageBuilder(int)
|
MallocMessageBuilder(int)
|
||||||
|
|
||||||
cdef cppclass SegmentArrayMessageReader(MessageReader):
|
cdef cppclass SegmentArrayMessageReader(MessageReader) nogil:
|
||||||
SegmentArrayMessageReader(ConstWordArrayArrayPtr array) except +reraise_kj_exception
|
SegmentArrayMessageReader(ConstWordArrayArrayPtr array) except +reraise_kj_exception
|
||||||
SegmentArrayMessageReader(ConstWordArrayArrayPtr array, ReaderOptions) except +reraise_kj_exception
|
SegmentArrayMessageReader(ConstWordArrayArrayPtr array, ReaderOptions) except +reraise_kj_exception
|
||||||
|
|
||||||
cdef cppclass FlatMessageBuilder(MessageBuilder):
|
cdef cppclass FlatMessageBuilder(MessageBuilder) nogil:
|
||||||
FlatMessageBuilder(WordArrayPtr array)
|
FlatMessageBuilder(WordArrayPtr array)
|
||||||
FlatMessageBuilder(WordArrayPtr array, ReaderOptions)
|
FlatMessageBuilder(WordArrayPtr array, ReaderOptions)
|
||||||
|
|
||||||
@@ -715,27 +715,27 @@ cdef extern from "capnp/message.h" namespace " ::capnp":
|
|||||||
VOID
|
VOID
|
||||||
|
|
||||||
cdef extern from "capnp/common.h" namespace " ::capnp":
|
cdef extern from "capnp/common.h" namespace " ::capnp":
|
||||||
cdef cppclass word:
|
cdef cppclass word nogil:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
cdef extern from "kj/common.h" namespace " ::kj":
|
cdef extern from "kj/common.h" namespace " ::kj":
|
||||||
# Cython can't handle ArrayPtr[word] as a function argument
|
# Cython can't handle ArrayPtr[word] as a function argument
|
||||||
cdef cppclass WordArrayPtr " ::kj::ArrayPtr< ::capnp::word>":
|
cdef cppclass WordArrayPtr " ::kj::ArrayPtr< ::capnp::word>" nogil:
|
||||||
WordArrayPtr()
|
WordArrayPtr()
|
||||||
WordArrayPtr(word *, size_t size)
|
WordArrayPtr(word *, size_t size)
|
||||||
size_t size()
|
size_t size()
|
||||||
word& operator[](size_t index)
|
word& operator[](size_t index)
|
||||||
cdef cppclass ByteArrayPtr " ::kj::ArrayPtr< ::capnp::byte>":
|
cdef cppclass ByteArrayPtr " ::kj::ArrayPtr< ::capnp::byte>" nogil:
|
||||||
ByteArrayPtr()
|
ByteArrayPtr()
|
||||||
ByteArrayPtr(byte *, size_t size)
|
ByteArrayPtr(byte *, size_t size)
|
||||||
size_t size()
|
size_t size()
|
||||||
byte& operator[](size_t index)
|
byte& operator[](size_t index)
|
||||||
cdef cppclass ConstWordArrayPtr " ::kj::ArrayPtr< const ::capnp::word>":
|
cdef cppclass ConstWordArrayPtr " ::kj::ArrayPtr< const ::capnp::word>" nogil:
|
||||||
ConstWordArrayPtr()
|
ConstWordArrayPtr()
|
||||||
ConstWordArrayPtr(word *, size_t size)
|
ConstWordArrayPtr(word *, size_t size)
|
||||||
size_t size()
|
size_t size()
|
||||||
const word* begin()
|
const word* begin()
|
||||||
cdef cppclass ConstWordArrayArrayPtr " ::kj::ArrayPtr< const ::kj::ArrayPtr< const ::capnp::word>>":
|
cdef cppclass ConstWordArrayArrayPtr " ::kj::ArrayPtr< const ::kj::ArrayPtr< const ::capnp::word>>" nogil:
|
||||||
ConstWordArrayArrayPtr()
|
ConstWordArrayArrayPtr()
|
||||||
ConstWordArrayArrayPtr(ConstWordArrayPtr*, size_t size)
|
ConstWordArrayArrayPtr(ConstWordArrayPtr*, size_t size)
|
||||||
size_t size()
|
size_t size()
|
||||||
@@ -743,79 +743,79 @@ cdef extern from "kj/common.h" namespace " ::kj":
|
|||||||
|
|
||||||
cdef extern from "kj/array.h" namespace " ::kj":
|
cdef extern from "kj/array.h" namespace " ::kj":
|
||||||
# Cython can't handle Array[word] as a function argument
|
# Cython can't handle Array[word] as a function argument
|
||||||
cdef cppclass WordArray " ::kj::Array< ::capnp::word>":
|
cdef cppclass WordArray " ::kj::Array< ::capnp::word>" nogil:
|
||||||
word* begin()
|
word* begin()
|
||||||
size_t size()
|
size_t size()
|
||||||
cdef cppclass ByteArray " ::kj::Array< ::capnp::byte>":
|
cdef cppclass ByteArray " ::kj::Array< ::capnp::byte>" nogil:
|
||||||
char* begin()
|
char* begin()
|
||||||
size_t size()
|
size_t size()
|
||||||
|
|
||||||
cdef extern from "kj/array.h" namespace " ::kj":
|
cdef extern from "kj/array.h" namespace " ::kj":
|
||||||
cdef cppclass InputStream:
|
cdef cppclass InputStream nogil:
|
||||||
void read(void* buffer, size_t bytes) except +reraise_kj_exception
|
void read(void* buffer, size_t bytes) except +reraise_kj_exception
|
||||||
size_t read(void* buffer, size_t minBytes, size_t maxBytes) except +reraise_kj_exception
|
size_t read(void* buffer, size_t minBytes, size_t maxBytes) except +reraise_kj_exception
|
||||||
size_t tryRead(void* buffer, size_t minBytes, size_t maxBytes) except +reraise_kj_exception
|
size_t tryRead(void* buffer, size_t minBytes, size_t maxBytes) except +reraise_kj_exception
|
||||||
void skip(size_t bytes) except +reraise_kj_exception
|
void skip(size_t bytes) except +reraise_kj_exception
|
||||||
|
|
||||||
cdef cppclass OutputStream:
|
cdef cppclass OutputStream nogil:
|
||||||
void write(const void* buffer, size_t size) except +reraise_kj_exception
|
void write(const void* buffer, size_t size) except +reraise_kj_exception
|
||||||
# void write(ArrayPtr<const ArrayPtr<const byte>> pieces);
|
# void write(ArrayPtr<const ArrayPtr<const byte>> pieces);
|
||||||
|
|
||||||
cdef cppclass BufferedInputStream(InputStream):
|
cdef cppclass BufferedInputStream(InputStream) nogil:
|
||||||
pass
|
pass
|
||||||
cdef cppclass BufferedOutputStream(OutputStream):
|
cdef cppclass BufferedOutputStream(OutputStream) nogil:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
cdef cppclass BufferedInputStreamWrapper(BufferedInputStream):
|
cdef cppclass BufferedInputStreamWrapper(BufferedInputStream) nogil:
|
||||||
BufferedInputStreamWrapper(InputStream&)
|
BufferedInputStreamWrapper(InputStream&)
|
||||||
cdef cppclass BufferedOutputStreamWrapper(BufferedOutputStream):
|
cdef cppclass BufferedOutputStreamWrapper(BufferedOutputStream) nogil:
|
||||||
BufferedOutputStreamWrapper(OutputStream&)
|
BufferedOutputStreamWrapper(OutputStream&)
|
||||||
|
|
||||||
cdef cppclass ArrayInputStream(BufferedInputStream):
|
cdef cppclass ArrayInputStream(BufferedInputStream) nogil:
|
||||||
ArrayInputStream(ByteArrayPtr)
|
ArrayInputStream(ByteArrayPtr)
|
||||||
ByteArrayPtr getArray()
|
ByteArrayPtr getArray()
|
||||||
# ByteArrayPtr tryGetReadBuffer() except +reraise_kj_exception
|
# ByteArrayPtr tryGetReadBuffer() except +reraise_kj_exception
|
||||||
cdef cppclass ArrayOutputStream(BufferedOutputStream):
|
cdef cppclass ArrayOutputStream(BufferedOutputStream) nogil:
|
||||||
ArrayOutputStream(ByteArrayPtr)
|
ArrayOutputStream(ByteArrayPtr)
|
||||||
ByteArrayPtr getArray()
|
ByteArrayPtr getArray()
|
||||||
ByteArrayPtr getWriteBuffer()
|
ByteArrayPtr getWriteBuffer()
|
||||||
|
|
||||||
cdef cppclass FdInputStream(InputStream):
|
cdef cppclass FdInputStream(InputStream) nogil:
|
||||||
FdInputStream(int)
|
FdInputStream(int)
|
||||||
cdef cppclass FdOutputStream(OutputStream):
|
cdef cppclass FdOutputStream(OutputStream) nogil:
|
||||||
FdOutputStream(int)
|
FdOutputStream(int)
|
||||||
|
|
||||||
cdef extern from "capnp/serialize.h" namespace " ::capnp":
|
cdef extern from "capnp/serialize.h" namespace " ::capnp":
|
||||||
cdef cppclass InputStreamMessageReader(MessageReader):
|
cdef cppclass InputStreamMessageReader(MessageReader) nogil:
|
||||||
InputStreamMessageReader(InputStream&) except +reraise_kj_exception
|
InputStreamMessageReader(InputStream&) except +reraise_kj_exception
|
||||||
InputStreamMessageReader(InputStream&, ReaderOptions) except +reraise_kj_exception
|
InputStreamMessageReader(InputStream&, ReaderOptions) except +reraise_kj_exception
|
||||||
cdef cppclass StreamFdMessageReader(MessageReader):
|
cdef cppclass StreamFdMessageReader(MessageReader) nogil:
|
||||||
StreamFdMessageReader(int) except +reraise_kj_exception
|
StreamFdMessageReader(int) except +reraise_kj_exception
|
||||||
StreamFdMessageReader(int, ReaderOptions) except +reraise_kj_exception
|
StreamFdMessageReader(int, ReaderOptions) except +reraise_kj_exception
|
||||||
|
|
||||||
cdef cppclass FlatArrayMessageReader(MessageReader):
|
cdef cppclass FlatArrayMessageReader(MessageReader) nogil:
|
||||||
FlatArrayMessageReader(WordArrayPtr array) except +reraise_kj_exception
|
FlatArrayMessageReader(WordArrayPtr array) except +reraise_kj_exception
|
||||||
FlatArrayMessageReader(WordArrayPtr array, ReaderOptions) except +reraise_kj_exception
|
FlatArrayMessageReader(WordArrayPtr array, ReaderOptions) except +reraise_kj_exception
|
||||||
const word* getEnd() const
|
const word* getEnd() const
|
||||||
|
|
||||||
void writeMessageToFd(int, MessageBuilder&) except +reraise_kj_exception
|
void writeMessageToFd(int, MessageBuilder&) nogil except +reraise_kj_exception
|
||||||
|
|
||||||
WordArray messageToFlatArray(MessageBuilder &)
|
WordArray messageToFlatArray(MessageBuilder &) nogil
|
||||||
|
|
||||||
cdef extern from "capnp/serialize-packed.h" namespace " ::capnp":
|
cdef extern from "capnp/serialize-packed.h" namespace " ::capnp":
|
||||||
cdef cppclass PackedInputStream(InputStream):
|
cdef cppclass PackedInputStream(InputStream) nogil:
|
||||||
PackedInputStream(BufferedInputStream&) except +reraise_kj_exception
|
PackedInputStream(BufferedInputStream&) except +reraise_kj_exception
|
||||||
cdef cppclass PackedOutputStream(OutputStream):
|
cdef cppclass PackedOutputStream(OutputStream) nogil:
|
||||||
PackedOutputStream(BufferedOutputStream&) except +reraise_kj_exception
|
PackedOutputStream(BufferedOutputStream&) except +reraise_kj_exception
|
||||||
|
|
||||||
cdef cppclass PackedMessageReader(MessageReader):
|
cdef cppclass PackedMessageReader(MessageReader) nogil:
|
||||||
PackedMessageReader(BufferedInputStream&) except +reraise_kj_exception
|
PackedMessageReader(BufferedInputStream&) except +reraise_kj_exception
|
||||||
PackedMessageReader(BufferedInputStream&, ReaderOptions) except +reraise_kj_exception
|
PackedMessageReader(BufferedInputStream&, ReaderOptions) except +reraise_kj_exception
|
||||||
|
|
||||||
cdef cppclass PackedFdMessageReader(MessageReader):
|
cdef cppclass PackedFdMessageReader(MessageReader) nogil:
|
||||||
PackedFdMessageReader(int) except +reraise_kj_exception
|
PackedFdMessageReader(int) except +reraise_kj_exception
|
||||||
PackedFdMessageReader(int, ReaderOptions) except +reraise_kj_exception
|
PackedFdMessageReader(int, ReaderOptions) except +reraise_kj_exception
|
||||||
|
|
||||||
void writePackedMessage(BufferedOutputStream&, MessageBuilder&) except +reraise_kj_exception
|
void writePackedMessage(BufferedOutputStream&, MessageBuilder&) nogil except +reraise_kj_exception
|
||||||
void writePackedMessage(OutputStream&, MessageBuilder&) except +reraise_kj_exception
|
void writePackedMessage(OutputStream&, MessageBuilder&) nogil except +reraise_kj_exception
|
||||||
void writePackedMessageToFd(int, MessageBuilder&) except +reraise_kj_exception
|
void writePackedMessageToFd(int, MessageBuilder&) nogil except +reraise_kj_exception
|
||||||
|
|||||||
@@ -3822,7 +3822,8 @@ cdef class _PackedMessageReader(_MessageReader):
|
|||||||
cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)
|
cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)
|
||||||
|
|
||||||
self._parent = parent
|
self._parent = parent
|
||||||
self.thisptr = new schema_cpp.PackedMessageReader(stream, opts)
|
with nogil:
|
||||||
|
self.thisptr = new schema_cpp.PackedMessageReader(stream, opts)
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def __dealloc__(self):
|
def __dealloc__(self):
|
||||||
@@ -3872,7 +3873,8 @@ cdef class _InputMessageReader(_MessageReader):
|
|||||||
cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)
|
cdef schema_cpp.ReaderOptions opts = make_reader_opts(traversal_limit_in_words, nesting_limit)
|
||||||
|
|
||||||
self._parent = parent
|
self._parent = parent
|
||||||
self.thisptr = new schema_cpp.InputStreamMessageReader(stream, opts)
|
with nogil:
|
||||||
|
self.thisptr = new schema_cpp.InputStreamMessageReader(stream, opts)
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def __dealloc__(self):
|
def __dealloc__(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user