mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-17 16:59:34 -06:00
Add Transaction type to Python bindings, get first tests working.
This commit is contained in:
@@ -6,33 +6,30 @@
|
||||
|
||||
#include <pgf/pgf.h>
|
||||
|
||||
// typedef struct {
|
||||
// PyObject_HEAD
|
||||
// PyObject *thing;
|
||||
// } TransactionObject;
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
PGFObject *pgf; // original reference, gets updated on commit
|
||||
PgfRevision revision; // transient branch
|
||||
} TransactionObject;
|
||||
|
||||
// modifyPGF
|
||||
//
|
||||
// branchPGF
|
||||
//
|
||||
// checkoutPGF
|
||||
extern PyTypeObject pgf_TransactionType;
|
||||
|
||||
TransactionObject *
|
||||
PGF_newTransaction(PGFObject *self, PyObject *args);
|
||||
|
||||
PyObject *
|
||||
PGF_createFunction(PGFObject *self, PyObject *args);
|
||||
Transaction_commit(TransactionObject *self, PyObject *args);
|
||||
|
||||
PyObject *
|
||||
PGF_dropFunction(PGFObject *self, PyObject *args);
|
||||
Transaction_createFunction(TransactionObject *self, PyObject *args);
|
||||
|
||||
PyObject *
|
||||
PGF_createCategory(PGFObject *self, PyObject *args);
|
||||
Transaction_dropFunction(TransactionObject *self, PyObject *args);
|
||||
|
||||
PyObject *
|
||||
PGF_dropCategory(PGFObject *self, PyObject *args);
|
||||
|
||||
// setGlobalFlag
|
||||
//
|
||||
// setAbstractFlag
|
||||
|
||||
Transaction_createCategory(TransactionObject *self, PyObject *args);
|
||||
|
||||
PyObject *
|
||||
Transaction_dropCategory(TransactionObject *self, PyObject *args);
|
||||
|
||||
#endif // PYPGF_TRANSACTIONS_H_
|
||||
|
||||
Reference in New Issue
Block a user