[cffi-devel] Long Long
Luis Oliveira
luismbo at gmail.com
Sun Sep 18 20:46:27 UTC 2005
On 18/set/2005, at 17:46, Jeff Huter wrote:
> Any chance of support for long long ints in the near future? If not,
> any
> suggestions how to work around? I'm currently trying to bind to some
> systems level routines and long long ints are used somewhat
> frequently. I
> thought I might be able to generate a struct of two long ints to
> receive
> the long long int. But my first attempts have resulted in segmentation
> violations.
AFAICT, no Lisp actually supports "long long", or if they do it's
undocumented.
Trying to use a struct with two longs won't work, among other reasons,
because we pass structs by reference. So, you were actually trying to
fit a long long in a pointer (an int), and then dereferencing that.
CLISP allegedly supports an :[us]int64 type, but I couldn't get it to
work under either linux/x86 or darwin/ppc. I suppose it only works on
64bit platforms? I guess you're out of luck there too.
All I can think of is ugly C glue to split long long into two longs
(pretty much what you intended to do using a struct). You should
probably ask your lisp vendor for long long support. :-/
--
Luís Oliveira
http://student.dei.uc.pt/~lmoliv/
Equipa Portuguesa do Translation Project
http://www.iro.umontreal.ca/translation/registry.cgi?team=pt
More information about the cffi-devel
mailing list