Python3 ready. Py2.7 and Py3 working. Drop PyCObject for all.

Pre Py2.7 support should be possible by including  "capsulethunk.h". (See llvm/wrap.h)
This commit is contained in:
Siu Kwan Lam 2012-07-26 15:25:23 -07:00
commit 9aadd489c3
14 changed files with 163 additions and 1142 deletions

View file

@ -193,7 +193,7 @@ class TestConstants(unittest.TestCase):
# check result
for result, golden in zip(results, values):
self.assertEqual(result, golden)
self.assertEqual(result.decode(), golden)
def test_const_struct(self):
from random import randint, random
@ -201,7 +201,7 @@ class TestConstants(unittest.TestCase):
(0, 0., 0.),
(-1, -1., -1.),
(1, 1., 1.),
] + [(randint(0, 0xffffffff), random(), random()) for _ in xrange(100)]
] + [(randint(0, 0xffffffff), random(), random()) for _ in range(100)]
struct_type = Type.struct([Type.int(), Type.float(), Type.double()])
@ -260,7 +260,7 @@ class TestConstants(unittest.TestCase):
(0, 0, 0, 0),
(1, 1, 1, 1),
(-1, -1, -1, -1),
] + [ (randgen(), randgen(), randgen(), randgen()) for _ in xrange(100) ]
] + [ (randgen(), randgen(), randgen(), randgen()) for _ in range(100) ]
def map_constant(packed_values):
consts = [ Constant.int(Type.int(), i) for i in packed_values ]