Issue #28959: Added private macro PyDict_GET_SIZE for retrieving the size of dict.

This commit is contained in:
Serhiy Storchaka 2016-12-16 16:18:57 +02:00
parent 1d59a0aacf
commit 5ab81d787f
25 changed files with 61 additions and 80 deletions

View file

@ -3169,7 +3169,7 @@ tzinfo_reduce(PyObject *self)
PyErr_Clear();
state = Py_None;
dictptr = _PyObject_GetDictPtr(self);
if (dictptr && *dictptr && PyDict_Size(*dictptr)) {
if (dictptr && *dictptr && PyDict_GET_SIZE(*dictptr)) {
state = *dictptr;
}
Py_INCREF(state);