[Cffi-devel] Fw: Casting variables and functions

Stelian Ionescu sionescu at cddr.org
Sun Mar 30 15:31:30 UTC 2014


On Sun, 2014-03-30 at 08:14 -0700, Joeish W wrote:
> I was just wondering why cffi doesn't do automatic conversions.  Since
> casting is used so much in c I  think it would do automatic
> conversions...Do experts in CFFI normally use this approach,  do they
> cast on the Lisp side or use another approach..I'd like to start
> learning the best way to do things

There is no other approach to use. You must always pass the right type
to CFFI, and do type coercions beforehand either explicitly or
implicitly through custom types.

-- 
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/20140330/34b7a451/attachment.sig>


More information about the cffi-devel mailing list