aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/libshiboken/basewrapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken6/libshiboken/basewrapper.cpp')
-rw-r--r--sources/shiboken6/libshiboken/basewrapper.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/sources/shiboken6/libshiboken/basewrapper.cpp b/sources/shiboken6/libshiboken/basewrapper.cpp
index d33ec63e0..a467abbc6 100644
--- a/sources/shiboken6/libshiboken/basewrapper.cpp
+++ b/sources/shiboken6/libshiboken/basewrapper.cpp
@@ -261,6 +261,9 @@ static PyType_Spec SbkObject_Type_spec = {
SbkObject_Type_slots,
};
+static const char *SbkObject_SignatureStrings[] = {
+ "Shiboken.Object(self)",
+ nullptr}; // Sentinel
SbkObjectType *SbkObject_TypeF(void)
{
@@ -881,6 +884,17 @@ void init()
shibokenAlreadInitialised = true;
}
+// PYSIDE-1415: Publish Shiboken objects.
+void initSignature(PyObject *module)
+{
+ auto type = reinterpret_cast<PyTypeObject *>(SbkObject_TypeF());
+ if (InitSignatureStrings(type, SbkObject_SignatureStrings) < 0)
+ return;
+
+ Py_INCREF(SbkObject_TypeF());
+ PyModule_AddObject(module, "Object", reinterpret_cast<PyObject *>(SbkObject_TypeF()));
+}
+
// setErrorAboutWrongArguments now gets overload info from the signature module.
// Info can be nullptr and contains extra info.
void setErrorAboutWrongArguments(PyObject *args, const char *funcName, PyObject *info)