1
0
forked from GitHub/gf-core

Make Hypo its own class instead of using tuples

This commit is contained in:
John J. Camilleri
2021-09-27 09:00:46 +02:00
parent 07c3f4b88a
commit 6f94957857
6 changed files with 185 additions and 81 deletions

View File

@@ -8,13 +8,22 @@
typedef struct {
PyObject_HEAD
PyObject *hypos; // PyListObject of PyTupleObject: (bind_type: int, cid: string, type: TypeObject)
PyObject *name; // PyUnicodeObject
PyObject *hypos; // PyListObject of HypoObject
PyObject *name; // PyUnicodeObject
PyObject *exprs; // PyListObject of ExprObject
} TypeObject;
PyTypeObject pgf_TypeType;
typedef struct {
PyObject_HEAD
PyObject *bind_type; // PyLongObject
PyObject *cid; // PyUnicodeObject
TypeObject *type;
} HypoObject;
PyTypeObject pgf_HypoType;
typedef struct {
PyObject_HEAD
} ExprObject;