summaryrefslogtreecommitdiff
path: root/src/runtime/python/pypgf.c
diff options
context:
space:
mode:
authorkr.angelov <kr.angelov@gmail.com>2013-05-31 09:24:15 +0000
committerkr.angelov <kr.angelov@gmail.com>2013-05-31 09:24:15 +0000
commit54a0642beec3ba39de2e2ed1f50b0ca39267be49 (patch)
tree785888e23c31ed25469e2eaeaddb84b21ca42792 /src/runtime/python/pypgf.c
parent1ce5fa3663f623289905e4ce6935bcc9c907c5dd (diff)
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
Diffstat (limited to 'src/runtime/python/pypgf.c')
-rw-r--r--src/runtime/python/pypgf.c3
1 files changed, 2 insertions, 1 deletions
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;