We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c359521 commit 241da4cCopy full SHA for 241da4c
Objects/longobject.c
@@ -32,9 +32,7 @@ static inline stwodigits
32
medium_value(PyLongObject *x)
33
{
34
assert(IS_MEDIUM_VALUE(x));
35
- Py_ssize_t s = Py_SIZE(x);
36
- stwodigits d = x->ob_digit[0];
37
- return s == 1 ? d : s == -1 ? -d : 0;
+ return ((stwodigits)Py_SIZE(x)) * x->ob_digit[0];
38
}
39
40
#define IS_SMALL_INT(ival) (-_PY_NSMALLNEGINTS <= (ival) && (ival) < _PY_NSMALLPOSINTS)
0 commit comments