aboutsummaryrefslogtreecommitdiff
path: root/Python/errors.c
diff options
context:
space:
mode:
authorAndy Lester <andy@petdance.com>2020-03-06 16:53:17 -0600
committerGitHub <noreply@github.com>2020-03-06 23:53:17 +0100
commit557287075c264d2458cd3e1b45e9b8ee5341e0a1 (patch)
tree6c34331fdbf74476b60b1e32972e360af4985ab6 /Python/errors.c
parente59334ebc9308b0f3ad048ef293c6b49e6456d1a (diff)
downloadcpython3-557287075c264d2458cd3e1b45e9b8ee5341e0a1.tar.gz
bpo-39573: Use Py_IS_TYPE() macro to check for types (GH-18809)
Co-authored-by: Victor Stinner <vstinner@python.org>
Diffstat (limited to 'Python/errors.c')
-rw-r--r--Python/errors.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/errors.c b/Python/errors.c
index 6baa229ccc..4656fb2a33 100644
--- a/Python/errors.c
+++ b/Python/errors.c
@@ -1321,7 +1321,7 @@ _PyErr_WriteUnraisableDefaultHook(PyObject *args)
{
PyThreadState *tstate = _PyThreadState_GET();
- if (Py_TYPE(args) != &UnraisableHookArgsType) {
+ if (!Py_IS_TYPE(args, &UnraisableHookArgsType)) {
_PyErr_SetString(tstate, PyExc_TypeError,
"sys.unraisablehook argument type "
"must be UnraisableHookArgs");