Commit da191732 authored by Stefan Behnel's avatar Stefan Behnel

Apply some type casts for safety.

parent 52097ca3
...@@ -761,11 +761,11 @@ static CYTHON_INLINE {{c_ret_type}} __Pyx_PyInt_{{'' if ret_type.is_pyobject els ...@@ -761,11 +761,11 @@ static CYTHON_INLINE {{c_ret_type}} __Pyx_PyInt_{{'' if ret_type.is_pyobject els
{{for _size in range(4, 1, -1)}} {{for _size in range(4, 1, -1)}}
#if PyLong_SHIFT * {{_size}} < SIZEOF_LONG*8 #if PyLong_SHIFT * {{_size}} < SIZEOF_LONG*8
else if (uintval >= {{_size-1}}UL * (unsigned long) PyLong_BASE) else if (uintval >= {{_size-1}}UL * (unsigned long) PyLong_BASE)
unequal = (size != {{_size}}) || (digits[0] != (uintval & PyLong_MASK)) unequal = (size != {{_size}}) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
{{for _i in range(1, _size)}} | (digits[{{_i}}] != ((uintval >> ({{_i}} * PyLong_SHIFT)) & PyLong_MASK)){{endfor}}; {{for _i in range(1, _size)}} | (digits[{{_i}}] != ((uintval >> ({{_i}} * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)){{endfor}};
#endif #endif
{{endfor}} {{endfor}}
else unequal = (size != 1) || (digits[0] != (uintval & PyLong_MASK)); else unequal = (size != 1) || (digits[0] != (uintval & (unsigned long) PyLong_MASK));
{{return_compare('unequal', '0', c_op)}} {{return_compare('unequal', '0', c_op)}}
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment