[cffi-devel] Re: Returning errno as a second value
Stelian Ionescu
sionescu at cddr.org
Tue Jan 28 15:11:35 UTC 2014
On Tue, 2014-01-28 at 15:33 +0100, Felix Filozov wrote:
> Hi Luís,
> I am hoping to resurrect this thread. Did you by any chance take a
> look at the pull request I made a few months ago relating to this
> feature?
I strongly object to anything that slows down the common call path,
which is the case here because capture-errno is always called when not
using libffi.
In addition, IMO this is a hairy-enough case that we should ask the
implementors to add this feature and not do it ourselves.
As for the interface, the simplest thing might be to add it as last
value - not second because custom foreign types can return multiple
values, e.g. string+ptr - but that will turn out to be slow because I
don't think our current type system knows about arity of custom types
and marshalling unknown numbers of multiple values will cons.
--
Stelian Ionescu a.k.a. fe[nl]ix
Quidquid latine dictum sit, altum videtur.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20140128/f59b72b5/attachment.sig>
More information about the cffi-devel
mailing list