[issue39573] [C API] Make PyObject an opaque structure in the limited C API

STINNER Victor report at bugs.python.org
Wed Jun 3 08:43:04 EDT 2020


STINNER Victor <vstinner at python.org> added the comment:

To port code to Python 3.10, the following macro can be copied/pasted in your code. It defines Py_SET_SIZE() if it's not defined.

#if PY_VERSION_HEX < 0x030900A4
#  define Py_SET_SIZE(obj, size) do { Py_SIZE(obj) = (size); } while (0)
#endif

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39573>
_______________________________________


More information about the Python-bugs-list mailing list