We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1f97c07 commit 3642ffeCopy full SHA for 3642ffe
2 files changed
iconvmodule.c
@@ -163,7 +163,13 @@ PyInit_iconv(void)
163
{
164
PyObject *m, *d;
165
166
- Py_TYPE(&Iconv_Type) = &PyType_Type;
+ #ifdef Py_SET_TYPE
167
+ // Available since python 3.9, required since python 3.11
168
+ Py_SET_TYPE(&Iconv_Type, &PyType_Type);
169
+ #else
170
+ // Fallback for python 3.6, 3.7 and 3.8
171
+ Py_TYPE(&Iconv_Type) = &PyType_Type;
172
+ #endif
173
if (PyType_Ready(&Iconv_Type) < 0) {
174
return NULL;
175
}
setup.py
@@ -2,7 +2,7 @@
2
3
setup(
4
name="python-iconv",
5
- version="1.1.1",
+ version="1.1.2",
6
description="iconv-based Unicode converter",
7
author="Bodo Graumann",
8
author_email="mail@bodograumann.de",
0 commit comments