prevent warnings when compiling with `gcc -Wextra`
The PyInt conversion functions generate two warnings when compiled under `gcc -Wall -Wextra`: 1. comparison of unsigned expression < 0 is always false 2. signed and unsigned type in conditional expression This patch fixes these problems by creating a new temporary variable `is_unsigned`, which fixes problem 1, and by converting the ternary return expression into a normal if/else branch, which fixes problem 2.
Showing
Please register or sign in to comment