diff options
author | Erlend E. Aasland <erlend.aasland@protonmail.com> | 2023-01-31 20:42:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-31 20:42:03 (GMT) |
commit | 2753cf2ed6eb329bdc34b8f67228801182b82160 (patch) | |
tree | b1fa68edc115a6bf451d44e49319a7ba0452de5a /Modules/clinic/selectmodule.c.h | |
parent | 0062f538d937de55cf3b66b4a8d527b1fe9d5182 (diff) | |
download | cpython-2753cf2ed6eb329bdc34b8f67228801182b82160.zip cpython-2753cf2ed6eb329bdc34b8f67228801182b82160.tar.gz cpython-2753cf2ed6eb329bdc34b8f67228801182b82160.tar.bz2 |
gh-101409: Improve generated clinic code for self type checks (#101411)
Diffstat (limited to 'Modules/clinic/selectmodule.c.h')
-rw-r--r-- | Modules/clinic/selectmodule.c.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Modules/clinic/selectmodule.c.h b/Modules/clinic/selectmodule.c.h index fda9aaa..f44ca1d 100644 --- a/Modules/clinic/selectmodule.c.h +++ b/Modules/clinic/selectmodule.c.h @@ -1061,14 +1061,13 @@ static PyObject * select_kqueue(PyTypeObject *type, PyObject *args, PyObject *kwargs) { PyObject *return_value = NULL; + PyTypeObject *base_tp = _selectstate_by_type(type)->kqueue_queue_Type; - if ((type == _selectstate_by_type(type)->kqueue_queue_Type || - type->tp_init == _selectstate_by_type(type)->kqueue_queue_Type->tp_init) && + if ((type == base_tp || type->tp_init == base_tp->tp_init) && !_PyArg_NoPositional("kqueue", args)) { goto exit; } - if ((type == _selectstate_by_type(type)->kqueue_queue_Type || - type->tp_init == _selectstate_by_type(type)->kqueue_queue_Type->tp_init) && + if ((type == base_tp || type->tp_init == base_tp->tp_init) && !_PyArg_NoKeywords("kqueue", kwargs)) { goto exit; } @@ -1310,4 +1309,4 @@ exit: #ifndef SELECT_KQUEUE_CONTROL_METHODDEF #define SELECT_KQUEUE_CONTROL_METHODDEF #endif /* !defined(SELECT_KQUEUE_CONTROL_METHODDEF) */ -/*[clinic end generated code: output=9556c7d6cd5192d1 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=64516114287e894d input=a9049054013a1b77]*/ |