|
@@ -507,7 +507,11 @@ static PyTypeObject MSGtype = {
|
|
|
|
|
|
int python_msgobj_init(void)
|
|
int python_msgobj_init(void)
|
|
{
|
|
{
|
|
|
|
+#if PY_VERSION_HEX >= 0x03090000
|
|
|
|
+ Py_SET_TYPE(&MSGtype, &PyType_Type);
|
|
|
|
+#else
|
|
Py_TYPE(&MSGtype) = &PyType_Type;
|
|
Py_TYPE(&MSGtype) = &PyType_Type;
|
|
|
|
+#endif
|
|
if (PyType_Ready(&MSGtype) < 0)
|
|
if (PyType_Ready(&MSGtype) < 0)
|
|
return -1;
|
|
return -1;
|
|
return 0;
|
|
return 0;
|