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

This commit is contained in:
kr.angelov
2013-05-31 09:24:15 +00:00
parent 3566143f37
commit 1b791158af

View File

@@ -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;