Use Py_TYPE in SwigPyBuiltin_SetMetaType

This commit is contained in:
Chris Burr 2020-07-28 08:11:02 +02:00 committed by GitHub
commit eafe1e2daa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -414,11 +414,7 @@ SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) {
SWIGINTERN void
SwigPyBuiltin_SetMetaType (PyTypeObject *type, PyTypeObject *metatype)
{
#if PY_VERSION_HEX >= 0x03000000 && !defined(PYPY_VERSION)
type->ob_base.ob_base.ob_type = metatype;
#else
type->ob_type = metatype;
#endif
Py_TYPE(type) = metatype;
}