SIGN IN SIGN UP

bpo-39573: Convert Py_REFCNT and Py_SIZE to functions (GH-20429)

Convert Py_REFCNT() and Py_SIZE() macros to static inline functions.
They cannot be used as l-value anymore: use Py_SET_REFCNT() and
Py_SET_SIZE() to set an object reference count and size.

Replace &Py_SIZE(self) with &((PyVarObject*)self)->ob_size
in arraymodule.c.

This change is backward incompatible on purpose, to prepare the C API
for an opaque PyObject structure.
V
Victor Stinner committed
fe2978b3b940fe2478335e3a2ca5ad22338cdf9c
Parent: 20941de
Committed by GitHub <noreply@github.com> on 5/27/2020, 12:55:10 PM