diff options
author | shadchin <shadchin@yandex-team.com> | 2024-02-12 07:53:52 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@ydb.tech> | 2024-02-14 14:26:16 +0000 |
commit | 31f2a419764a8ba77c2a970cfc80056c6cd06756 (patch) | |
tree | c1995d239eba8571cefc640f6648e1d5dd4ce9e2 /contrib/tools/python3/src/Include/cpython/methodobject.h | |
parent | fe2ef02b38d9c85d80060963b265a1df9f38c3bb (diff) | |
download | ydb-31f2a419764a8ba77c2a970cfc80056c6cd06756.tar.gz |
Update Python from 3.11.8 to 3.12.2
Diffstat (limited to 'contrib/tools/python3/src/Include/cpython/methodobject.h')
-rw-r--r-- | contrib/tools/python3/src/Include/cpython/methodobject.h | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/contrib/tools/python3/src/Include/cpython/methodobject.h b/contrib/tools/python3/src/Include/cpython/methodobject.h index 54a61cfd07..d541e15494 100644 --- a/contrib/tools/python3/src/Include/cpython/methodobject.h +++ b/contrib/tools/python3/src/Include/cpython/methodobject.h @@ -31,8 +31,8 @@ typedef struct { PyAPI_DATA(PyTypeObject) PyCMethod_Type; -#define PyCMethod_CheckExact(op) Py_IS_TYPE(op, &PyCMethod_Type) -#define PyCMethod_Check(op) PyObject_TypeCheck(op, &PyCMethod_Type) +#define PyCMethod_CheckExact(op) Py_IS_TYPE((op), &PyCMethod_Type) +#define PyCMethod_Check(op) PyObject_TypeCheck((op), &PyCMethod_Type) /* Static inline functions for direct access to these values. @@ -40,9 +40,7 @@ PyAPI_DATA(PyTypeObject) PyCMethod_Type; static inline PyCFunction PyCFunction_GET_FUNCTION(PyObject *func) { return _PyCFunctionObject_CAST(func)->m_ml->ml_meth; } -#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000 -# define PyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(_PyObject_CAST(func)) -#endif +#define PyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(_PyObject_CAST(func)) static inline PyObject* PyCFunction_GET_SELF(PyObject *func_obj) { PyCFunctionObject *func = _PyCFunctionObject_CAST(func_obj); @@ -51,16 +49,12 @@ static inline PyObject* PyCFunction_GET_SELF(PyObject *func_obj) { } return func->m_self; } -#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000 -# define PyCFunction_GET_SELF(func) PyCFunction_GET_SELF(_PyObject_CAST(func)) -#endif +#define PyCFunction_GET_SELF(func) PyCFunction_GET_SELF(_PyObject_CAST(func)) static inline int PyCFunction_GET_FLAGS(PyObject *func) { return _PyCFunctionObject_CAST(func)->m_ml->ml_flags; } -#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000 -# define PyCFunction_GET_FLAGS(func) PyCFunction_GET_FLAGS(_PyObject_CAST(func)) -#endif +#define PyCFunction_GET_FLAGS(func) PyCFunction_GET_FLAGS(_PyObject_CAST(func)) static inline PyTypeObject* PyCFunction_GET_CLASS(PyObject *func_obj) { PyCFunctionObject *func = _PyCFunctionObject_CAST(func_obj); @@ -69,6 +63,4 @@ static inline PyTypeObject* PyCFunction_GET_CLASS(PyObject *func_obj) { } return _Py_NULL; } -#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000 -# define PyCFunction_GET_CLASS(func) PyCFunction_GET_CLASS(_PyObject_CAST(func)) -#endif +#define PyCFunction_GET_CLASS(func) PyCFunction_GET_CLASS(_PyObject_CAST(func)) |