|
From: | William Ramsay |
Subject: | [Chicken-users] Passing parameters to C |
Date: | Wed, 02 May 2007 07:32:57 -0400 |
User-agent: | Thunderbird 1.5.0.10 (X11/20070221) |
Hi,I'm still fairly new at Scheme and trying to do something quite difficult, which brings me up short every now and then.
I'm working with Gtk and easyFFI. What I need to do is pass a parameter into a C function and get the same parameter passed back to me from C. (I have a series of similar color buttons and want to know which button was pressed - so I pass in the button number and will determine which one it was when I get the signal back) The problem is that parameters are passed by value in Scheme and C expects to get a pointer. On the return signal I get an error that the value being returned is not a pointer.
Can anyone explain how I pass a pointer from Scheme into C. Oddly enough #f is treated as a pointer, but nothing else seems to be.
Thanks, Bill
[Prev in Thread] | Current Thread | [Next in Thread] |