--- ./persistent/tests/test_timestamp.py.orig 2015-04-08 08:51:03.000000000 -0600 +++ ./persistent/tests/test_timestamp.py 2015-04-14 17:14:14.327905968 -0600 @@ -13,6 +13,7 @@ ############################################################################## import operator import unittest +from ctypes import c_long class Test__UTC(unittest.TestCase): @@ -269,24 +270,24 @@ class PyAndCComparisonTests(unittest.Tes self.assertEqual(hash(c), hash(py)) c, py = self._make_C_and_Py(b'\x00\x00\x00\x00\x00\x01\x00\x00') - self.assertEqual(hash(c), 1000006000001) + self.assertEqual(hash(c), c_long(1000006000001).value) self.assertEqual(hash(c), hash(py)) c, py = self._make_C_and_Py(b'\x00\x00\x00\x00\x01\x00\x00\x00') - self.assertEqual(hash(c), 1000009000027000019) + self.assertEqual(hash(c), c_long(1000009000027000019).value) self.assertEqual(hash(c), hash(py)) # Overflow kicks in at this point c, py = self._make_C_and_Py(b'\x00\x00\x00\x01\x00\x00\x00\x00') - self.assertEqual(hash(c), -4442925868394654887) + self.assertEqual(hash(c), c_long(-4442925868394654887).value) self.assertEqual(hash(c), hash(py)) c, py = self._make_C_and_Py(b'\x00\x00\x01\x00\x00\x00\x00\x00') - self.assertEqual(hash(c), -3993531167153147845) + self.assertEqual(hash(c), c_long(-3993531167153147845).value) self.assertEqual(hash(c), hash(py)) c, py = self._make_C_and_Py(b'\x01\x00\x00\x00\x00\x00\x00\x00') - self.assertEqual(hash(c), -3099646879006235965) + self.assertEqual(hash(c), c_long(-3099646879006235965).value) self.assertEqual(hash(c), hash(py)) def test_ordering(self): --- ./persistent/timestamp.py.orig 2015-04-08 08:47:04.000000000 -0600 +++ ./persistent/timestamp.py 2015-04-14 17:13:34.247960122 -0600 @@ -13,7 +13,7 @@ ############################################################################## __all__ = ('TimeStamp',) -from ctypes import c_int64 +from ctypes import c_long import datetime import math import struct @@ -158,7 +158,7 @@ class pyTimeStamp(object): # Make sure to overflow and wraparound just # like the C code does. - x = c_int64(x).value + x = c_long(x).value if x == -1: #pragma: no cover # The C version has this condition, but it's not clear # why; it's also not immediately obvious what bytestring