2011/8/29 Glyph Lefkowitz <gl...@twistedmatrix.com>:
>
> On Aug 28, 2011, at 7:27 PM, Guido van Rossum wrote:
>
> In general, an existing library cannot be called
> without access to its .h files -- there are probably struct and
> constant definitions, platform-specific #ifdefs and #defines, and
> other things in there that affect the linker-level calling conventions
> for the functions in the library.
>
> Unfortunately I don't know a lot about this, but I keep hearing about
> something called "rffi" that PyPy uses to call C from RPython:
> <http://readthedocs.org/docs/pypy/en/latest/rffi.html>.  This has some
> shortcomings currently, most notably the fact that it needs those .h files
> (and therefore a C compiler) at runtime

This is incorrect. rffi is actually quite like ctypes. The part you
are referring to is probably rffi_platform [1], which invokes the
compiler to determine constant values and struct offsets, or
ctypes_configure, which does need runtime headers [2].

[1] 
https://bitbucket.org/pypy/pypy/src/92e36ab4eb5e/pypy/rpython/tool/rffi_platform.py

[2] https://bitbucket.org/pypy/pypy/src/92e36ab4eb5e/ctypes_configure/

-- 
Regards,
Benjamin
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to