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] |
Klaus Schilling <Klaus.Schilling@home.ivm.de> wrote: > > If one wants to translate perl stuff from W. Setzers perl curses module > , would one use that module (i.e. perlxs generated stubs) or translate > perl calls to scheme calls using guile stubs for curses, e.g. the > ones that i have preliminarily written? > A problem is that several setzer's calls appear not to be safe w.r.t > memory allocation and garbage collection, and those problematic calls > i don't know yet how to write substitutes for. If all you want is a Guile curses module, you should (and already have?) write Guile stubs, perhaps using the Perl module for guidance. If there are crashes during garbage collection, the only thing that occurs to me is to check whether any objects hold references which need to be marked. Otherwise, any misuse of the curses library should be reproducible in Perl. On the other hand, if one were to implement my grandiose plan for supporting Perl in Guile, you could use XS modules directly and write Scheme wrappers without touching C. For example: (define (subwin orig nlines ncols begin-y begin-x) (perl-call "Curses::subwin" orig nlines ncols begin-y begin-x)) This assumes one of two things. Either you are linking with libperl and using Perl data structures, or you have written a version of xsubpp which translates XS into Guile stubs. > > Klaus Schilling