• Mark Lodato's avatar
    prevent warnings when compiling with `gcc -Wextra` · dabef9db
    Mark Lodato authored
    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.
    dabef9db
PyrexTypes.py 72.7 KB