summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Burr <chrisburr@users.noreply.github.com>2020-07-17 12:15:54 +0200
committerGitHub <noreply@github.com>2020-07-17 12:15:54 +0200
commit917110212e0820220ec28f651572fa9020372772 (patch)
treea1d965dfe6178cc31b90752443a7d41940bc885e
parentd967e4c8b8c9b243c472c359fb70bba2136a7d84 (diff)
downloadswig-917110212e0820220ec28f651572fa9020372772.tar.gz
PyTypeObject::ob_base isn't available in PyPy
-rw-r--r--Lib/python/builtin.swg2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/python/builtin.swg b/Lib/python/builtin.swg
index 5308748b7..3360b1320 100644
--- a/Lib/python/builtin.swg
+++ b/Lib/python/builtin.swg
@@ -414,7 +414,7 @@ SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) {
SWIGINTERN void
SwigPyBuiltin_SetMetaType (PyTypeObject *type, PyTypeObject *metatype)
{
-#if PY_VERSION_HEX >= 0x03000000
+#if PY_VERSION_HEX >= 0x03000000 && !defined(PYPY_VERSION)
type->ob_base.ob_base.ob_type = metatype;
#else
type->ob_type = metatype;