Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Explicit cast #636
Tonight's PR deals with explicit casting to primitives. In Java casting will never produce an overflow error, thus we have replicated that behavior. Implicit conversions still produce OverflowError as per Python conventions. This was intended to be a very small pull request but unfortunately the casting operations required a different field for each type for proper sign convention which ran straight into the big bag of if statements in PyJPValue_create. Those if statements were replaced with logic in the convertToPythonObject methods which were already part of the system. A secondary bug with overflow from unsigned long was also deal with, but there may be an additional one with array assignments.
@@ Coverage Diff @@ ## master #636 +/- ## ======================================= Coverage 89.73% 89.73% ======================================= Files 24 24 Lines 1529 1529 ======================================= Hits 1372 1372 Misses 157 157