[gambit-list] C function to procedure

Evan Hanson vnhnsn at gmail.com
Sun Sep 26 16:57:23 EDT 2010


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 at iro.umontreal.ca
>> https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
>
> _______________________________________________
> Gambit-list mailing list
> Gambit-list at iro.umontreal.ca
> https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list



More information about the Gambit-list mailing list