Mercurial > cpython-lru_cache-weakref
diff Python/compile.c @ 38406:8f7c7aeac3a5 legacy-trunk
Replace Py_BuildValue("OO") by PyTuple_Pack.
| author | Georg Brandl <georg@python.org> |
|---|---|
| date | Fri, 26 May 2006 20:04:44 +0000 |
| parents | a812d0fae74a |
| children | 5dfb21a37f19 |
line wrap: on
line diff
--- a/Python/compile.c Fri May 26 19:51:10 2006 +0000 +++ b/Python/compile.c Fri May 26 20:04:44 2006 +0000 @@ -334,7 +334,7 @@ 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 @@ 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 @@ 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);
