mirror of
https://github.com/capnproto/pycapnp.git
synced 2025-03-04 16:35:04 +01:00
Merge pull request #175 from cjermain/feature/schema-parser-header
Exposing SchemaParser in Cython header
This commit is contained in:
commit
adfc76f4c2
2 changed files with 12 additions and 8 deletions
|
@ -12,6 +12,18 @@ cdef class _StructSchemaField:
|
|||
cdef object _parent
|
||||
cdef _init(self, C_StructSchema.Field other, parent=?)
|
||||
|
||||
cdef class _StringArrayPtr:
|
||||
cdef StringPtr * thisptr
|
||||
cdef object parent
|
||||
cdef size_t size
|
||||
cdef ArrayPtr[StringPtr] asArrayPtr(self) except +reraise_kj_exception
|
||||
|
||||
cdef class SchemaParser:
|
||||
cdef C_SchemaParser * thisptr
|
||||
cdef public dict modules_by_id
|
||||
cdef list _all_imports
|
||||
cdef _StringArrayPtr _last_import_array
|
||||
cpdef _parse_disk_file(self, displayName, diskPath, imports) except +reraise_kj_exception
|
||||
|
||||
cdef class _DynamicOrphan:
|
||||
cdef C_DynamicOrphan thisptr
|
||||
|
|
|
@ -3101,10 +3101,6 @@ class _EnumModule(object):
|
|||
setattr(self, name, val)
|
||||
|
||||
cdef class _StringArrayPtr:
|
||||
cdef StringPtr * thisptr
|
||||
cdef object parent
|
||||
cdef size_t size
|
||||
|
||||
def __cinit__(self, size_t size, parent):
|
||||
self.size = size
|
||||
self.thisptr = <StringPtr *>malloc(sizeof(StringPtr) * size)
|
||||
|
@ -3122,10 +3118,6 @@ cdef class SchemaParser:
|
|||
|
||||
Do not use this class unless you're sure you know what you're doing. Use the convenience method :func:`load` instead.
|
||||
"""
|
||||
cdef C_SchemaParser * thisptr
|
||||
cdef public dict modules_by_id
|
||||
cdef list _all_imports
|
||||
cdef _StringArrayPtr _last_import_array
|
||||
|
||||
def __cinit__(self):
|
||||
self.thisptr = new C_SchemaParser()
|
||||
|
|
Loading…
Add table
Reference in a new issue