Add capnp.pxd for public declarations of cython classes
This commit is contained in:
@@ -6,11 +6,7 @@ cdef extern from "../helpers/checkCompiler.h":
|
||||
|
||||
from schema_cpp cimport Node, Data, StructNode, EnumNode, InterfaceNode, MessageBuilder, MessageReader
|
||||
from .capnp.helpers.non_circular cimport PythonInterfaceDynamicImpl, reraise_kj_exception
|
||||
|
||||
from cpython.ref cimport PyObject
|
||||
from libc.stdint cimport *
|
||||
ctypedef unsigned int uint
|
||||
from libcpp cimport bool as cbool
|
||||
from .capnp.includes.types cimport *
|
||||
|
||||
cdef extern from "kj/async.h" namespace " ::kj":
|
||||
cdef cppclass Promise[T]:
|
||||
|
||||
@@ -6,21 +6,8 @@
|
||||
from libc.stdint cimport *
|
||||
from capnp_cpp cimport DynamicOrphan
|
||||
from .capnp.helpers.non_circular cimport reraise_kj_exception
|
||||
ctypedef unsigned int uint
|
||||
ctypedef uint8_t byte
|
||||
ctypedef uint8_t UInt8
|
||||
ctypedef uint16_t UInt16
|
||||
ctypedef uint32_t UInt32
|
||||
ctypedef uint64_t UInt64
|
||||
ctypedef int8_t Int8
|
||||
ctypedef int16_t Int16
|
||||
ctypedef int32_t Int32
|
||||
ctypedef int64_t Int64
|
||||
|
||||
ctypedef char * Object
|
||||
ctypedef bint Bool
|
||||
ctypedef float Float32
|
||||
ctypedef double Float64
|
||||
from .capnp.includes.types cimport *
|
||||
|
||||
cdef extern from "capnp/dynamic.h" namespace " ::capnp":
|
||||
cdef cppclass DynamicValue:
|
||||
|
||||
19
capnp/includes/types.pxd
Normal file
19
capnp/includes/types.pxd
Normal file
@@ -0,0 +1,19 @@
|
||||
from cpython.ref cimport PyObject, Py_INCREF, Py_DECREF
|
||||
from cpython.exc cimport PyErr_Clear
|
||||
from libc.stdint cimport *
|
||||
ctypedef unsigned int uint
|
||||
ctypedef uint8_t byte
|
||||
ctypedef uint8_t UInt8
|
||||
ctypedef uint16_t UInt16
|
||||
ctypedef uint32_t UInt32
|
||||
ctypedef uint64_t UInt64
|
||||
ctypedef int8_t Int8
|
||||
ctypedef int16_t Int16
|
||||
ctypedef int32_t Int32
|
||||
ctypedef int64_t Int64
|
||||
|
||||
ctypedef char * Object
|
||||
ctypedef bint Bool
|
||||
ctypedef float Float32
|
||||
ctypedef double Float64
|
||||
from libcpp cimport bool as cbool
|
||||
Reference in New Issue
Block a user