aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/libshiboken/pep384impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2/libshiboken/pep384impl.h')
-rw-r--r--sources/shiboken2/libshiboken/pep384impl.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/sources/shiboken2/libshiboken/pep384impl.h b/sources/shiboken2/libshiboken/pep384impl.h
index 78b9defb5..bfa8f38a7 100644
--- a/sources/shiboken2/libshiboken/pep384impl.h
+++ b/sources/shiboken2/libshiboken/pep384impl.h
@@ -333,10 +333,11 @@ LIBSHIBOKEN_API PyObject *PepFunction_Get(PyObject *, const char *);
#define PyFunction_Check(op) (Py_TYPE(op) == PepFunction_TypePtr)
#define PyFunction_GET_CODE(func) PyFunction_GetCode(func)
-#define PyFunction_GetCode(func) PepFunction_Get((PyObject *)func, "__code__")
-#define PepFunction_GetName(func) PepFunction_Get((PyObject *)func, "__name__")
+#define PyFunction_GetCode(func) PepFunction_Get((PyObject *)func, "__code__")
+#define PepFunction_GetName(func) PepFunction_Get((PyObject *)func, "__name__")
#else
-#define PepFunction_GetName(func) (((PyFunctionObject *)func)->func_name)
+#define PepFunction_TypePtr (&PyFunction_Type)
+#define PepFunction_GetName(func) (((PyFunctionObject *)func)->func_name)
#endif
/*****************************************************************************