Re: make-c-struct and pointer->string

2019-03-29 Thread Neil Jerram
On Fri, 29 Mar 2019, 09:46 David Pirotte, wrote: > Hi again, > > > ... > > Following your explanation and example, I tried this and thought it > would work > > then, but it also failed: > > > GNU Guile 2.2.4.1-cdb19 > > > Enter `,help' for help. > > scheme@(guile-user)> ,use (system foreign) > >

Re: make-c-struct and pointer->string

2019-03-29 Thread David Pirotte
Hi again, > ... > Following your explanation and example, I tried this and thought it would work > then, but it also failed: > GNU Guile 2.2.4.1-cdb19 > Enter `,help' for help. > scheme@(guile-user)> ,use (system foreign) > scheme@(guile-user)> (define str-1 "Hello") > scheme@(guile-user)> (def

Re: make-c-struct and pointer->string

2019-03-29 Thread David Pirotte
Hello Neil, > I guess it may be GC. I've had problems with code like > >(procedure->pointer void (lambda (...) ...) args...) > > because procedure->pointer does not protect the (lambda ...) from being GC'd. > > For example: > http://git.savannah.nongnu.org/cgit/ossaulib.git/commit/?id=1d31