From b9d98d532cb9bdebff9854eaff91fea13769a595 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Fri, 2 Oct 2015 12:47:11 +0300 Subject: Issue #24483: C implementation of functools.lru_cache() now calculates key's hash only once. --- Include/dictobject.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Include/dictobject.h') diff --git a/Include/dictobject.h b/Include/dictobject.h index 320f9ecf8c..80bd330294 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); -- cgit v1.2.1