From 5ab81d787f455ba28367b5b71606cea376283574 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Fri, 16 Dec 2016 16:18:57 +0200 Subject: Issue #28959: Added private macro PyDict_GET_SIZE for retrieving the size of dict. --- Modules/_struct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Modules/_struct.c') diff --git a/Modules/_struct.c b/Modules/_struct.c index 1d7a935ac8..d621789d6b 100644 --- a/Modules/_struct.c +++ b/Modules/_struct.c @@ -2048,7 +2048,7 @@ cache_struct(PyObject *fmt) s_object = PyObject_CallFunctionObjArgs((PyObject *)(&PyStructType), fmt, NULL); if (s_object != NULL) { - if (PyDict_Size(cache) >= MAXCACHE) + if (PyDict_GET_SIZE(cache) >= MAXCACHE) PyDict_Clear(cache); /* Attempt to cache the result */ if (PyDict_SetItem(cache, fmt, s_object) == -1) -- cgit v1.2.1