archie1234132 has quit [Ping timeout: 260 seconds]
archie1234132 has joined #pypy
lesshaste has quit [Remote host closed the connection]
lesshaste has joined #pypy
derpydoo has quit [Ping timeout: 240 seconds]
<arigato>
archie1234132: re threads: I've tried hard to make sure callbacks work with threads, can you somehow reduce the problem and post a bug report?
<arigato>
archie1234132: re ptr-to-ptr-to-function: it's like passing a ptr-to-integer, you can't just say ffi.addressof(5). You need to do something like p=ffi.new("int[1]", 5). In your case, p=ffi.new("mycallback_t[1]", lib.mycallback_python)
<arigato>
then you pass p, and after the call you can read the possibly modified value from p[0]
<arigato>
sorry, I mean: ffi.new("int[1]", [5]) or ffi.new("mycallback_t[1]", [lib.mycallback_python])
<arigato>
or, as a shortcut if you don't need to read any modified value, you can call directly f with argument [lib.mycallback_python], I think (to make an array of 1 mycallback_t)