Skip to content
Snippets Groups Projects
Commit 41127e87 authored by Bryan O'Sullivan's avatar Bryan O'Sullivan
Browse files

parsers: use PyTuple_Pack instead of manual list-filling

Suggested by Yuya.
parent 32bea9da
No related merge requests found
......@@ -1351,15 +1351,7 @@
goto release;
PyList_SET_ITEM(phaseslist, i, phaseval);
}
ret = PyList_New(2);
if (ret == NULL)
goto release;
PyList_SET_ITEM(ret, 0, phaseslist);
PyList_SET_ITEM(ret, 1, phasessetlist);
/* We don't release phaseslist and phasessetlist as we return them to
* python */
goto done;
ret = PyTuple_Pack(2, phaseslist, phasessetlist);
release:
Py_XDECREF(phaseslist);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment