Skip to content

Commit 3a4cdc7

Browse files
Simplify type checks.
1 parent c268a50 commit 3a4cdc7

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Modules/clinic/_curses_panel.c.h

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Modules/clinic/_elementtree.c.h

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tools/clinic/clinic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2559,7 +2559,7 @@ def parse_arg(self, argname):
25592559
""".format(argname=argname, paramname=self.name,
25602560
typecheck=typecheck, typename=typename, cast=cast)
25612561
return """
2562-
if (!PyType_IsSubtype({argname}->ob_type, {subclass_of})) {{{{
2562+
if (!PyObject_TypeCheck({argname}, {subclass_of})) {{{{
25632563
_PyErr_BadArgument("{{name}}", ({subclass_of})->tp_name, {argname});
25642564
goto exit;
25652565
}}}}

0 commit comments

Comments
 (0)