mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-24 03:52:50 -06:00
fix compilation for Python < 3.10
This commit is contained in:
@@ -675,7 +675,10 @@ PGF_embed(PGFObject* self, PyObject *modname)
|
|||||||
if (m == NULL)
|
if (m == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (PyModule_AddObjectRef(m, "__pgf__", (PyObject*) self) != 0) {
|
Py_INCREF(self);
|
||||||
|
if (PyModule_AddObject(m, "__pgf__", (PyObject*) self) != 0) {
|
||||||
|
Py_DECREF(self);
|
||||||
|
Py_DECREF(m);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user