gh-116869: Make C API compatible with ISO C90 (#116950) · python/cpython@a9c304c · GitHub
Skip to content

Commit a9c304c

Browse files
authored
gh-116869: Make C API compatible with ISO C90 (#116950)
Make the C API compatible with -Werror=declaration-after-statement compiler flag again.
1 parent 590a260 commit a9c304c

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

Include/cpython/longintrepr.h

Lines changed: 2 additions & 1 deletion

Include/object.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,7 @@ PyAPI_DATA(PyTypeObject) PyBool_Type;
343343
static inline Py_ssize_t Py_SIZE(PyObject *ob) {
344344
assert(ob->ob_type != &PyLong_Type);
345345
assert(ob->ob_type != &PyBool_Type);
346-
PyVarObject *var_ob = _PyVarObject_CAST(ob);
347-
return var_ob->ob_size;
346+
return _PyVarObject_CAST(ob)->ob_size;
348347
}
349348
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
350349
# define Py_SIZE(ob) Py_SIZE(_PyObject_CAST(ob))
Lines changed: 2 additions & 0 deletions

0 commit comments

Comments
 (0)