8000 tighten guard · python/cpython@32c68ae · GitHub
[go: up one dir, main page]

Skip to content

Commit 32c68ae

Browse files
committed
tighten guard
1 parent 004dce0 commit 32c68ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/specialize.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2475,7 +2475,7 @@ shift_guard(PyObject *lhs, PyObject *rhs)
24752475

24762476
// rshift with value larger the the number of bits is undefined in C
24772477
// for lshift we do not want to overflow, but we always have at least 16 bits available
2478-
return (is_compactlong(lhs) && is_compactnonnegativelong(rhs) && (_PyLong_CompactValue((PyLongObject *)rhs) <= 16) );
2478+
return (is_compactlong(lhs) && is_compactnonnegativelong(rhs) && (_PyLong_CompactValue((PyLongObject *)rhs) <= 12) );
24792479
}
24802480

24812481
#define BITWISE_LONGS_ACTION(NAME, OP) \

0 commit comments

Comments
 (0)
0