mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-29865: Use PyXXX_GET_SIZE macros rather than Py_SIZE for concrete types. (#748)
This commit is contained in:
parent
c61ac1642d
commit
fff9a31a91
13 changed files with 35 additions and 32 deletions
|
@ -1654,7 +1654,7 @@ encoder_listencode_dict(PyEncoderObject *s, _PyAccu *acc,
|
|||
idx = 0;
|
||||
while ((item = PyIter_Next(it)) != NULL) {
|
||||
PyObject *encoded, *key, *value;
|
||||
if (!PyTuple_Check(item) || Py_SIZE(item) != 2) {
|
||||
if (!PyTuple_Check(item) || PyTuple_GET_SIZE(item) != 2) {
|
||||
PyErr_SetString(PyExc_ValueError, "items must return 2-tuples");
|
||||
goto bail;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue