Refactor modules in Python bindings. Start work on grammar-update functions, but without transactions.

This commit is contained in:
John J. Camilleri
2021-09-20 23:42:50 +02:00
parent e41feae82a
commit 7dba3465d0
10 changed files with 243 additions and 35 deletions

24
src/runtime/python/ffi.h Normal file
View File

@@ -0,0 +1,24 @@
#ifndef PYPGF_MARSHALLER_H_
#define PYPGF_MARSHALLER_H_
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include <pgf/pgf.h>
typedef struct {
PyObject_HEAD
PgfDB *db;
PgfRevision revision;
} PGFObject;
extern PyObject *PGFError;
PgfExnType handleError(PgfExn err);
PgfText *PyUnicode_AsPgfText(PyObject *pystr);
PyObject *PyUnicode_FromPgfText(PgfText *text);
extern PgfUnmarshaller unmarshaller;
extern PgfMarshaller marshaller;
#endif // PYPGF_MARSHALLER_H_