30 lines
707 B
Diff
30 lines
707 B
Diff
From 8d7bede5ac43fad34383c7a507fdf7f8fb6a5c68 Mon Sep 17 00:00:00 2001
|
|
From: Phil Thompson <phil@riverbankcomputing.com>
|
|
Date: Wed, 21 Jun 2023 14:38:45 +0200
|
|
Subject: [PATCH] For Python v3.12 implement sipPyTypeDict() using
|
|
PyType_GetDict().
|
|
|
|
---
|
|
sip_core.c | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
diff --git a/sip_core.c b/sip_core.c
|
|
index a51513f..7203bce 100644
|
|
--- a/sip_core.c
|
|
+++ b/sip_core.c
|
|
@@ -11112,7 +11112,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
|
|
|