|
From: | Thomas Chust |
Subject: | Re: [Chicken-users] FFI Question |
Date: | Sun, 7 May 2006 18:29:24 +0000 (GMT) |
On Wed, 3 May 2006, Heath Johns wrote:
Hey there, nice scheme you've got here folks :) I've got a noob question: Why does this segfault? Should I be doing this differently? I'm using 2.3 stable on linux... [...]
Hello,try using c-string* instead of c-string as the return type of nothing. I'm not entirely sure, yet, why c-string does not work but c-string* does, so it is at least a possible workaround for the moment.
Also, I think I may have found an unrelated bug. It seems that the optimizer takes out arguments from lambdas if they're not being used, and this doesn't agree with callbacks. [...]
Try using (define-external (zoot (int one) (int two)) void (display one)) instead. Again I'm not sure why this works and your syntax doesn't, but again it's a possible workaround for the moment ;-)
cu, Thomas
[Prev in Thread] | Current Thread | [Next in Thread] |