From 766dd31a539ef8df187864c95999a4435f326c33 Mon Sep 17 00:00:00 2001 From: qsw333 Date: Fri, 26 Jul 2024 15:57:17 +0800 Subject: [PATCH] fix compilcation failed --- PAMmodule.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PAMmodule.c b/PAMmodule.c index a41d97b..7ca8fe0 100644 --- a/PAMmodule.c +++ b/PAMmodule.c @@ -674,8 +674,11 @@ void initPAM(void) if (PyPAM_Error == NULL) INITERROR; PyDict_SetItemString(d, "error", PyPAM_Error); - +#if PY_VERSION_HEX >= 0x030a00f0 + Py_SET_TYPE(&PyPAMObject_Type, &PyType_Type); +#else Py_TYPE(&PyPAMObject_Type) = &PyType_Type; +#endif PyPAMObject_Type.tp_doc = PyPAMObject_doc; Py_INCREF(&PyPAMObject_Type); -- 2.33.0