diff options
Diffstat (limited to 'Include/cpython/methodobject.h')
| -rw-r--r-- | Include/cpython/methodobject.h | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/Include/cpython/methodobject.h b/Include/cpython/methodobject.h index 54a61cf..eac9e08 100644 --- a/Include/cpython/methodobject.h +++ b/Include/cpython/methodobject.h @@ -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)) |
