mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
gh-116869: Make C API compatible with ISO C90 (#116950)
Make the C API compatible with -Werror=declaration-after-statement compiler flag again.
This commit is contained in:
parent
590a26010d
commit
a9c304cf02
3 changed files with 5 additions and 3 deletions
|
|
@ -343,8 +343,7 @@ PyAPI_DATA(PyTypeObject) PyBool_Type;
|
|||
static inline Py_ssize_t Py_SIZE(PyObject *ob) {
|
||||
assert(ob->ob_type != &PyLong_Type);
|
||||
assert(ob->ob_type != &PyBool_Type);
|
||||
PyVarObject *var_ob = _PyVarObject_CAST(ob);
|
||||
return var_ob->ob_size;
|
||||
return _PyVarObject_CAST(ob)->ob_size;
|
||||
}
|
||||
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
|
||||
# define Py_SIZE(ob) Py_SIZE(_PyObject_CAST(ob))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue