summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Burr <chrisburr@users.noreply.github.com>2020-07-28 08:11:02 +0200
committerGitHub <noreply@github.com>2020-07-28 08:11:02 +0200
commiteafe1e2daa9b712b29379fcd195c2ef22435b8e0 (patch)
tree67ba15304768cc97ba1aff6b72c5c13537db3c23
parent917110212e0820220ec28f651572fa9020372772 (diff)
downloadswig-eafe1e2daa9b712b29379fcd195c2ef22435b8e0.tar.gz
Use Py_TYPE in SwigPyBuiltin_SetMetaType
-rw-r--r--Lib/python/builtin.swg6
1 files changed, 1 insertions, 5 deletions
diff --git a/Lib/python/builtin.swg b/Lib/python/builtin.swg
index 3360b1320..4f31a8d54 100644
--- a/Lib/python/builtin.swg
+++ b/Lib/python/builtin.swg
@@ -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;
}