◐ Shell
clean mode source ↗

bpo-2897: Make PyMemberDef part of stable ABI; deprecate structmember.h by MatzeB · Pull Request #20462 · python/cpython

Move PyMemberDef and related flags from structmember.h to descrobject.h.
Rename READONLY to PY_READONLY and READ_RESTRICTED to
PY_READ_RESTRICTED. This makes the structure part of the stable ABI.

Move PyMember_GetOne and PyMemberSetOne as well but do not make them
part of the stable ABI yet.

Document that structmember.h is deprecated, change examples and
documentation and add definitions for READONLY, READ_RESTRICTED,
PY_WRITE_RESTRICTED and RESTRICTED to it for backwards compatibility.

Add check for stddef.h to configure.ac because we need to include it for
offsetof and Python.h does not pass the HAVE_STDDEF_H check without it.

@tiran tiran removed their request for review

April 17, 2021 21:23