diff options
author | Armin Rigo <arigo@tunes.org> | 2019-01-05 11:07:31 +0100 |
---|---|---|
committer | Armin Rigo <arigo@tunes.org> | 2019-01-05 11:07:31 +0100 |
commit | dbdef41518d844776f05adb3dfd18d589d68b704 (patch) | |
tree | 275723dd47781426ee26325df526a94ab9977b4e /testing/cffi0 | |
parent | 6fb435a06e781fe8ef23c0d9793c1d8a9457a2bd (diff) | |
download | cffi-dbdef41518d844776f05adb3dfd18d589d68b704.tar.gz |
ffi.release()
Diffstat (limited to 'testing/cffi0')
-rw-r--r-- | testing/cffi0/test_ffi_backend.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/testing/cffi0/test_ffi_backend.py b/testing/cffi0/test_ffi_backend.py index e465c2d..4b43074 100644 --- a/testing/cffi0/test_ffi_backend.py +++ b/testing/cffi0/test_ffi_backend.py @@ -337,6 +337,13 @@ class TestBitfield: py.test.raises((TypeError, BufferError), ffi.from_buffer, b"abcd", require_writable=True) + def test_release(self): + ffi = FFI() + p = ffi.new("int[]", 123) + ffi.release(p) + # here, reading p[0] might give garbage or segfault... + ffi.release(p) # no effect + def test_memmove(self): ffi = FFI() p = ffi.new("short[]", [-1234, -2345, -3456, -4567, -5678]) |