[Python-checkins] cpython: Use _PyDict_NewPresized() in _PyStack_AsDict()
victor.stinner
python-checkins at python.org
Thu Dec 15 11:02:19 EST 2016
https://hg.python.org/cpython/rev/ecd218c41cd4
changeset: 105642:ecd218c41cd4
user: Victor Stinner <victor.stinner at gmail.com>
date: Thu Dec 15 16:59:40 2016 +0100
summary:
Use _PyDict_NewPresized() in _PyStack_AsDict()
Issue #27810.
files:
Objects/abstract.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Objects/abstract.c b/Objects/abstract.c
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -2378,7 +2378,7 @@
PyObject *kwdict;
Py_ssize_t i;
- kwdict = PyDict_New();
+ kwdict = _PyDict_NewPresized(nkwargs);
if (kwdict == NULL) {
return NULL;
}
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list