Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r1405:ec61ea587ec6 Date: 2013-11-09 23:29 +0100 http://bitbucket.org/cffi/cffi/changeset/ec61ea587ec6/
Log: Test and fix: a remaining deadlock diff --git a/cffi/vengine_gen.py b/cffi/vengine_gen.py --- a/cffi/vengine_gen.py +++ b/cffi/vengine_gen.py @@ -393,7 +393,8 @@ negative = function(p) value = int(p[0]) if value < 0 and not negative: - value += (1 << (8*self.ffi.sizeof("long long"))) + BLongLong = self.ffi._typeof_locked("long long")[0] + value += (1 << (8*self.ffi.sizeof(BLongLong))) else: BFunc = self.ffi._typeof_locked(tp.get_c_name('(*)(void)', name))[0] function = module.load_function(BFunc, funcname) diff --git a/testing/test_verify.py b/testing/test_verify.py --- a/testing/test_verify.py +++ b/testing/test_verify.py @@ -707,11 +707,14 @@ def test_define_int(): ffi = FFI() ffi.cdef("#define FOO ...\n" - "\t#\tdefine\tBAR\t...\t") + "\t#\tdefine\tBAR\t...\t\n" + "#define BAZ ...\n") lib = ffi.verify("#define FOO 42\n" - "#define BAR (-44)\n") + "#define BAR (-44)\n" + "#define BAZ 0xffffffffffffffffLL\n") assert lib.FOO == 42 assert lib.BAR == -44 + assert lib.BAZ == 0xffffffffffffffff def test_access_variable(): ffi = FFI() _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit