[gambit-list] automatic int -> double conversion

Marc Feeley feeley at iro.umontreal.ca
Wed May 20 18:26:06 EDT 2009


On 20-May-09, at 12:45 PM, lowly coder wrote:

> Please see attached typescript. What am I doing wrong with my c-to- 
> scheme and scheme-to-c functions?
>
> c-define-type has a form of:
>
> (c-define-type type type c-to-scheme scheme-to-c)

The conversion functions are C functions.  So you need:

(c-define-type type "type" "c_to_scheme" "scheme_to_c")

Please look at the examples in section 19.6 of the manual.  As I have  
said the hardest part will be to convert bignums to doubles.

Marc




More information about the Gambit-list mailing list