mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #28959: Added private macro PyDict_GET_SIZE for retrieving the size of dict.
This commit is contained in:
parent
1d59a0aacf
commit
5ab81d787f
25 changed files with 61 additions and 80 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue