]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-99845: PEP 670: Convert PyObject macros to functions (#99850)
authorVictor Stinner <vstinner@python.org>
Wed, 30 Nov 2022 17:17:50 +0000 (18:17 +0100)
committerGitHub <noreply@github.com>
Wed, 30 Nov 2022 17:17:50 +0000 (18:17 +0100)
commit131801d14dfc4f0b2b79103612c88e2e282ff158
treeeb23947c6e423613b59a161d8fa9a3530362783c
parent85dd6cb6df996b1197266d1a50ecc9187a91e481
gh-99845: PEP 670: Convert PyObject macros to functions (#99850)

Convert macros to static inline functions to avoid macro pitfalls,
like duplication of side effects:

* _PyObject_SIZE()
* _PyObject_VAR_SIZE()

The result type is size_t (unsigned).
Include/cpython/objimpl.h