Good. The reason this happens is that floats and ints (and other
types like doubles and structs) are not necessarily returned or passed
interchangably. Omitting the prototype causes your code to expect the
default integer return type from your foreign function, which produces
unspecified behaviour that varies from platform to platform.
libffi exists in great part to handle hairy calling conventions. I
found this out the hard way while writing the Objective C interface.
On 8/28/06, John Cowan <address@hidden> wrote:
> Zbigniew scripsit:
> > Did you change the return type of your function back to 'float'?
> No, I apparently just failed to recompile. Here's what I've got now:
> [...]
> So it works.
_______________________________________________
Chicken-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/chicken-users