Commit 821bc179 authored by Stefan Behnel's avatar Stefan Behnel

test 'unsigned long' also against 8**sizeof(unsigned long) - 1

parent fa3fc1d8
...@@ -14,9 +14,15 @@ __doc__ = """ ...@@ -14,9 +14,15 @@ __doc__ = """
2147483648L 2147483648L
>>> test(sys.maxint * 2 + 1) >>> test(sys.maxint * 2 + 1)
4294967295L 4294967295L
>>> test(8 ** unsigned_long_size() - 1) > sys.maxint
True
""" """
def test(k): def test(k):
cdef unsigned long m cdef unsigned long m
m = k m = k
return m return m
def unsigned_long_size():
return sizeof(unsigned long)
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