31 lines
851 B
Diff
31 lines
851 B
Diff
https://src.fedoraproject.org/rpms/python-wxpython4/raw/46eb04f8ac5674968bfa3def439a67a39301024e
|
|
From 162cb57b94ba441febe6e1733117aca645a909a4 Mon Sep 17 00:00:00 2001
|
|
From: Phil Thompson <phil@riverbankcomputing.com>
|
|
Date: Tue, 27 Jun 2023 11:36:18 +0200
|
|
Subject: [PATCH] For Python v3.12 implement sipPyTypeDict() using
|
|
PyType_GetDict().
|
|
|
|
---
|
|
sip/siplib/siplib.c | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
diff --git a/sip/siplib/siplib.c b/sip/siplib/siplib.c
|
|
index d4003e9f..a52da595 100644
|
|
--- a/sip/siplib/siplib.c
|
|
+++ b/sip/siplib/siplib.c
|
|
@@ -12597,7 +12597,11 @@ static void *sip_api_get_type_user_data(const sipWrapperType *wt)
|
|
*/
|
|
static PyObject *sip_api_py_type_dict(const PyTypeObject *py_type)
|
|
{
|
|
+#if PY_VERSION_HEX >= 0x030c0000
|
|
+ return PyType_GetDict(py_type);
|
|
+#else
|
|
return py_type->tp_dict;
|
|
+#endif
|
|
}
|
|
|
|
|
|
--
|
|
2.40.1
|
|
|