summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-12-15 15:59:40 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-12-15 15:59:40 (GMT)
commit944dbc643173400c5e4cac4dd4315ace28d6e937 (patch)
tree4798fdef681f44f946b3965f76be3fccf616eec8
parent41afe9dd853577c28e0927eabe23c3927bbed63d (diff)
downloadcpython-944dbc643173400c5e4cac4dd4315ace28d6e937.zip
cpython-944dbc643173400c5e4cac4dd4315ace28d6e937.tar.gz
cpython-944dbc643173400c5e4cac4dd4315ace28d6e937.tar.bz2
Use _PyDict_NewPresized() in _PyStack_AsDict()
Issue #27810.
-rw-r--r--Objects/abstract.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c
index 351c6eb..67b163d 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -2378,7 +2378,7 @@ _PyStack_AsDict(PyObject **values, PyObject *kwnames)
PyObject *kwdict;
Py_ssize_t i;
- kwdict = PyDict_New();
+ kwdict = _PyDict_NewPresized(nkwargs);
if (kwdict == NULL) {
return NULL;
}