diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-10-02 09:47:11 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-10-02 09:47:11 (GMT) |
commit | b9d98d532cb9bdebff9854eaff91fea13769a595 (patch) | |
tree | 5903bef16674011ec23f91dc4abccaf54777b23e /Include | |
parent | c9fda9b903dc85be334e588b4be784e878248905 (diff) | |
download | cpython-b9d98d532cb9bdebff9854eaff91fea13769a595.zip cpython-b9d98d532cb9bdebff9854eaff91fea13769a595.tar.gz cpython-b9d98d532cb9bdebff9854eaff91fea13769a595.tar.bz2 |
Issue #24483: C implementation of functools.lru_cache() now calculates key's
hash only once.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/dictobject.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Include/dictobject.h b/Include/dictobject.h index 320f9ec..80bd330 100644 --- a/Include/dictobject.h +++ b/Include/dictobject.h @@ -72,6 +72,10 @@ PyAPI_FUNC(int) _PyDict_SetItem_KnownHash(PyObject *mp, PyObject *key, PyObject *item, Py_hash_t hash); #endif PyAPI_FUNC(int) PyDict_DelItem(PyObject *mp, PyObject *key); +#ifndef Py_LIMITED_API +PyAPI_FUNC(int) _PyDict_DelItem_KnownHash(PyObject *mp, PyObject *key, + Py_hash_t hash); +#endif PyAPI_FUNC(void) PyDict_Clear(PyObject *mp); PyAPI_FUNC(int) PyDict_Next( PyObject *mp, Py_ssize_t *pos, PyObject **key, PyObject **value); |