From 1b791158af6abbc44860a99edc09c6a606b77388 Mon Sep 17 00:00:00 2001 From: "kr.angelov" Date: Fri, 31 May 2013 09:24:15 +0000 Subject: [PATCH] now the call Expr.unpack("? e1 e2") in Python returns a pair with None as the first element and a the list [e1,e2] as the second. This makes it easier to decompose partial abstract trees --- src/runtime/python/pypgf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/runtime/python/pypgf.c b/src/runtime/python/pypgf.c index e1e360dce..698b48ec9 100644 --- a/src/runtime/python/pypgf.c +++ b/src/runtime/python/pypgf.c @@ -343,8 +343,9 @@ Expr_unpack(ExprObject* self, PyObject *fargs) } } case PGF_EXPR_META: { + PyObject* res = Py_BuildValue("OO", Py_None, args); Py_DECREF(args); - return Py_None; + return res; } case PGF_EXPR_FUN: { PgfExprFun* efun = i.data;