Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r2147:729a228d5883
Date: 2015-05-31 18:24 +0200
http://bitbucket.org/cffi/cffi/changeset/729a228d5883/

Log:    Actually, we can test directly that getptr() returns the address of
        the variable.

diff --git a/testing/cffi1/test_verify1.py b/testing/cffi1/test_verify1.py
--- a/testing/cffi1/test_verify1.py
+++ b/testing/cffi1/test_verify1.py
@@ -2129,10 +2129,7 @@
         static int *getptr(void) { return &foo_verify_dlopen_flags; }
     """)
     p = lib2.getptr()
-    lib1.foo_verify_dlopen_flags = 42
-    assert p[0] == 42
-    p[0] += 1
-    assert lib1.foo_verify_dlopen_flags == 43
+    assert ffi1.addressof(lib1, 'foo_verify_dlopen_flags') == p
 
 def test_consider_not_implemented_function_type():
     ffi = FFI()
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to