Add FreeHypos function. Remove old Python 2 preproc definition

This commit is contained in:
John J. Camilleri
2021-09-30 10:45:01 +02:00
parent 0fa739e6e3
commit ad0832903a
4 changed files with 21 additions and 28 deletions

View File

@@ -205,12 +205,9 @@ Transaction_createCategory(TransactionObject *self, PyObject *args)
pgf_create_category(self->pgf->db, self->revision, catname, n_hypos, context, prob, &marshaller, &err);
FreePgfText(catname);
for (Py_ssize_t i = 0; i < n_hypos; i++) {
FreePgfText(context[i].cid);
}
PyMem_Free(context);
FreeHypos(context, n_hypos);
if (handleError(err) != PGF_EXN_NONE) {
if (handleError(err) != PGF_EXN_NONE) {
return NULL;
}