mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 19:42:50 -06:00
small fix for the embedded mode in Python
This commit is contained in:
@@ -2404,9 +2404,13 @@ pgf_embed_funs(GuMapItor* fn, const void* key, void* value, GuExn* err)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
pyexpr->expr = pgf_fun_get_ep(value)->expr;
|
pyexpr->master = (PyObject*) clo->grammar;
|
||||||
|
pyexpr->expr = pgf_fun_get_ep(value)->expr;
|
||||||
|
|
||||||
|
Py_INCREF(pyexpr->master);
|
||||||
|
|
||||||
if (PyModule_AddObject(clo->object, name, (PyObject*) pyexpr) != 0) {
|
if (PyModule_AddObject(clo->object, name, (PyObject*) pyexpr) != 0) {
|
||||||
|
Py_DECREF(pyexpr);
|
||||||
gu_raise(err, PgfExn);
|
gu_raise(err, PgfExn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user