Merge pull request #2116 from vstinner/python311
Add Python 3.11 support: use Py_SET_TYPE()
This commit is contained in:
commit
7246cfa6c6
1 changed files with 4 additions and 0 deletions
|
|
@ -414,7 +414,11 @@ SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) {
|
|||
SWIGINTERN void
|
||||
SwigPyBuiltin_SetMetaType (PyTypeObject *type, PyTypeObject *metatype)
|
||||
{
|
||||
#if PY_VERSION_HEX >= 0x030900A4
|
||||
Py_SET_TYPE(type, metatype);
|
||||
#else
|
||||
Py_TYPE(type) = metatype;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue