Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5394bf9

Browse filesBrowse files
authored
gh-94673: Ensure subtypes are readied only once in math.trunc() (gh-105465)
Fixes a typo in d2e2e53.
1 parent fbdee00 commit 5394bf9
Copy full SHA for 5394bf9

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎Modules/mathmodule.c

Copy file name to clipboardExpand all lines: Modules/mathmodule.c
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2067,7 +2067,7 @@ math_trunc(PyObject *module, PyObject *x)
20672067
return PyFloat_Type.tp_as_number->nb_int(x);
20682068
}
20692069

2070-
if (_PyType_IsReady(Py_TYPE(x))) {
2070+
if (!_PyType_IsReady(Py_TYPE(x))) {
20712071
if (PyType_Ready(Py_TYPE(x)) < 0)
20722072
return NULL;
20732073
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.