[pypy-commit] pypy default: change macro for cpython compatibility, fixes #2819
mattip
pypy.commits at gmail.com
Thu May 3 11:57:54 EDT 2018
Author: Matti Picus <matti.picus at gmail.com>
Branch:
Changeset: r94465:0525720a751e
Date: 2018-05-03 18:57 +0300
http://bitbucket.org/pypy/pypy/changeset/0525720a751e/
Log: change macro for cpython compatibility, fixes #2819
diff --git a/pypy/module/cpyext/include/object.h b/pypy/module/cpyext/include/object.h
--- a/pypy/module/cpyext/include/object.h
+++ b/pypy/module/cpyext/include/object.h
@@ -333,7 +333,7 @@
} while (0)
#define PyObject_TypeCheck(ob, tp) \
- ((ob)->ob_type == (tp) || PyType_IsSubtype((ob)->ob_type, (tp)))
+ (Py_TYPE(ob) == (tp) || PyType_IsSubtype(Py_TYPE(ob), (tp)))
#define Py_TRASHCAN_SAFE_BEGIN(pyObj) do {
#define Py_TRASHCAN_SAFE_END(pyObj) ; } while(0);
More information about the pypy-commit
mailing list