How do I return a character from a C function in a gambit scheme?

I have a C function behind a c lambda that should do some trickery by calling select (2) and decide to return a schema symbol as an indication of what it did and whether an error condition occurred. How to get the named symbol name as ___SCMOBJ (or anything more appropriate) from C is not explained in the docs and the wiki seems to have crashed. It is also not immediately clear from gambit.h whether there is a macro for this purpose.

Is this possible out of the box? My workaround for now is to pass the returned characters as function arguments, but with a large set of characters I want to return, which will get very cumbersome very quickly.

+3


source to share


1 answer


I asked this question on the gambit-c mailing list . There were three main answers:



I'm going with (1) for now because I want to be compatible with the Debian Squeeze gambit and I don't think the performance hit will be significant.

0


source







All Articles