mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-10 21:39:32 -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)
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user