Author: Armin Rigo <[email protected]>
Branch:
Changeset: r1203:4adde3131e4f
Date: 2013-03-28 23:22 +0100
http://bitbucket.org/cffi/cffi/changeset/4adde3131e4f/
Log: A passing test.
diff --git a/testing/test_verify.py b/testing/test_verify.py
--- a/testing/test_verify.py
+++ b/testing/test_verify.py
@@ -1590,3 +1590,9 @@
ctype = ffi.typeof(lib.foo)
assert len(ctype.args) == 2
assert ctype.result == ffi.typeof("int")
+
+def test_call_with_voidstar_arg():
+ ffi = FFI()
+ ffi.cdef("int f(void *);")
+ lib = ffi.verify("int f(void *x) { return ((char*)x)[0]; }")
+ assert lib.f(b"foobar") == ord(b"f")
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit