This is the mail archive of the guile@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]

vectors of integers



How does one assert (with libguile) that an SCM object is a vector whose 
components are unsigned integers?
In particular I'd like to do that before mallocating a suitable ulong *
to hold the components of the array. Memory will leak when forgetting to
free a mallocated pointer before the data conversion function triggers a
wrong-type-error.

Those prob[ems arise for wrapping the shuffle and choose routines in
libgsl_randist , as well as for functions like addchstr in curses.

On the other hand, shuffle/choose can be easily written in scheme, using 
other subrs obtained from gsl_ran, same is with addchstr , based on other
wrapped curses routines. Is that a reason for not wrapping those functions
or just a poor excuse? 


Klaus Schilling