Vendor minimal capnproto
This commit is contained in:
@@ -136,7 +136,7 @@ cdef extern from "capnp/dynamic.h" namespace " ::capnp":
|
||||
bint has(char *) except +reraise_kj_exception
|
||||
StructSchema getSchema()
|
||||
Maybe[StructSchema.Field] which()
|
||||
MessageSize totalSize()
|
||||
MessageSize totalSize() except +reraise_kj_exception
|
||||
|
||||
cdef cppclass DynamicStruct_Builder" ::capnp::DynamicStruct::Builder" nogil:
|
||||
# Need to flatten this class out, since nested C++ classes cause havoc with cython fused types
|
||||
@@ -152,7 +152,7 @@ cdef extern from "capnp/dynamic.h" namespace " ::capnp":
|
||||
StructSchema getSchema()
|
||||
Maybe[StructSchema.Field] which()
|
||||
DynamicStruct.Reader asReader()
|
||||
MessageSize totalSize()
|
||||
MessageSize totalSize() except +reraise_kj_exception
|
||||
|
||||
cdef extern from "capnp/dynamic.h" namespace " ::capnp":
|
||||
cdef cppclass DynamicEnum nogil:
|
||||
@@ -214,4 +214,4 @@ cdef extern from "capnp/schema-parser.h" namespace " ::capnp":
|
||||
ParsedSchema getNested(char * name) except +reraise_kj_exception
|
||||
cdef cppclass SchemaParser nogil:
|
||||
SchemaParser()
|
||||
ParsedSchema parseDiskFile(char * displayName, char * diskPath, ArrayPtr[StringPtr] importPath)
|
||||
ParsedSchema parseDiskFile(char * displayName, char * diskPath, ArrayPtr[StringPtr] importPath) except +reraise_kj_exception
|
||||
|
||||
@@ -72,7 +72,7 @@ cdef extern from "capnp/message.h" namespace " ::capnp":
|
||||
cdef cppclass MessageBuilder nogil:
|
||||
DynamicStruct_Builder getRootDynamicStruct 'getRoot< ::capnp::DynamicStruct>'(StructSchema) except +reraise_kj_exception
|
||||
DynamicStruct_Builder initRootDynamicStruct 'initRoot< ::capnp::DynamicStruct>'(StructSchema)
|
||||
void setRootDynamicStruct 'setRoot< ::capnp::DynamicStruct::Reader>'(DynamicStruct.Reader)
|
||||
void setRootDynamicStruct 'setRoot< ::capnp::DynamicStruct::Reader>'(DynamicStruct.Reader) except +reraise_kj_exception
|
||||
|
||||
cdef cppclass MessageReader nogil:
|
||||
DynamicStruct.Reader getRootDynamicStruct 'getRoot< ::capnp::DynamicStruct>'(StructSchema) except +reraise_kj_exception
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# capnp.pyx
|
||||
# distutils: language = c++
|
||||
# distutils: libraries = capnpc capnp kj
|
||||
# distutils: include_dirs = .
|
||||
# cython: c_string_type = str
|
||||
# cython: c_string_encoding = default
|
||||
@@ -1382,7 +1381,6 @@ cdef class SchemaParser:
|
||||
self._last_import_array = importArray
|
||||
|
||||
ret = _ParsedSchema()
|
||||
# TODO (HaaTa): Convert to parseFromDirectory() as per deprecation note
|
||||
ret._init_child(self.thisptr.parseDiskFile(displayName, diskPath, importArray.asArrayPtr()))
|
||||
|
||||
return ret
|
||||
|
||||
Reference in New Issue
Block a user