1
0
forked from GitHub/gf-core

small fix for the embedded mode in Python

This commit is contained in:
kr.angelov
2014-07-06 19:55:08 +00:00
parent 7afbff6fa8
commit a794ec5c42

View File

@@ -2404,9 +2404,13 @@ pgf_embed_funs(GuMapItor* fn, const void* key, void* value, GuExn* err)
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) {
Py_DECREF(pyexpr);
gu_raise(err, PgfExn);
}
}