diff options
| author | Victor Stinner <vstinner@python.org> | 2022-06-13 18:09:40 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-13 18:09:40 (GMT) |
| commit | df22eec4215e515e36e387b9022fb8ca95fd39af (patch) | |
| tree | 4ffe387870208583adfa22ab275ba72dcdbea1c5 /Include/cpython/bytesobject.h | |
| parent | c2007573dd449ae054f9fd5227e49ac9eef00ae8 (diff) | |
| download | cpython-df22eec4215e515e36e387b9022fb8ca95fd39af.zip cpython-df22eec4215e515e36e387b9022fb8ca95fd39af.tar.gz cpython-df22eec4215e515e36e387b9022fb8ca95fd39af.tar.bz2 | |
gh-89653: PEP 670: Macros always cast arguments in cpython/ (#93766)
Header files in the Include/cpython/ are only included if
the Py_LIMITED_API macro is not defined.
Diffstat (limited to 'Include/cpython/bytesobject.h')
| -rw-r--r-- | Include/cpython/bytesobject.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Include/cpython/bytesobject.h b/Include/cpython/bytesobject.h index 5334366..e982031 100644 --- a/Include/cpython/bytesobject.h +++ b/Include/cpython/bytesobject.h @@ -36,17 +36,13 @@ static inline char* PyBytes_AS_STRING(PyObject *op) { return _PyBytes_CAST(op)->ob_sval; } -#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000 -# define PyBytes_AS_STRING(op) PyBytes_AS_STRING(_PyObject_CAST(op)) -#endif +#define PyBytes_AS_STRING(op) PyBytes_AS_STRING(_PyObject_CAST(op)) static inline Py_ssize_t PyBytes_GET_SIZE(PyObject *op) { PyBytesObject *self = _PyBytes_CAST(op); return Py_SIZE(self); } -#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000 -# define PyBytes_GET_SIZE(self) PyBytes_GET_SIZE(_PyObject_CAST(self)) -#endif +#define PyBytes_GET_SIZE(self) PyBytes_GET_SIZE(_PyObject_CAST(self)) /* _PyBytes_Join(sep, x) is like sep.join(x). sep must be PyBytesObject*, x must be an iterable object. */ |
