C function to procedure
All, I know conversion from function pointers to Scheme procedures in c-define forms isn't possible, but I'm posting in the hopes that someone knows a way to achieve the same effect. I just need some way to access/call the passed function; I've tried using a c-lambda form that calls the passed function but haven't worked out the magic incantation yet. Any ideas? Thanks, Evan
Afficher les réponses par date
For memory: typedef int (*ProcType)(int,int); ProcType proc = (ProcType) ___arg1__voidstar; ___result = (*proc)(___arg2, ___arg3); On 2010-9-26, at 10:00 , Evan Hanson wrote:
All,
I know conversion from function pointers to Scheme procedures in c-define forms isn't possible, but I'm posting in the hopes that someone knows a way to achieve the same effect. I just need some way to access/call the passed function; I've tried using a c-lambda form that calls the passed function but haven't worked out the magic incantation yet. Any ideas?
Thanks,
Evan _______________________________________________ Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
Exactly the starting point I needed. Thanks. Evan On 09/26/2010 01:04 PM, Stéphane Le Cornec wrote:
For memory:
typedef int (*ProcType)(int,int); ProcType proc = (ProcType) ___arg1__voidstar; ___result = (*proc)(___arg2, ___arg3);
On 2010-9-26, at 10:00 , Evan Hanson wrote:
All,
I know conversion from function pointers to Scheme procedures in c-define forms isn't possible, but I'm posting in the hopes that someone knows a way to achieve the same effect. I just need some way to access/call the passed function; I've tried using a c-lambda form that calls the passed function but haven't worked out the magic incantation yet. Any ideas?
Thanks,
Evan _______________________________________________ Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
_______________________________________________ Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
participants (2)
-
Evan Hanson -
Stéphane Le Cornec