now we can load PGF files as precompiled modules

This commit is contained in:
Krasimir Angelov
2024-01-30 13:02:40 +01:00
parent 021e271f29
commit c94d0f31bc
19 changed files with 161 additions and 99 deletions

View File

@@ -1285,11 +1285,7 @@ PGF_embed(PGFObject* self, PyObject *modname)
py_embedding->grammar = self; Py_INCREF(self);
const char *fpath = pgf_file_path(self->db);
if (fpath == NULL) {
py_embedding->grammar_path = Py_None; Py_INCREF(Py_None);
} else {
py_embedding->grammar_path = PyUnicode_FromString(fpath);
}
py_embedding->grammar_path = PyUnicode_FromString(fpath);
if (module == NULL) {
py_embedding->package_path = PyList_New(0);