diff options
author | Dong-hee Na <donghee.na92@gmail.com> | 2020-02-17 10:09:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-17 10:09:15 (GMT) |
commit | 1b55b65638254aa78b005fbf0b71fb02499f1852 (patch) | |
tree | 3c9a1a7b47443d75d73a57002ecb3a49ae88ce2c /Modules/_asynciomodule.c | |
parent | a7847590f07655e794d7c62130aea245a110acef (diff) | |
download | cpython-1b55b65638254aa78b005fbf0b71fb02499f1852.zip cpython-1b55b65638254aa78b005fbf0b71fb02499f1852.tar.gz cpython-1b55b65638254aa78b005fbf0b71fb02499f1852.tar.bz2 |
bpo-39573: Clean up modules and headers to use Py_IS_TYPE() function (GH-18521)
Diffstat (limited to 'Modules/_asynciomodule.c')
-rw-r--r-- | Modules/_asynciomodule.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_asynciomodule.c b/Modules/_asynciomodule.c index 5aea743..5674330 100644 --- a/Modules/_asynciomodule.c +++ b/Modules/_asynciomodule.c @@ -112,8 +112,8 @@ static PyTypeObject TaskType; static PyTypeObject PyRunningLoopHolder_Type; -#define Future_CheckExact(obj) (Py_TYPE(obj) == &FutureType) -#define Task_CheckExact(obj) (Py_TYPE(obj) == &TaskType) +#define Future_CheckExact(obj) Py_IS_TYPE(obj, &FutureType) +#define Task_CheckExact(obj) Py_IS_TYPE(obj, &TaskType) #define Future_Check(obj) PyObject_TypeCheck(obj, &FutureType) #define Task_Check(obj) PyObject_TypeCheck(obj, &TaskType) @@ -255,7 +255,7 @@ get_running_loop(PyObject **loop) cached_running_holder_tsid = ts->id; } - assert(Py_TYPE(rl) == &PyRunningLoopHolder_Type); + assert(Py_IS_TYPE(rl, &PyRunningLoopHolder_Type)); PyObject *running_loop = ((PyRunningLoopHolder *)rl)->rl_loop; if (running_loop == Py_None) { |