diff options
| -rw-r--r-- | sources/shiboken6/libshiboken/pep384impl.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sources/shiboken6/libshiboken/pep384impl.h b/sources/shiboken6/libshiboken/pep384impl.h index cf4e9f8f2..35204d1c7 100644 --- a/sources/shiboken6/libshiboken/pep384impl.h +++ b/sources/shiboken6/libshiboken/pep384impl.h @@ -277,7 +277,8 @@ using PyCFunctionObject = struct _pycfunc; #define PepCFunction_GET_NAMESTR(func) \ _PepUnicode_AsString(PyObject_GetAttrString((PyObject *)func, "__name__")) #else -#define PepCFunction_GET_NAMESTR(func) ((func)->m_ml->ml_name) +#define PepCFunction_GET_NAMESTR(func) \ + (reinterpret_cast<const PyCFunctionObject *>(func)->m_ml->ml_name) #endif /***************************************************************************** |
