diff options
| author | Armin Rigo <arigo@tunes.org> | 2012-06-01 17:27:24 +0200 |
|---|---|---|
| committer | Armin Rigo <arigo@tunes.org> | 2012-06-01 17:27:24 +0200 |
| commit | eeebdf1847f828a2e6557a4786b4be67bdafe1f5 (patch) | |
| tree | dd5802fd30fd2cdea6728844d8ead81e991cc123 /testing/test_function.py | |
| parent | c1b2ad4d6304c4f96e355058dd60fb8595d2666b (diff) | |
| download | cffi-eeebdf1847f828a2e6557a4786b4be67bdafe1f5.tar.gz | |
Extent the API to allow None to variadic funcs.
It is somehow a simplification because some operations on
pointers will return None to mean "the C NULL". Passing
them to variadic functions as None makes sense.
Diffstat (limited to 'testing/test_function.py')
| -rw-r--r-- | testing/test_function.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/testing/test_function.py b/testing/test_function.py index b11ae70..538c163 100644 --- a/testing/test_function.py +++ b/testing/test_function.py @@ -105,12 +105,14 @@ class TestFunction(object): ffi.cast("int", 42), ffi.cast("long", 84), ffi.cast("long long", 168)) + ffi.C.printf("hello %p\n", None) ffi.C.fflush(None) res = fd.getvalue() assert res == ("hello\n" "hello, world!\n" "hello, world2!\n" - "hello int 42 long 84 long long 168\n") + "hello int 42 long 84 long long 168\n" + "hello (nil)\n") def test_must_specify_type_of_vararg(self): ffi = FFI(backend=self.Backend()) |
