Hi folks! Here're patches (based on stable-2.0) to fix this issue according to proposal 1. Please review them, I'm going to write a new CFFI parser with nyacc, so these patches is important for this plan. Thanks! On Sat, 2015-01-24 at 11:33 +0100, Ludovic Courtès wrote: > Mark H Weaver skribis: > > > ludo@gnu.org (Ludovic Courtès) writes: > > > >> Chaos Eternal skribis: > >> > >>> Proposals to solve this bug: > >>> > >>> Proposal 1. > >>> > >>> Adding a keyword argument to pointer->procedure, if set to true, the > >>> generated wrapper will check 'errno' immediately after ffi_call and > >>> return the errno as second value. > >>> > >>> the proposed pointer->procedure maybe like this: > >>> pointer->procedure return_type func_ptr arg_types #:return-errno > I agree #1 is now the best option so far. > > Ludo’.