From d1368c35198630ee9ae16f31f735512a4a30703b Mon Sep 17 00:00:00 2001 From: "kr.angelov" Date: Mon, 19 Aug 2013 15:34:19 +0000 Subject: word completion in the C runtime now returns multi-word expressions and the category for every expression --- src/runtime/python/pypgf.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/runtime/python/pypgf.c') diff --git a/src/runtime/python/pypgf.c b/src/runtime/python/pypgf.c index eb6725050..5adf91c10 100644 --- a/src/runtime/python/pypgf.c +++ b/src/runtime/python/pypgf.c @@ -920,9 +920,10 @@ Iter_fetch_token(IterObject* self) if (tp == NULL) return NULL; - PyObject* ty_tok = gu2py_string(tp->tok); - PyObject* res = Py_BuildValue("(f,O)", tp->prob, ty_tok); - Py_DECREF(ty_tok); + PyObject* py_tok = gu2py_string(tp->tok); + PyObject* py_cat = gu2py_string(tp->cat); + PyObject* res = Py_BuildValue("(f,O,O)", tp->prob, py_tok, py_cat); + Py_DECREF(py_tok); return res; } -- cgit v1.2.3