Add capnp.pxd for public declarations of cython classes

This commit is contained in:
Jason Paryani
2013-12-08 17:52:17 -08:00
parent 1e87bed8c7
commit 9c7d84a82b
6 changed files with 40 additions and 53 deletions

17
capnp/lib/capnp.pxd Normal file
View File

@@ -0,0 +1,17 @@
from .capnp.includes cimport capnp_cpp as capnp
from .capnp.includes cimport schema_cpp
from .capnp.includes.capnp_cpp cimport Schema as C_Schema, StructSchema as C_StructSchema, InterfaceSchema as C_InterfaceSchema, DynamicStruct as C_DynamicStruct, DynamicValue as C_DynamicValue, Type as C_Type, DynamicList as C_DynamicList, fixMaybe, getEnumString, SchemaParser as C_SchemaParser, ParsedSchema as C_ParsedSchema, VOID, ArrayPtr, StringPtr, String, StringTree, DynamicOrphan as C_DynamicOrphan, AnyPointer as C_DynamicObject, DynamicCapability as C_DynamicCapability, new_client, new_server, server_to_client, Request, Response, RemotePromise, convert_to_pypromise, PyPromise, VoidPromise, CallContext, PyRestorer, RpcSystem, makeRpcServer, makeRpcClient, restoreHelper, Capability as C_Capability, TwoPartyVatNetwork as C_TwoPartyVatNetwork, Side, AsyncIoStream, Own, makeTwoPartyVatNetwork, PromiseFulfillerPair as C_PromiseFulfillerPair, copyPromiseFulfillerPair, newPromiseAndFulfiller, reraise_kj_exception
from .capnp.includes.schema_cpp cimport Node as C_Node, EnumNode as C_EnumNode
from .capnp.includes.types cimport *
cdef class _DynamicStructReader:
cdef C_DynamicStruct.Reader thisptr
cdef public object _parent
cdef public bint is_root
cdef object _obj_to_pin
cdef _init(self, C_DynamicStruct.Reader other, object parent, bint isRoot=?)
cpdef which(self)
cpdef as_builder(self)