Merge pull request #849 from ijl/dict-presized

_PyDict_NewPresized()
This commit is contained in:
Yuji Kanagawa 2020-04-07 11:59:25 +09:00 committed by GitHub
commit cffe7edf41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -69,6 +69,8 @@ pub unsafe fn PyDictViewSet_Check(op: *mut PyObject) -> c_int {
extern "C" { extern "C" {
#[cfg_attr(PyPy, link_name = "PyPyDict_New")] #[cfg_attr(PyPy, link_name = "PyPyDict_New")]
pub fn PyDict_New() -> *mut PyObject; pub fn PyDict_New() -> *mut PyObject;
#[cfg(not(PyPy))]
pub fn _PyDict_NewPresized(minused: Py_ssize_t) -> *mut PyObject;
#[cfg_attr(PyPy, link_name = "PyPyDict_GetItem")] #[cfg_attr(PyPy, link_name = "PyPyDict_GetItem")]
pub fn PyDict_GetItem(mp: *mut PyObject, key: *mut PyObject) -> *mut PyObject; pub fn PyDict_GetItem(mp: *mut PyObject, key: *mut PyObject) -> *mut PyObject;
pub fn PyDict_GetItemWithError(mp: *mut PyObject, key: *mut PyObject) -> *mut PyObject; pub fn PyDict_GetItemWithError(mp: *mut PyObject, key: *mut PyObject) -> *mut PyObject;