[Openmcl-devel] Getting a double-float from ObjC
sebnozzi at gmx.net
Sat Jun 12 20:55:13 EDT 2004
I need to call a method which returns a double-float.
OpenMCL says I need to call it with send/sret (it assumes that it's a
structure since the return value is big, more than 4 bytes; I don't know
if the assumption is correct ...?). So I do that, using rlet and all...
(rlet ((the-time :double-float))
(send (@class ns-date) :date-with-time-interval-since-now 10000.0d0)
...but it crashes openMCL. In the docs it says that the body evaluates
and returns whatever type I specified. How do I get a lisp-usable
number? What I am doing wrong so it crashes? Is send/stret the way to go
here? (I think, for example, in the case of a normal C function
returning a double it would just work out of the box...?)
Thanks in advance,
More information about the Openmcl-devel