Author: Armin Rigo <[email protected]>
Branch:
Changeset: r90648:c98863bd0296
Date: 2017-03-13 14:40 +0100
http://bitbucket.org/pypy/pypy/changeset/c98863bd0296/
Log: import cffi/3bea1a98c958
diff --git a/pypy/module/test_lib_pypy/cffi_tests/cffi0/backend_tests.py
b/pypy/module/test_lib_pypy/cffi_tests/cffi0/backend_tests.py
--- a/pypy/module/test_lib_pypy/cffi_tests/cffi0/backend_tests.py
+++ b/pypy/module/test_lib_pypy/cffi_tests/cffi0/backend_tests.py
@@ -1231,7 +1231,8 @@
def test_ffi_buffer_comparisons(self):
ffi = FFI(backend=self.Backend())
ba = bytearray(range(100, 110))
- assert ba == memoryview(ba) # justification for the following
+ if sys.version_info >= (2, 7):
+ assert ba == memoryview(ba) # justification for the following
a = ffi.new("uint8_t[]", list(ba))
c = ffi.new("uint8_t[]", [99] + list(ba))
try:
diff --git a/pypy/module/test_lib_pypy/cffi_tests/cffi1/test_recompiler.py
b/pypy/module/test_lib_pypy/cffi_tests/cffi1/test_recompiler.py
--- a/pypy/module/test_lib_pypy/cffi_tests/cffi1/test_recompiler.py
+++ b/pypy/module/test_lib_pypy/cffi_tests/cffi1/test_recompiler.py
@@ -2040,7 +2040,7 @@
struct foo s = { 40, 200 };
return s;
}
- struct foo g(int a, ...) { }
+ struct foo g(int a, ...) { return f(); }
""")
assert lib.f().x == 200
e = py.test.raises(NotImplementedError, lib.g, 0)
@@ -2069,7 +2069,7 @@
s.b = 200;
return s;
}
- struct foo g(int a, ...) { }
+ struct foo g(int a, ...) { return f(); }
""")
assert lib.f().b == 200
e = py.test.raises(NotImplementedError, lib.g, 0)
@@ -2095,7 +2095,7 @@
struct foo s = { 11 };
return s;
}
- struct foo g(int a, ...) { }
+ struct foo g(int a, ...) { return f(); }
""")
assert lib.f().x == 11
e = py.test.raises(NotImplementedError, lib.g, 0)
@@ -2107,6 +2107,8 @@
"set_source() and not taking a final '...' argument)")
def test_call_with_zero_length_field():
+ if sys.platform == 'win32':
+ py.test.skip("zero-length field not supported by MSVC")
ffi = FFI()
ffi.cdef("""
struct foo { int a; int x[0]; };
@@ -2119,7 +2121,7 @@
struct foo s = { 42 };
return s;
}
- struct foo g(int a, ...) { }
+ struct foo g(int a, ...) { return f(); }
""")
assert lib.f().a == 42
e = py.test.raises(NotImplementedError, lib.g, 0)
@@ -2143,7 +2145,7 @@
union foo s = { 42 };
return s;
}
- union foo g(int a, ...) { }
+ union foo g(int a, ...) { return f(); }
""")
assert lib.f().a == 42
e = py.test.raises(NotImplementedError, lib.g, 0)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit