Showing content from http://mail.python.org/pipermail/python-dev/attachments/20110828/ef91a36b/attachment.html below:
<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Aug 28, 2011, at 7:27 PM, Guido van Rossum wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: 'Bitstream Vera Sans Mono'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="font-family: monospace; ">In general, an existing library cannot be called<br>without access to its .h files -- there are probably struct and<br>constant definitions, platform-specific #ifdefs and #defines, and<br>other things in there that affect the linker-level calling conventions<br>for the functions in the library.</span></span></blockquote></div><br><div>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: <<a href="http://readthedocs.org/docs/pypy/en/latest/rffi.html">http://readthedocs.org/docs/pypy/en/latest/rffi.html</a>>. This has some shortcomings currently, most notably the fact that it needs those .h files (and therefore a C compiler) at <i>runtime,</i> so it's currently a non-starter for code distributed to users<i>.</i> Not to mention the fact that, as you can see, it's not terribly thoroughly documented. But, that "ExternalCompilationInfo" object looks very promising, since it has fields like "includes", "libraries", etc.</div><div><br></div><div>Nevertheless it seems like it's a bit more type-safe than ctypes or cython, and it seems to me that it could cache some of that information that it extracts from header files and store it for later when a compiler might not be around.</div><div><br></div><div>Perhaps someone with more PyPy knowledge than I could explain whether this is a realistic contender for other Python runtimes?</div><div><br></div></body></html>
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4