diff options
Diffstat (limited to 'src/runtime/python/pypgf.c')
| -rw-r--r-- | src/runtime/python/pypgf.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/runtime/python/pypgf.c b/src/runtime/python/pypgf.c index cd4d2d26d..6fea65fd1 100644 --- a/src/runtime/python/pypgf.c +++ b/src/runtime/python/pypgf.c @@ -2484,24 +2484,26 @@ PGF_generateAll(PGFObject* self, PyObject *args, PyObject *keywds) pyres->source = (PyObject*) self; Py_INCREF(self); + GuPool* out_pool = gu_new_pool(); + + PyObject* py_pool = PyPool_New(out_pool); + pyres->container = PyTuple_Pack(2, pyres->source, py_pool); + Py_DECREF(py_pool); + pyres->pool = gu_new_pool(); pyres->max_count = max_count; pyres->counter = 0; pyres->fetch = Iter_fetch_expr; - pyres->container = (PyObject*) pyres; - GuPool *tmp_pool = gu_local_pool(); + GuExn* err = gu_exn(pyres->pool); pyres->res = - pgf_generate_all(self->pgf, catname, pyres->pool); + pgf_generate_all(self->pgf, catname, err, pyres->pool, out_pool); if (pyres->res == NULL) { Py_DECREF(pyres); - gu_pool_free(tmp_pool); return NULL; } - gu_pool_free(tmp_pool); - return pyres; } |
