-
Notifications
You must be signed in to change notification settings - Fork 402
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correct boundaries check for int; raise OverflowError for such cases
Since there is no error in a value representation and PyLong_AsLong(-Long) raises exactly that exception if the value exceed the destination range, it should be OverflowError instead of ValueError. Also make error message be similar to one from the original OverflowError raised by PyLong_AsLong.
- Loading branch information
1 parent
e082910
commit dfcf135
Showing
2 changed files
with
59 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters