foreign-type-size implementation

Stelian Ionescu sionescu at cddr.org
Fri Aug 25 18:14:11 UTC 2017


> On Fri, Aug 18, 2017 at 4:43 PM, james anderson <james at dydra.com> wrote:
> > i am not sure my tests are correct and am not sure how parnoid they should be.
> 
> This passes the CFFI test suite:
> 
> (define-compiler-macro foreign-type-size (&whole form type)
>   (if (constantp type)
>       (foreign-type-size (eval type))
>       form))

We could use constantp and eval-constant from https://github.com/sionescu/static-vectors/blob/master/src/constantp.lisp, which cover a few more cases. Do you think it would be worth extracting those to a small separate library ?

-- 
Stelian Ionescu a.k.a. fe[nl]ix
Quidquid latine dictum sit, altum videtur.



More information about the cffi-devel mailing list