Merge pull request #1843 from chrisburr/patch-1

PyTypeObject::ob_base isn't available in PyPy
This commit is contained in:
William S Fulton 2020-07-29 21:49:50 +01:00 committed by GitHub
commit 46e17f1458
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
type->ob_base.ob_base.ob_type = metatype;
#else
type->ob_type = metatype;
#endif
Py_TYPE(type) = metatype;
}