mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-39573: Use Py_IS_TYPE() macro to check for types (GH-18809)
Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
e59334ebc9
commit
557287075c
10 changed files with 15 additions and 17 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue