@@ -258,6 +258,18 @@ test_dict_iteration(PyObject* self, PyObject *Py_UNUSED(ignored))
258258}
259259
260260
261+ static PyObject *
262+ dict_newpresized (PyObject * self , PyObject * args )
263+ {
264+ Py_ssize_t size ;
265+ int unicode_keys ;
266+ if (!PyArg_ParseTuple (args , "ni" , & size , & unicode_keys )) {
267+ return NULL ;
268+ }
269+ return PyDict_NewPresized (size , unicode_keys );
270+ }
271+
272+
261273static PyMethodDef test_methods [] = {
262274 {"dict_containsstring" , dict_containsstring , METH_VARARGS },
263275 {"dict_getitemref" , dict_getitemref , METH_VARARGS },
@@ -268,7 +280,8 @@ static PyMethodDef test_methods[] = {
268280 {"dict_pop_null" , dict_pop_null , METH_VARARGS },
269281 {"dict_popstring" , dict_popstring , METH_VARARGS },
270282 {"dict_popstring_null" , dict_popstring_null , METH_VARARGS },
271- {"test_dict_iteration" , test_dict_iteration , METH_NOARGS },
283+ {"test_dict_iteration" , test_dict_iteration , METH_NOARGS },
284+ {"dict_newpresized" , dict_newpresized , METH_VARARGS },
272285 {NULL },
273286};
274287
0 commit comments