This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

I'd like to add support for gh_*longlong*



I added support for (unsigned) long longs to g-wrap, and to do so, I
had to hack up my own gh_scm2longlong, gh_longlong2scm, etc.

The way I did it was quick and *ugly*, but it appeared to work.  I'd
like to do something cleaner, and contribute it back to guile, but I
wanted to first see if anyone else has already done this or is working
on it.  If not, I'd like to hear suggestions for the best way to
handle this.

The way I've initially done it is to cache bindings (on the first call
to this set of functions) for the scheme level quotient, remainder, +,
and * functions, and then use those to move a scheme exact number to
and from a C long long.

Is there a better way?  Would it be much more efficient to build an
anonymous scheme function that does the whole job rather than making a
couple of gh_call's to the cached scheme +, *, remainder,
etc. bindings, or is there perhaps a lower level interface that'll let
me manipulate things more directly?

Thanks

-- 
Rob Browning <rlb@cs.utexas.edu> PGP=E80E0D04F521A094 532B97F5D64E3930

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]