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

2019-03-31 Thread Mark H Weaver
Hi David, David Pirotte writes: >> 'make-c-struct' copies the C pointers from those foreign pointer objects, >> but not >> not keep a reference to the objects themselves. > > To me, this sounds very counter intuitive, actually, it sounds like a bug, > make-c-struct should be holding a referenc

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

2019-03-31 Thread David Pirotte
Hi Mark, Thanks for your help. > > ... > > scheme@(guile-user)> (make-c-struct (list '* '*) (list (string->pointer > > "hello > > ") (string->pointer "there!"))) $16 = # > > scheme@(guile-user)> (parse-c-struct $16 (list '* '*)) > > $17 = (# #) > > scheme@(guile-user)> (map pointer->string $17)