aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/libshiboken/signature/signature_extend.cpp
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2021-04-18 18:58:18 +0200
committerChristian Tismer <tismer@stackless.com>2021-11-19 14:53:57 +0100
commit4805d04ec67e215dfe9c6384b73a3c59e0f53a68 (patch)
treebb57930ad5a0c9b37cc683562e1165632e58093f /sources/shiboken6/libshiboken/signature/signature_extend.cpp
parent318cd6643c051c931c95ee094bbff31d49811002 (diff)
PyPySide: Replace type patching, but not by heaptype, 2-5(5)
PyPy does not allow patching of non-heaptypes. We did that trick for simplicity in the signature module where we created a `__signature__` attribute for types. Type patching of `PyType_Type` needed a few things, only, because our types are already heaptypes. The plan was originally to also replace the type patching of * PyMethodDescr_Type * PyCFunction_Type * PyStaticMethod_Type * PyWrapperDescr_Type Actually, it is much easier to stop touching these types at all. Instead, we use the `get_signature` function in all test cases. [ChangeLog][shiboken6] Type patching of builtin types is not possible in PyPy. We use the `get_signature` function, instead for now. Task-number: PYSIDE-535 Change-Id: I0cb892872a3497ac1fcc67c913d05ba42d75014d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/shiboken6/libshiboken/signature/signature_extend.cpp')
-rw-r--r--sources/shiboken6/libshiboken/signature/signature_extend.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/sources/shiboken6/libshiboken/signature/signature_extend.cpp b/sources/shiboken6/libshiboken/signature/signature_extend.cpp
index b60b20b7a..298f31b55 100644
--- a/sources/shiboken6/libshiboken/signature/signature_extend.cpp
+++ b/sources/shiboken6/libshiboken/signature/signature_extend.cpp
@@ -223,6 +223,8 @@ static int pyside_set___signature__(PyObject *op, PyObject *value)
return ret;
}
+// PYSIDE-535: We cannot patch types easily in PyPy.
+// Let's use the `get_signature` function, instead.
static PyGetSetDef new_PyCFunction_getsets[] = {
{const_cast<char *>("__doc__"), reinterpret_cast<getter>(pyside_cf_get___doc__),
nullptr, nullptr, nullptr},