summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-05-26 20:04:44 (GMT)
committerGeorg Brandl <georg@python.org>2006-05-26 20:04:44 (GMT)
commit7784f12d745e5f0d2e4c9e98c792f026897325ea (patch)
tree9945840040eee759972df75935ff6a84d4ceb308 /Python/compile.c
parent07bbfc6a51578ac0acd8be5ccf2387299d1814f5 (diff)
downloadcpython-7784f12d745e5f0d2e4c9e98c792f026897325ea.zip
cpython-7784f12d745e5f0d2e4c9e98c792f026897325ea.tar.gz
cpython-7784f12d745e5f0d2e4c9e98c792f026897325ea.tar.bz2
Replace Py_BuildValue("OO") by PyTuple_Pack.
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 15e7e15..e555fec 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -334,7 +334,7 @@ list2dict(PyObject *list)
return NULL;
}
k = PyList_GET_ITEM(list, i);
- k = Py_BuildValue("(OO)", k, k->ob_type);
+ k = PyTuple_Pack(2, k, k->ob_type);
if (k == NULL || PyDict_SetItem(dict, k, v) < 0) {
Py_XDECREF(k);
Py_DECREF(v);
@@ -377,7 +377,7 @@ dictbytype(PyObject *src, int scope_type, int flag, int offset)
return NULL;
}
i++;
- tuple = Py_BuildValue("(OO)", k, k->ob_type);
+ tuple = PyTuple_Pack(2, k, k->ob_type);
if (!tuple || PyDict_SetItem(dest, tuple, item) < 0) {
Py_DECREF(item);
Py_DECREF(dest);
@@ -1841,7 +1841,7 @@ static int
compiler_lookup_arg(PyObject *dict, PyObject *name)
{
PyObject *k, *v;
- k = Py_BuildValue("(OO)", name, name->ob_type);
+ k = PyTuple_Pack(2, name, name->ob_type);
if (k == NULL)
return -1;
v = PyDict_GetItem(dict, k);