[cffi-devel] detecting int size used by library
Liam Healy
lnp at healy.washington.dc.us
Thu May 27 03:00:32 UTC 2010
Tamas,
Here's what I have in GSLL
(case (cffi:foreign-type-size :long)
(8
(push :int64 *features*)
#+fsbv (fsbv:defsynonym sizet :uint64))
(4
(push :int32 *features*)
#+fsbv (fsbv:defsynonym sizet :uint32)))
Liam
On Wed, May 26, 2010 at 7:42 AM, Tamas K Papp <tkpapp at gmail.com> wrote:
> Hi,
>
> Is there a way to detect the size of integers (ie 32 or 64 bit) used
> by a library?
>
> I am using LAPACK/BLAS (ATLAS) libraries via CFFI. Recently, my
> tests failed, and to my surprise, the solution was to use 32-bit ints.
> Note that I am on a 64-bit platform, using the Ubuntu libraries, so
> why this happens is a mystery. But it would be great if I could
> detect it somehow from within Lisp.
>
> Thanks,
>
> Tamas
>
>
> _______________________________________________
> cffi-devel mailing list
> cffi-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/cffi-devel
>
More information about the cffi-devel
mailing list