Add Expr and ExprLit types to Python bindings. Seem to work for readExpr.

This commit is contained in:
John J. Camilleri
2021-09-08 16:03:54 +02:00
parent 44ee5718e9
commit 3b1907cd8c
7 changed files with 269 additions and 983 deletions

View File

@@ -17,11 +17,18 @@ typedef struct {
extern PyTypeObject pgf_TypeType;
// typedef struct {
// PyObject_HEAD
// PyObject* master;
// GuPool* pool;
// PgfExpr expr;
// } ExprObject;
typedef struct {
PyObject_HEAD
} ExprObject;
typedef struct {
PyObject_HEAD
int type; // 0 = int, 1 = float, 2 = str
PyObject *value; // depends on type
} ExprLitObject;
extern PyTypeObject pgf_ExprType;
extern PyTypeObject pgf_ExprLitType;
#endif // PYPGF_EXPR_H_