mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +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
|
@ -822,7 +822,7 @@ bytesio_setstate(bytesio *self, PyObject *state)
|
|||
/* We allow the state tuple to be longer than 3, because we may need
|
||||
someday to extend the object's state without breaking
|
||||
backward-compatibility. */
|
||||
if (!PyTuple_Check(state) || Py_SIZE(state) < 3) {
|
||||
if (!PyTuple_Check(state) || PyTuple_GET_SIZE(state) < 3) {
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"%.200s.__setstate__ argument should be 3-tuple, got %.200s",
|
||||
Py_TYPE(self)->tp_name, Py_TYPE(state)->tp_name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue