<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <id>http://groups.google.com/group/python-cffi</id>
  <title type="text">python-cffi Google Group</title>
  <subtitle type="text">
  A Foreign Function Interface package for calling C libraries from Python.
  </subtitle>
  <link href="/group/python-cffi/feed/atom_v1_0_msgs.xml" rel="self" title="python-cffi feed"/>
  <updated>2013-05-19T22:16:28Z</updated>
  <generator uri="http://groups.google.com" version="1.99">Google Groups</generator>
  <entry>
  <author>
  <name>Armin Rigo</name>
  <email>ar...@tunes.org</email>
  </author>
  <updated>2013-05-19T22:16:28Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/75ccc61cef24202a/9b3de7bdde02a381?show_docid=9b3de7bdde02a381</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/75ccc61cef24202a/9b3de7bdde02a381?show_docid=9b3de7bdde02a381"/>
  <title type="text">Re: [python-cffi] Callback issue</title>
  <summary type="html" xml:space="preserve">
  Hi Geert, &lt;br&gt; &lt;p&gt;Yes, there are workarounds to do that. I opened a few days ago an &lt;br&gt; issue about identifying the &amp;quot;best&amp;quot; way and giving it some official &lt;br&gt; support: &lt;a target=&quot;_blank&quot; rel=nofollow href=&quot;https://bitbucket.org/cffi/cffi/issue/87/turn-objects-into-unique-integers&quot;&gt;[link]&lt;/a&gt; &lt;br&gt; . &lt;br&gt; &lt;p&gt;A bientôt, &lt;br&gt; &lt;p&gt;Armin.
  </summary>
  </entry>
  <entry>
  <author>
  <name>Geert Jansen</name>
  <email>gee...@gmail.com</email>
  </author>
  <updated>2013-05-18T20:40:00Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/75ccc61cef24202a/6c5092aa11f5b995?show_docid=6c5092aa11f5b995</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/75ccc61cef24202a/6c5092aa11f5b995?show_docid=6c5092aa11f5b995"/>
  <title type="text">Re: [python-cffi] Callback issue</title>
  <summary type="html" xml:space="preserve">
  Hi Armin, &lt;br&gt; On Sat, May 18, 2013 at 9:23 PM, Geert Jansen &amp;lt;gee...@gmail.com&amp;lt;javascript:&amp;gt; &amp;gt; &lt;br&gt; Thanks! Indeed this was the issue. &lt;br&gt; &lt;p&gt;The reason I made it a method and not a global function is that I need to &lt;br&gt; close the callback over some request specific data. Unfortunately it seems &lt;br&gt; that cffi.callback() as a decorator doesn&#39;t work for methods. I have
  </summary>
  </entry>
  <entry>
  <author>
  <name>Armin Rigo</name>
  <email>ar...@tunes.org</email>
  </author>
  <updated>2013-05-18T19:35:45Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/75ccc61cef24202a/cf0685d35417bc0d?show_docid=cf0685d35417bc0d</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/75ccc61cef24202a/cf0685d35417bc0d?show_docid=cf0685d35417bc0d"/>
  <title type="text">Re: [python-cffi] Callback issue</title>
  <summary type="html" xml:space="preserve">
  Hi Geert, &lt;br&gt; &lt;p&gt; callbacks.on_message_begin = ffi.callback(&#39;http_cb&#39;, on_message_begin) &lt;br&gt; &lt;p&gt;This line is wrong. ffi.callback() returns a cffi pointer that has &lt;br&gt; ownership of the callback metadata. You then copy the raw pointer &lt;br&gt; into a struct, and immediately forget the ffi.callback() object &lt;br&gt; itself, which frees the metadata. You need to keep it alive as long
  </summary>
  </entry>
  <entry>
  <author>
  <name>Geert Jansen</name>
  <email>gee...@gmail.com</email>
  </author>
  <updated>2013-05-18T19:23:11Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/75ccc61cef24202a/69a4392a4b98985e?show_docid=69a4392a4b98985e</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/75ccc61cef24202a/69a4392a4b98985e?show_docid=69a4392a4b98985e"/>
  <title type="text">Callback issue</title>
  <summary type="html" xml:space="preserve">
  Hi, &lt;br&gt; I&#39;m wrapping the Joyent/node.js HTTP parser with CFFI and I&#39;m having some &lt;br&gt; issues with callbacks. The parser takes a pointer to a structure containing &lt;br&gt; different callbacks as an argument. It will then call the callbacks during &lt;br&gt; parsing. &lt;br&gt; I&#39;ve isolated the issue here: &lt;br&gt; &lt;a target=&quot;_blank&quot; rel=nofollow href=&quot;https://github.com/geertj/cffi-test&quot;&gt;[link]&lt;/a&gt;
  </summary>
  </entry>
  <entry>
  <author>
  <name>Armin Rigo</name>
  <email>ar...@tunes.org</email>
  </author>
  <updated>2013-05-18T18:02:37Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/651c304949809e4f/590594c63745dffa?show_docid=590594c63745dffa</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/651c304949809e4f/590594c63745dffa?show_docid=590594c63745dffa"/>
  <title type="text">Re: [python-cffi] Zero-copy</title>
  <summary type="html" xml:space="preserve">
  Hi Geert, &lt;br&gt; &lt;p&gt;Yes. &lt;br&gt; &lt;p&gt;Armin
  </summary>
  </entry>
  <entry>
  <author>
  <name>Geert Jansen</name>
  <email>gee...@gmail.com</email>
  </author>
  <updated>2013-05-18T17:47:52Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/651c304949809e4f/af082b1abf700c4c?show_docid=af082b1abf700c4c</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/651c304949809e4f/af082b1abf700c4c?show_docid=af082b1abf700c4c"/>
  <title type="text">Re: [python-cffi] Zero-copy</title>
  <summary type="html" xml:space="preserve">
  Hi, &lt;br&gt; On Fri, May 17, 2013 at 12:42 AM, Geert Jansen &amp;lt;gee...@gmail.com&amp;lt;javascript:&amp;gt; &amp;gt; &lt;br&gt; Thanks Armin. Will cffi use this hack automatically if it detects it is on &lt;br&gt; CPython? &lt;br&gt; To really avoid copies you need to find a way to rewrite what you need &lt;br&gt; The problem here is that I get the string from a framework outside my
  </summary>
  </entry>
  <entry>
  <author>
  <name>Maciej Fijalkowski</name>
  <email>fij...@gmail.com</email>
  </author>
  <updated>2013-05-18T11:19:45Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/9739ab0f2aa9537d/ccd92f66be12cdb9?show_docid=ccd92f66be12cdb9</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/9739ab0f2aa9537d/ccd92f66be12cdb9?show_docid=ccd92f66be12cdb9"/>
  <title type="text">Re: [python-cffi] multiple ffi modules</title>
  <summary type="html" xml:space="preserve">
  lritter had this problem on IRC. &lt;br&gt; &lt;p&gt;Maybe he can show you :) &lt;br&gt; &lt;p&gt;Cheers, &lt;br&gt; fijal
  </summary>
  </entry>
  <entry>
  <author>
  <name>Armin Rigo</name>
  <email>ar...@tunes.org</email>
  </author>
  <updated>2013-05-18T11:17:13Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/9739ab0f2aa9537d/9f692181a1ece3ec?show_docid=9f692181a1ece3ec</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/9739ab0f2aa9537d/9f692181a1ece3ec?show_docid=9f692181a1ece3ec"/>
  <title type="text">Re: [python-cffi] multiple ffi modules</title>
  <summary type="html" xml:space="preserve">
  Hi Fijal, &lt;br&gt; &lt;p&gt;I understand the problem in theory. What I fail to get is an example &lt;br&gt; that clearly shows that it&#39;s a good idea to use ffi.include(). In &lt;br&gt; your &amp;quot;module a module b&amp;quot; senario, we could as well say that you can &lt;br&gt; wrap them both in a single ffi.cdef()/ffi.verify(): modules a and b &lt;br&gt; may be sufficiently close for that. The opposite extreme is that
  </summary>
  </entry>
  <entry>
  <author>
  <name>Maciej Fijalkowski</name>
  <email>fij...@gmail.com</email>
  </author>
  <updated>2013-05-18T11:05:36Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/9739ab0f2aa9537d/d5e7393e87e3ce67?show_docid=d5e7393e87e3ce67</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/9739ab0f2aa9537d/d5e7393e87e3ce67?show_docid=d5e7393e87e3ce67"/>
  <title type="text">Re: [python-cffi] multiple ffi modules</title>
  <summary type="html" xml:space="preserve">
  The problem is as folllows: &lt;br&gt; &lt;p&gt;module b is an extension of module a. Now you receive from module a &lt;br&gt; some struct and you want it to be passed to module&#39;s b function (or &lt;br&gt; the other way around). You must then reuse the original ffi, which &lt;br&gt; maybe makes some sense, but I think ffi include is cleaner, especially
  </summary>
  </entry>
  <entry>
  <author>
  <name>Armin Rigo</name>
  <email>ar...@tunes.org</email>
  </author>
  <updated>2013-05-18T10:57:34Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/9739ab0f2aa9537d/eba81e2cd664e5c1?show_docid=eba81e2cd664e5c1</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/9739ab0f2aa9537d/eba81e2cd664e5c1?show_docid=eba81e2cd664e5c1"/>
  <title type="text">Re: [python-cffi] multiple ffi modules</title>
  <summary type="html" xml:space="preserve">
  Hi Fijal, &lt;br&gt; &lt;p&gt;Two use cases I can think of: &lt;br&gt; &lt;p&gt;1. in the normal case each library has its own interface and so, in &lt;br&gt; Python, its own FFI instance and its own Pythonic layer to manipulate &lt;br&gt; it. &lt;br&gt; &lt;p&gt;2. in the case of libraries that are &amp;quot;extensions&amp;quot; of other libraries, &lt;br&gt; adding some features but keeping the same basic functions and types,
  </summary>
  </entry>
  <entry>
  <author>
  <name>Maciej Fijalkowski</name>
  <email>fij...@gmail.com</email>
  </author>
  <updated>2013-05-18T10:22:35Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/9739ab0f2aa9537d/848e4a3ef499723f?show_docid=848e4a3ef499723f</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/9739ab0f2aa9537d/848e4a3ef499723f?show_docid=848e4a3ef499723f"/>
  <title type="text">Re: [python-cffi] multiple ffi modules</title>
  <summary type="html" xml:space="preserve">
  I guess so, but what if you want to use a library from a library? C &lt;br&gt; also has just one FFI instance that&#39;s global :-P
  </summary>
  </entry>
  <entry>
  <author>
  <name>Armin Rigo</name>
  <email>ar...@tunes.org</email>
  </author>
  <updated>2013-05-18T06:56:23Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/651c304949809e4f/9fba7a6853bf1eeb?show_docid=9fba7a6853bf1eeb</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/651c304949809e4f/9fba7a6853bf1eeb?show_docid=9fba7a6853bf1eeb"/>
  <title type="text">Re: [python-cffi] Zero-copy</title>
  <summary type="html" xml:space="preserve">
  Hi Geert, &lt;br&gt; &lt;p&gt;Not reliably. For example on PyPy string objects are not &lt;br&gt; null-terminated and can move around memory, so they are not suitable &lt;br&gt; for taking a raw &amp;quot;char *&amp;quot;. On CPython only, there is a hack that will &lt;br&gt; take a pointer inside the string if passed as argument to a function. &lt;br&gt; &lt;p&gt;To really avoid copies you need to find a way to rewrite what you need
  </summary>
  </entry>
  <entry>
  <author>
  <name>Armin Rigo</name>
  <email>ar...@tunes.org</email>
  </author>
  <updated>2013-05-18T06:39:26Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/9739ab0f2aa9537d/b1b011443b1b0501?show_docid=b1b011443b1b0501</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/9739ab0f2aa9537d/b1b011443b1b0501?show_docid=b1b011443b1b0501"/>
  <title type="text">Re: [python-cffi] multiple ffi modules</title>
  <summary type="html" xml:space="preserve">
  Hi Fijal, &lt;br&gt; &lt;p&gt;Ok. Please submit an issue so that we can track it: &lt;br&gt; &lt;a target=&quot;_blank&quot; rel=nofollow href=&quot;https://bitbucket.org/cffi/cffi/issues&quot;&gt;[link]&lt;/a&gt; &lt;br&gt; &lt;p&gt;As far as I can tell this is already implemented. (But I&#39;m a bit &lt;br&gt; skeptical about the need anyway. If it was C you&#39;d just stick it all &lt;br&gt; in one namespace. The equivalent is to use a single FFI() instance.)
  </summary>
  </entry>
  <entry>
  <author>
  <name>Maciej Fijalkowski</name>
  <email>fij...@gmail.com</email>
  </author>
  <updated>2013-05-17T14:33:09Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/9739ab0f2aa9537d/9cc795c61ddb80ec?show_docid=9cc795c61ddb80ec</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/9739ab0f2aa9537d/9cc795c61ddb80ec?show_docid=9cc795c61ddb80ec"/>
  <title type="text">multiple ffi modules</title>
  <summary type="html" xml:space="preserve">
  Hi &lt;br&gt; &lt;p&gt;There was a request that i perfectly understand for a case of mixing &lt;br&gt; types between two libraries. There are two issues: &lt;br&gt; &lt;p&gt;a) we need better error reports (those two things come from different &lt;br&gt; FFI instances and not &amp;lt;cdata x&amp;gt; is not &amp;lt;cdata x&amp;gt;) &lt;br&gt; &lt;p&gt;b) ffi.include(other_ffi) for making types available?
  </summary>
  </entry>
  <entry>
  <author>
  <name>Geert Jansen</name>
  <email>gee...@gmail.com</email>
  </author>
  <updated>2013-05-16T22:42:15Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/651c304949809e4f/5992e443ac648062?show_docid=5992e443ac648062</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/651c304949809e4f/5992e443ac648062?show_docid=5992e443ac648062"/>
  <title type="text">Zero-copy</title>
  <summary type="html" xml:space="preserve">
  Hi, &lt;br&gt; is there a way to pass a Python string to a C function without the string &lt;br&gt; data being copied? &lt;br&gt; Regards, &lt;br&gt; Geert
  </summary>
  </entry>
  <entry>
  <author>
  <name>Armin Rigo</name>
  <email>ar...@tunes.org</email>
  </author>
  <updated>2013-05-16T15:16:19Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/04ea52de46e5451e/d701043b6ba8f377?show_docid=d701043b6ba8f377</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/04ea52de46e5451e/d701043b6ba8f377?show_docid=d701043b6ba8f377"/>
  <title type="text">Pointer equality and hashes</title>
  <summary type="html" xml:space="preserve">
  Hi all, &lt;br&gt; &lt;p&gt;Warning: I just fixed the following a bug where, given two cffi &lt;br&gt; pointer objects of different types that point to the same location, &lt;br&gt; you have: &lt;br&gt; &lt;p&gt;x = ffi.cast(&amp;quot;char *&amp;quot;, p) &lt;br&gt; y = ffi.cast(&amp;quot;int *&amp;quot;, p) &lt;br&gt; assert x == y # this is true &lt;br&gt; assert hash(x) == hash(y) # but this fails!
  </summary>
  </entry>
  <entry>
  <author>
  <name>Andreas Kloeckner</name>
  <email>li...@informa.tiker.net</email>
  </author>
  <updated>2013-05-11T20:42:31Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/004331a5ea3ad185/f5baee803dff5579?show_docid=f5baee803dff5579</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/004331a5ea3ad185/f5baee803dff5579?show_docid=f5baee803dff5579"/>
  <title type="text">Re: [python-cffi] cffi performance on CPython and PyPy</title>
  <summary type="html" xml:space="preserve">
  I think this test is a red herring, in that I think gcc simply saw the &lt;br&gt; loop and thought &amp;quot;return 100000000;&amp;quot;. &lt;br&gt; &lt;p&gt;Andreas
  </summary>
  </entry>
  <entry>
  <author>
  <name>Geert Jansen</name>
  <email>gee...@gmail.com</email>
  </author>
  <updated>2013-05-14T09:05:43Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/6b5fdda0305521f3/4268bc0c9d90190e?show_docid=4268bc0c9d90190e</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/6b5fdda0305521f3/4268bc0c9d90190e?show_docid=4268bc0c9d90190e"/>
  <title type="text">Re: [python-cffi] Re: CFFI performance vs Python C extension</title>
  <summary type="html" xml:space="preserve">
  Hi Armin, &lt;br&gt; &lt;p&gt;I&#39;m unsure, but I suspect that this is the problem: &lt;br&gt; &lt;p&gt;OK, this was the problem, together with the problem that _kfj identified &lt;br&gt; where I am allocating two &#39;int *&#39; cdata objects per call. Creating even a &lt;br&gt; small cdata object appears expensive. I&#39;ve updated the code in my code. It &lt;br&gt; now pre-allocates the int arrays, and does not create the buffer but
  </summary>
  </entry>
  <entry>
  <author>
  <email>_...@yahoo.com</email>
  </author>
  <updated>2013-05-13T09:08:16Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/6b5fdda0305521f3/2e8ffb7d2b9b872e?show_docid=2e8ffb7d2b9b872e</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/6b5fdda0305521f3/2e8ffb7d2b9b872e?show_docid=2e8ffb7d2b9b872e"/>
  <title type="text">Re: [python-cffi] Re: CFFI performance vs Python C extension</title>
  <summary type="html" xml:space="preserve">
  to malloc, even if you only allocate 5 bytes for an int, and when the &lt;br&gt; object is no longer referenced, the memory is freed by a call to free. To &lt;br&gt; really remove these effects, you should avoid all calls to ffi.new in your &lt;br&gt; inner loop. Removing the other two calls to ffi.new, judging from what you &lt;br&gt; report about having removed one of them, might therefore save you another
  </summary>
  </entry>
  <entry>
  <author>
  <name>Dimitri Vorona</name>
  <email>alen...@googlemail.com</email>
  </author>
  <updated>2013-05-12T09:04:40Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/004331a5ea3ad185/a2bd8d8cdbb5b797?show_docid=a2bd8d8cdbb5b797</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/004331a5ea3ad185/a2bd8d8cdbb5b797?show_docid=a2bd8d8cdbb5b797"/>
  <title type="text">Re: cffi performance on CPython and PyPy</title>
  <summary type="html" xml:space="preserve">
  Hi, &lt;br&gt; thanks for clarification :) &lt;br&gt; Regards, &lt;br&gt; Dimitri &lt;br&gt; Am Samstag, 11. Mai 2013 21:03:20 UTC+2 schrieb Dimitri Vorona:
  </summary>
  </entry>
  <entry>
  <author>
  <email>_...@yahoo.com</email>
  </author>
  <updated>2013-05-12T08:56:18Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/aac708c28c626ded/be84e2bdb0ff7f0f?show_docid=be84e2bdb0ff7f0f</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/aac708c28c626ded/be84e2bdb0ff7f0f?show_docid=be84e2bdb0ff7f0f"/>
  <title type="text">Cpython/Pypy cffi wrapper for libeinspline</title>
  <summary type="html" xml:space="preserve">
  Hi group! &lt;br&gt; As I&#39;ve mentioned previously on this list, I&#39;ve been working on wrapping &lt;br&gt; libeinspline, a comprehensive C library for creating and evaluating cubic &lt;br&gt; B-splines in 1-3 dimensions and real and complex data types. I&#39;ve now put &lt;br&gt; an alpha version online at &lt;br&gt; &lt;a target=&quot;_blank&quot; rel=nofollow href=&quot;https://bitbucket.org/kfj/python-bspline&quot;&gt;[link]&lt;/a&gt;
  </summary>
  </entry>
  <entry>
  <author>
  <name>Armin Rigo</name>
  <email>ar...@tunes.org</email>
  </author>
  <updated>2013-05-12T06:48:30Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/004331a5ea3ad185/379b2b7ca7b566a2?show_docid=379b2b7ca7b566a2</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/004331a5ea3ad185/379b2b7ca7b566a2?show_docid=379b2b7ca7b566a2"/>
  <title type="text">Re: [python-cffi] cffi performance on CPython and PyPy</title>
  <summary type="html" xml:space="preserve">
  Hi again, &lt;br&gt; &lt;p&gt;Fixed in 9ffefaf25ca3: distutils/sysconfig_pypy.py didn&#39;t pass any -O &lt;br&gt; option to the C compiler. Now going with -O2, which is the standard &lt;br&gt; (by default) on CPython, as far as I know. Your super-fast CPython &lt;br&gt; results might have been obtained with -O3 or some specific aggressive &lt;br&gt; flags, but honestly I don&#39;t think there is a point in specifying
  </summary>
  </entry>
  <entry>
  <author>
  <name>Armin Rigo</name>
  <email>ar...@tunes.org</email>
  </author>
  <updated>2013-05-12T06:27:48Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/004331a5ea3ad185/19f7cec8409f6f24?show_docid=19f7cec8409f6f24</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/004331a5ea3ad185/19f7cec8409f6f24?show_docid=19f7cec8409f6f24"/>
  <title type="text">Re: [python-cffi] cffi performance on CPython and PyPy</title>
  <summary type="html" xml:space="preserve">
  Hi Dimitri, &lt;br&gt; &lt;p&gt;At this point the loop in C is long enough that you&#39;re benchmarking &lt;br&gt; the C compiler only. The indicates different optimization options &lt;br&gt; passed to the C compiler. From the results, the CPython version calls &lt;br&gt; the compiler with good optimizations flags, and the C compiler figures &lt;br&gt; out that the loop is nonsense and removes it completely (hence it&#39;s
  </summary>
  </entry>
  <entry>
  <author>
  <name>Armin Rigo</name>
  <email>ar...@tunes.org</email>
  </author>
  <updated>2013-05-12T06:23:33Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/6b5fdda0305521f3/65d9e6e8ef93bece?show_docid=65d9e6e8ef93bece</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/6b5fdda0305521f3/65d9e6e8ef93bece?show_docid=65d9e6e8ef93bece"/>
  <title type="text">Re: [python-cffi] Re: CFFI performance vs Python C extension</title>
  <summary type="html" xml:space="preserve">
  Hi Geert, &lt;br&gt; &lt;p&gt;I&#39;m unsure, but I suspect that this is the problem: &lt;br&gt; &lt;p&gt;It creates a char[] buffer and copies the string &amp;quot;buf&amp;quot; in it. If I &lt;br&gt; see it correctly, the CPython extension module doesn&#39;t do any copying. &lt;br&gt; I guess the benchmark takes a big string and calls split_json() a lot of times &lt;br&gt; to get various positions in this string. Then it would be a much
  </summary>
  </entry>
  <entry>
  <author>
  <name>Dimitri Vorona</name>
  <email>alen...@googlemail.com</email>
  </author>
  <updated>2013-05-11T19:57:47Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/004331a5ea3ad185/50954f8b640368f6?show_docid=50954f8b640368f6</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/004331a5ea3ad185/50954f8b640368f6?show_docid=50954f8b640368f6"/>
  <title type="text">Re: [python-cffi] cffi performance on CPython and PyPy</title>
  <summary type="html" xml:space="preserve">
  Hi Alex, &lt;br&gt; see &lt;a target=&quot;_blank&quot; rel=nofollow href=&quot;https://gist.github.com/alendit/5561192&quot;&gt;[link]&lt;/a&gt; . &lt;br&gt; Loaded the gist on IPython both with PyPy and CPython run timeit lib.test() &lt;br&gt; and got the results mentioned above. Is it some IPython artifact, maybe? &lt;br&gt; Regards, &lt;br&gt; Dimitri. &lt;br&gt; Am Samstag, 11. Mai 2013 21:04:57 UTC+2 schrieb Alex Gaynor:
  </summary>
  </entry>
  <entry>
  <author>
  <name>Geert Jansen</name>
  <email>gee...@gmail.com</email>
  </author>
  <updated>2013-05-11T19:52:25Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/6b5fdda0305521f3/fffc71730014cd85?show_docid=fffc71730014cd85</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/6b5fdda0305521f3/fffc71730014cd85?show_docid=fffc71730014cd85"/>
  <title type="text">Re: [python-cffi] Re: CFFI performance vs Python C extension</title>
  <summary type="html" xml:space="preserve">
  Hi, &lt;br&gt; &lt;p&gt;[...] &lt;br&gt; Thanks Kay. I actually did check this by caching c_buf, and it made a bit &lt;br&gt; of difference (roughly 30%). But as-is the code is 8x slower when called &lt;br&gt; via CFFI. So even after this modest speedup there is an almost &lt;br&gt; order-of-magnitude difference in performance. &lt;br&gt; &lt;p&gt;Regards, &lt;br&gt; Geert
  </summary>
  </entry>
  <entry>
  <author>
  <name>Geert Jansen</name>
  <email>gee...@gmail.com</email>
  </author>
  <updated>2013-05-11T19:49:41Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/6b5fdda0305521f3/190ee6c9021f8066?show_docid=190ee6c9021f8066</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/6b5fdda0305521f3/190ee6c9021f8066?show_docid=190ee6c9021f8066"/>
  <title type="text">Re: [python-cffi] CFFI performance vs Python C extension</title>
  <summary type="html" xml:space="preserve">
  This is already on PyPy 2.0. Regarding b), I am looking for a way to use an &lt;br&gt; already optimized C function in an efficient way from PyPy and CPython. I &lt;br&gt; hoped CFFI would offer me that. Why should re-coding it in Python help? The &lt;br&gt; JIT can do a good job but why should it be faster than compiled and hand
  </summary>
  </entry>
  <entry>
  <author>
  <name>Dimitri Vorona</name>
  <email>alen...@googlemail.com</email>
  </author>
  <updated>2013-05-11T19:05:57Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/004331a5ea3ad185/997bebbc3d7388ec?show_docid=997bebbc3d7388ec</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/004331a5ea3ad185/997bebbc3d7388ec?show_docid=997bebbc3d7388ec"/>
  <title type="text">Re: cffi performance on CPython and PyPy</title>
  <summary type="html" xml:space="preserve">
  Make it six orders of magnitude :)
  </summary>
  </entry>
  <entry>
  <author>
  <name>Alex Gaynor</name>
  <email>alex.gay...@gmail.com</email>
  </author>
  <updated>2013-05-11T19:04:57Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/004331a5ea3ad185/996d34df1a8f2b62?show_docid=996d34df1a8f2b62</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/004331a5ea3ad185/996d34df1a8f2b62?show_docid=996d34df1a8f2b62"/>
  <title type="text">Re: [python-cffi] cffi performance on CPython and PyPy</title>
  <summary type="html" xml:space="preserve">
  Hi Dimitri, &lt;br&gt; &lt;p&gt;I&#39;m a bit confused about what you&#39;re benchmarking, can you include the full &lt;br&gt; script you ran? &lt;br&gt; &lt;p&gt;Alex &lt;br&gt; &lt;p&gt;-- &lt;br&gt; &amp;quot;I disapprove of what you say, but I will defend to the death your right to &lt;br&gt; say it.&amp;quot; -- Evelyn Beatrice Hall (summarizing Voltaire) &lt;br&gt; &amp;quot;The people&#39;s good is the highest law.&amp;quot; -- Cicero
  </summary>
  </entry>
  <entry>
  <author>
  <name>Dimitri Vorona</name>
  <email>alen...@googlemail.com</email>
  </author>
  <updated>2013-05-11T19:03:20Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/004331a5ea3ad185/cf6c7decf38d260f?show_docid=cf6c7decf38d260f</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/004331a5ea3ad185/cf6c7decf38d260f?show_docid=cf6c7decf38d260f"/>
  <title type="text">cffi performance on CPython and PyPy</title>
  <summary type="html" xml:space="preserve">
  Hi, &lt;br&gt; while playing around with CFFI I decided to make a silly speed test of with &lt;br&gt; 10 ^ 8 iteration of a simple increment operation, i.e.: &lt;br&gt; long test() { &lt;br&gt; long i, s = 0; &lt;br&gt; for (i = 0; i &amp;lt; 100000000; i++) { &lt;br&gt; s++; &lt;br&gt; } &lt;br&gt; return s; &lt;br&gt; The results with time it are: &lt;br&gt; PyPy: 211ms &lt;br&gt; CPython 74.1ns(!)
  </summary>
  </entry>
  <entry>
  <author>
  <email>_...@yahoo.com</email>
  </author>
  <updated>2013-05-11T18:17:52Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/6b5fdda0305521f3/2df466a5e6e5cf29?show_docid=2df466a5e6e5cf29</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/6b5fdda0305521f3/2df466a5e6e5cf29?show_docid=2df466a5e6e5cf29"/>
  <title type="text">Re: CFFI performance vs Python C extension</title>
  <summary type="html" xml:space="preserve">
  def cffi_split(buf, offset=0, state=0): &lt;br&gt; c_buf = ffi.new(&#39;char[]&#39;, buf) &lt;br&gt; c_offset = ffi.new(&#39;int *&#39;, offset) &lt;br&gt; c_state = ffi.new(&#39;int *&#39;, state) &lt;br&gt; ret = lib.split_json(c_buf, len(buf), c_offset, c_state) &lt;br&gt; return (ret, c_offset[0], c_state[0]) &lt;br&gt; every invocation of this function allocates three buffers, while three
  </summary>
  </entry>
  <entry>
  <author>
  <name>Maciej Fijalkowski</name>
  <email>fij...@gmail.com</email>
  </author>
  <updated>2013-05-11T15:37:09Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/6b5fdda0305521f3/f68de979af9888d4?show_docid=f68de979af9888d4</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/6b5fdda0305521f3/f68de979af9888d4?show_docid=f68de979af9888d4"/>
  <title type="text">Re: [python-cffi] CFFI performance vs Python C extension</title>
  <summary type="html" xml:space="preserve">
  hey &lt;br&gt; &lt;p&gt;Two things: &lt;br&gt; &lt;p&gt;a) you can try newer pypy &lt;br&gt; b) on pypy you can try writing this function in Python, should be faster &lt;br&gt; &lt;p&gt;Cheers, &lt;br&gt; fijal
  </summary>
  </entry>
  <entry>
  <author>
  <name>Geert Jansen</name>
  <email>gee...@gmail.com</email>
  </author>
  <updated>2013-05-11T06:28:19Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/6b5fdda0305521f3/a879e214b6d8b285?show_docid=a879e214b6d8b285</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/6b5fdda0305521f3/a879e214b6d8b285?show_docid=a879e214b6d8b285"/>
  <title type="text">CFFI performance vs Python C extension</title>
  <summary type="html" xml:space="preserve">
  Hi, &lt;br&gt; I have a C function for framing JSON objects from a stream. This function &lt;br&gt; is written in C for speed. Originally this function was exposed via a &lt;br&gt; python extension module. I have been doing an experiment where I exposed &lt;br&gt; this function via CFFI. My goal is to have one high performance function &lt;br&gt; that I can share between CPython and PyPy. The results are below:
  </summary>
  </entry>
  <entry>
  <author>
  <email>_...@yahoo.com</email>
  </author>
  <updated>2013-05-10T10:06:38Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/cbdec6673b1f83a1/b5307ad32d11049b?show_docid=b5307ad32d11049b</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/cbdec6673b1f83a1/b5307ad32d11049b?show_docid=b5307ad32d11049b"/>
  <title type="text">Re: [python-cffi] docstrings for cffi-wrapped C entities</title>
  <summary type="html" xml:space="preserve">
  Nice indeed... &lt;br&gt; &lt;p&gt;Gulp... I&#39;m just right inside the innards of the fat C library I&#39;m &lt;br&gt; wrapping. I&#39;m a cffi *user*, really; I haven&#39;t even looked into the code &lt;br&gt; (yet). Okay, I&#39;ll put it on the to-do-list and once I&#39;ve recovered from my &lt;br&gt; current project I may give it a shot ;-) &lt;br&gt; Kay
  </summary>
  </entry>
  <entry>
  <author>
  <name>Armin Rigo</name>
  <email>ar...@tunes.org</email>
  </author>
  <updated>2013-05-07T08:35:59Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/cbdec6673b1f83a1/4ce2852a02553bb9?show_docid=4ce2852a02553bb9</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/cbdec6673b1f83a1/4ce2852a02553bb9?show_docid=4ce2852a02553bb9"/>
  <title type="text">Re: [python-cffi] docstrings for cffi-wrapped C entities</title>
  <summary type="html" xml:space="preserve">
  Hi Kay, &lt;br&gt; &lt;p&gt;Good point. Right now you only have ffi.typeof(c_function), which &lt;br&gt; gives the signature as a string reconstructed from the internal &lt;br&gt; representation, without the names of formal parameters. It would be &lt;br&gt; nice if these c_function&#39;s also had a __doc__ that contains, say, the &lt;br&gt; original declaration. Patches welcome, and bonus points if the
  </summary>
  </entry>
  <entry>
  <author>
  <name>Armin Rigo</name>
  <email>ar...@tunes.org</email>
  </author>
  <updated>2013-05-07T08:05:06Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/919e86e5824cc0ec/cd1ad21dc5f7b1b4?show_docid=cd1ad21dc5f7b1b4</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/919e86e5824cc0ec/cd1ad21dc5f7b1b4?show_docid=cd1ad21dc5f7b1b4"/>
  <title type="text">Re: [python-cffi] struggling with importing and packaging cffi-generated modules</title>
  <summary type="html" xml:space="preserve">
  Hi Kay, &lt;br&gt; &lt;p&gt;Sorry for the delay in answering this mail: &lt;br&gt; &lt;p&gt;What&#39;s passed to verify is *never* parsed: only gcc sees it. It is &lt;br&gt; hashed though, to check if something changed. &lt;br&gt; &lt;p&gt;No, that&#39;s fine. &lt;br&gt; &lt;p&gt;Sorry for not being clear. This is not something that works now. &lt;br&gt; It&#39;s only an idea about the future.
  </summary>
  </entry>
  <entry>
  <author>
  <email>_...@yahoo.com</email>
  </author>
  <updated>2013-05-04T09:42:24Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/cbdec6673b1f83a1/e0ef50f8e6e2541f?show_docid=e0ef50f8e6e2541f</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/cbdec6673b1f83a1/e0ef50f8e6e2541f?show_docid=e0ef50f8e6e2541f"/>
  <title type="text">docstrings for cffi-wrapped C entities</title>
  <summary type="html" xml:space="preserve">
  Hi group! &lt;br&gt; The cffi-wrapped C code has a good notion of the number and type of &lt;br&gt; arguments functions accept, the values needed to initialize a structured C &lt;br&gt; data type etc. - and it should even know the names of formal parameters. &lt;br&gt; I would like to somehow extract this information and ideally have it appear
  </summary>
  </entry>
  <entry>
  <author>
  <name>Armin Rigo</name>
  <email>ar...@tunes.org</email>
  </author>
  <updated>2013-05-02T17:01:46Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/08aa0aa64f0cc562/906a770df212a16b?show_docid=906a770df212a16b</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/08aa0aa64f0cc562/906a770df212a16b?show_docid=906a770df212a16b"/>
  <title type="text">Re: [python-cffi] cffi to unittest a c module</title>
  <summary type="html" xml:space="preserve">
  Hi Alexander, &lt;br&gt; &lt;p&gt;On Thu, May 2, 2013 at 4:57 PM, Alexander Eisenhuth &lt;br&gt; &lt;p&gt;Interestingly, I did just that myself :-) It&#39;s slightly cumbersome: &lt;br&gt; as you say you have to repeat ffi.cdef(&amp;quot;...&amp;quot;) by copy-pasting a large &lt;br&gt; portion of the .h file, editing it as necessary to replace a few &lt;br&gt; things with ellipsis (&amp;quot;...&amp;quot;, i.e. dot-dot-dot). But overall it seems
  </summary>
  </entry>
  <entry>
  <author>
  <name>Alexander Eisenhuth</name>
  <email>cca...@googlemail.com</email>
  </author>
  <updated>2013-05-02T14:57:48Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/08aa0aa64f0cc562/61fe7914518fe98f?show_docid=61fe7914518fe98f</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/08aa0aa64f0cc562/61fe7914518fe98f?show_docid=61fe7914518fe98f"/>
  <title type="text">cffi to unittest a c module</title>
  <summary type="html" xml:space="preserve">
  Hello, &lt;br&gt; I want to figure out if it is easy to unittest a C-module with python-ffi. &lt;br&gt; For that reason I wrote a little C-Project( RefTypes.h, Device.c, Device.h) &lt;br&gt; and test_device.py that I&#39;ve attached. &lt;br&gt; Question to test_device.py: &lt;br&gt; - I tried to implement a Callback with a Uin32* as Parameter, but I failed.
  </summary>
  </entry>
  <entry>
  <author>
  <email>_...@yahoo.com</email>
  </author>
  <updated>2013-05-01T15:45:16Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/e7729e0f3418f2e8/6a7d2af55e607e13?show_docid=6a7d2af55e607e13</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/e7729e0f3418f2e8/6a7d2af55e607e13?show_docid=6a7d2af55e607e13"/>
  <title type="text">Re: using hierarchical shared libraries, best practices</title>
  <summary type="html" xml:space="preserve">
  libtest1.so, but to have the glue code in a python sting, cdef() the &lt;br&gt; prototypes and feed the code itself it into verify(). Anyway, judging from &lt;br&gt; my (limited) experience, the expensive step in the whole process is &lt;br&gt; definitely not the call to verify, but the cdefs. This surprised me when I &lt;br&gt; looked into the matter, but AFAICT it&#39;s due to the fact that the cdef
  </summary>
  </entry>
  <entry>
  <author>
  <name>Ming Hu</name>
  <email>humi...@gmail.com</email>
  </author>
  <updated>2013-04-28T03:43:17Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/5cba5482b4b0ea32/c78ff960532aa021?show_docid=c78ff960532aa021</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/5cba5482b4b0ea32/c78ff960532aa021?show_docid=c78ff960532aa021"/>
  <title type="text">Re: [python-cffi] pypy cffi callback crashes when using multithread</title>
  <summary type="html" xml:space="preserve">
  Thanks, we&#39;ve been using CPython with this kind of callbacks nearly a year, &lt;br&gt; and it works fine for us. &lt;br&gt; Recently we want to try Pypy. &lt;br&gt; Since it does not work on Pypy, we&#39;ve just implemented a Python thread and &lt;br&gt; wait for the C thread to complete, and do the callback stuff, so that the &lt;br&gt; system emulate the callback function.
  </summary>
  </entry>
  <entry>
  <author>
  <name>Ondrej Platek</name>
  <email>ondrej.pla...@gmail.com</email>
  </author>
  <updated>2013-04-27T19:37:34Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/cbc79ee1e632ef14/36ef0eb7303f647b?show_docid=36ef0eb7303f647b</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/cbc79ee1e632ef14/36ef0eb7303f647b?show_docid=36ef0eb7303f647b"/>
  <title type="text">Re: [python-cffi] Re: Using verify(source, libraries=[mylib]) and tmpdir parameter</title>
  <summary type="html" xml:space="preserve">
  Thanks, &#39;include_dirs&#39; variable solved the problem very elegantly.
  </summary>
  </entry>
  <entry>
  <author>
  <name>Armin Rigo</name>
  <email>ar...@tunes.org</email>
  </author>
  <updated>2013-04-27T18:53:37Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/5cba5482b4b0ea32/ec02e3c9bd5c6bfa?show_docid=ec02e3c9bd5c6bfa</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/5cba5482b4b0ea32/ec02e3c9bd5c6bfa?show_docid=ec02e3c9bd5c6bfa"/>
  <title type="text">Re: [python-cffi] pypy cffi callback crashes when using multithread</title>
  <summary type="html" xml:space="preserve">
  Hi, &lt;br&gt; &lt;p&gt;I&#39;m just saying, I&#39;m not sure it works correctly on top of CPython &lt;br&gt; too. It might work by luck only in the particular case you&#39;re using. &lt;br&gt; &lt;p&gt;A bientôt, &lt;br&gt; &lt;p&gt;Armin.
  </summary>
  </entry>
  <entry>
  <author>
  <name>Armin Rigo</name>
  <email>ar...@tunes.org</email>
  </author>
  <updated>2013-04-27T18:51:42Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/cbc79ee1e632ef14/7b97879043279b64?show_docid=7b97879043279b64</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/cbc79ee1e632ef14/7b97879043279b64?show_docid=7b97879043279b64"/>
  <title type="text">Re: [python-cffi] Re: Using verify(source, libraries=[mylib]) and tmpdir parameter</title>
  <summary type="html" xml:space="preserve">
  Hi, &lt;br&gt; &lt;p&gt;The official answer is to use ffi.verify(...., include_dirs=[&#39;/path/to/x&#39;]). &lt;br&gt; &lt;p&gt;A bientôt, &lt;br&gt; &lt;p&gt;Armin.
  </summary>
  </entry>
  <entry>
  <author>
  <email>_...@yahoo.com</email>
  </author>
  <updated>2013-04-27T17:11:27Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/cbc79ee1e632ef14/eaabd3a8e4ca8fdf?show_docid=eaabd3a8e4ca8fdf</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/cbc79ee1e632ef14/eaabd3a8e4ca8fdf?show_docid=eaabd3a8e4ca8fdf"/>
  <title type="text">Re: Using verify(source, libraries=[mylib]) and tmpdir parameter</title>
  <summary type="html" xml:space="preserve">
  &amp;quot;/home/you/yourdir/test1.h&amp;quot;. Then the C compiler can find it. And if you &lt;br&gt; put the header into a standard place, you can use #include &amp;lt;test1.h&amp;gt; syntax. &lt;br&gt; Kay
  </summary>
  </entry>
  <entry>
  <author>
  <name>Ondrej Platek</name>
  <email>ondrej.pla...@gmail.com</email>
  </author>
  <updated>2013-04-27T15:38:18Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/e7729e0f3418f2e8/ce13204efbac0bbf?show_docid=ce13204efbac0bbf</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/e7729e0f3418f2e8/ce13204efbac0bbf?show_docid=ce13204efbac0bbf"/>
  <title type="text">Re: [python-cffi] using hierarchical shared libraries, best practices</title>
  <summary type="html" xml:space="preserve">
  Actually, I figured it out. I need to call dlopen in test1.cc to open &lt;br&gt; shared library, &lt;br&gt; because when I tried to set ffi.RTLD_LAZY in lib = &lt;br&gt; ffi.dlopen(&#39;libtest1.so&#39;, ffi.RTLD_LAZY) &lt;br&gt; the response is: &lt;br&gt; &lt;p&gt;test1 # it works &lt;br&gt; python: symbol lookup error: libtest1.so: undefined symbol: test2 &lt;br&gt; &lt;p&gt;PS: Sorry for spamming so many answers, but at least I figured it out.
  </summary>
  </entry>
  <entry>
  <author>
  <name>Ming Hu</name>
  <email>humi...@gmail.com</email>
  </author>
  <updated>2013-04-27T15:36:40Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/5cba5482b4b0ea32/096b801a9e8e2eb2?show_docid=096b801a9e8e2eb2</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/5cba5482b4b0ea32/096b801a9e8e2eb2?show_docid=096b801a9e8e2eb2"/>
  <title type="text">Re: [python-cffi] pypy cffi callback crashes when using multithread</title>
  <summary type="html" xml:space="preserve">
  thanks. I think I have to find another way to solve my problem when using &lt;br&gt; Pypy instead waiting for them to fix this. &lt;br&gt; &lt;p&gt;Armin Rigo於 2013年4月27日星期六UTC+8下午4時16分54秒寫道 ：
  </summary>
  </entry>
  <entry>
  <author>
  <name>Ondrej Platek</name>
  <email>ondrej.pla...@gmail.com</email>
  </author>
  <updated>2013-04-27T15:24:43Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/e7729e0f3418f2e8/0501395959b20227?show_docid=0501395959b20227</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/e7729e0f3418f2e8/0501395959b20227?show_docid=0501395959b20227"/>
  <title type="text">Re: [python-cffi] using hierarchical shared libraries, best practices</title>
  <summary type="html" xml:space="preserve">
  Very interesting is that &lt;br&gt; *lib = ffi.dlopen(&#39;libtest2.so&#39;)* &lt;br&gt; *lib.test2()* &lt;br&gt; * &lt;br&gt; * &lt;br&gt; *works fine!* &lt;br&gt; * &lt;br&gt; *
  </summary>
  </entry>
  <entry>
  <author>
  <name>Ondrej Platek</name>
  <email>ondrej.pla...@gmail.com</email>
  </author>
  <updated>2013-04-27T15:20:47Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/e7729e0f3418f2e8/3b7293f6a50db39c?show_docid=3b7293f6a50db39c</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/e7729e0f3418f2e8/3b7293f6a50db39c?show_docid=3b7293f6a50db39c"/>
  <title type="text">Re: [python-cffi] using hierarchical shared libraries, best practices</title>
  <summary type="html" xml:space="preserve">
  See the example code which fails int the attached test4.zip
  </summary>
  </entry>
  <entry>
  <author>
  <name>Ondrej Platek</name>
  <email>ondrej.pla...@gmail.com</email>
  </author>
  <updated>2013-04-27T14:49:43Z</updated>
  <id>http://groups.google.com/group/python-cffi/browse_thread/thread/e7729e0f3418f2e8/c596fcae2516b5e1?show_docid=c596fcae2516b5e1</id>
  <link href="http://groups.google.com/group/python-cffi/browse_thread/thread/e7729e0f3418f2e8/c596fcae2516b5e1?show_docid=c596fcae2516b5e1"/>
  <title type="text">Re: [python-cffi] using hierarchical shared libraries, best practices</title>
  <summary type="html" xml:space="preserve">
  *ffi.dlopen(&#39;libtest1.so&#39;)* &lt;br&gt; throws an error &lt;br&gt; *library not found: &#39;libtest1.so* &lt;br&gt; &lt;p&gt;I tried setting LD_LIBRARY_PATH to the directory with *libtest1.so*, &lt;br&gt; but that also did not helped, so I tried to use *ffi.verify* &lt;br&gt; &lt;p&gt;Ondra
  </summary>
  </entry>
</feed>
