Skip to content

Commit 241da4c

Browse files
committed
Revert: medium_value
1 parent c359521 commit 241da4c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Objects/longobject.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ static inline stwodigits
3232
medium_value(PyLongObject *x)
3333
{
3434
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;
35+
return ((stwodigits)Py_SIZE(x)) * x->ob_digit[0];
3836
}
3937

4038
#define IS_SMALL_INT(ival) (-_PY_NSMALLNEGINTS <= (ival) && (ival) < _PY_NSMALLPOSINTS)

0 commit comments

Comments
 (0)