aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/pymethoddefentry.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken6/ApiExtractor/pymethoddefentry.cpp')
-rw-r--r--sources/shiboken6/ApiExtractor/pymethoddefentry.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/sources/shiboken6/ApiExtractor/pymethoddefentry.cpp b/sources/shiboken6/ApiExtractor/pymethoddefentry.cpp
index 75ac227b8..64d44378b 100644
--- a/sources/shiboken6/ApiExtractor/pymethoddefentry.cpp
+++ b/sources/shiboken6/ApiExtractor/pymethoddefentry.cpp
@@ -6,10 +6,15 @@
#include <QtCore/QDebug>
+TextStream &operator<<(TextStream &str, const castToPyCFunction &c)
+{
+ str << "reinterpret_cast<PyCFunction>(" << c.m_function << ')';
+ return str;
+}
+
TextStream &operator<<(TextStream &s, const PyMethodDefEntry &e)
{
- s << "{\"" << e.name << "\", reinterpret_cast<PyCFunction>("
- << e.function << "), ";
+ s << "{\"" << e.name << "\", " << castToPyCFunction(e.function) <<", ";
if (e.methFlags.isEmpty()) {
s << '0';
} else {