Merge pull request #175 from cjermain/feature/schema-parser-header
Exposing SchemaParser in Cython header
This commit is contained in:
@@ -12,6 +12,18 @@ cdef class _StructSchemaField:
|
|||||||
cdef object _parent
|
cdef object _parent
|
||||||
cdef _init(self, C_StructSchema.Field other, 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 class _DynamicOrphan:
|
||||||
cdef C_DynamicOrphan thisptr
|
cdef C_DynamicOrphan thisptr
|
||||||
|
|||||||
@@ -3101,10 +3101,6 @@ class _EnumModule(object):
|
|||||||
setattr(self, name, val)
|
setattr(self, name, val)
|
||||||
|
|
||||||
cdef class _StringArrayPtr:
|
cdef class _StringArrayPtr:
|
||||||
cdef StringPtr * thisptr
|
|
||||||
cdef object parent
|
|
||||||
cdef size_t size
|
|
||||||
|
|
||||||
def __cinit__(self, size_t size, parent):
|
def __cinit__(self, size_t size, parent):
|
||||||
self.size = size
|
self.size = size
|
||||||
self.thisptr = <StringPtr *>malloc(sizeof(StringPtr) * 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.
|
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):
|
def __cinit__(self):
|
||||||
self.thisptr = new C_SchemaParser()
|
self.thisptr = new C_SchemaParser()
|
||||||
|
|||||||
Reference in New Issue
Block a user