
Release 0.1 of CFFI - llambda
http://morepypy.blogspot.co.uk/2012/06/release-01-of-cffi.html
======
nickpresta
I tried to run the simple example and I get:

    
    
      >>> 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.3rc2

pycparser 2.07

libffi5/libffi-dev 3.0.10-3

Debian with 3.2.0-2-pae x86

~~~
jmmcd
Hmmm...

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?!

------
dmm
There is already a C function interface for Common Lisp called CFFI:
<http://common-lisp.net/project/cffi/>

~~~
reddit_clone
I had the same thought.

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.

