Release 0.1 of CFFI
morepypy.blogspot.co.uk
morepypy.blogspot.co.uk
>>> from cffi import FFI
>>> ffi = FFI()
>>> ffi.cdef("""
... int printf(const char *format, ...); // copy- pasted from the man page
... """)
>>> C = ffi.dlopen(None)
>>> arg = ffi.new("char[]", "world")
>>> C.printf("hi there, %s!\n", arg);
17
Python 2.7.3rc2pycparser 2.07
libffi5/libffi-dev 3.0.10-3
Debian with 3.2.0-2-pae x86
From man 3 printf: "These functions return the number of characters printed (not including the trailing `\0' used to end output to strings) or a negative value if an output error occurs". So the 17 makes sense, but where did the output go?!
A simple google search would have shown them that the acronym is already taken.
I am still unhappy with Google co-opting the word "Go" from an ancient and very popular Board Game. Atleast they have the excuse that the domains are different (One a board game and the other a programming language).
Two software projects which offer foreign function interface functionality from a higher level language to C with the same acronym? This is irresponsible.