Hello Mark,
> >> '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 reference to the po
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
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
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)
Hi David,
David Pirotte writes:
> Hello,
>
> guile 2.2.4.1-cdb19
>
> ,use (system foreign)
>
> ;; this fails
>
> scheme@(guile-user)> (make-c-struct (list '* '*) (list (string->pointer
> "hello ") (string->pointer "there!")))
> $16 = #
> scheme@(guile-user)> (parse-c-struct $16 (list '* '
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)
> >
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
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
On Thu, 28 Mar 2019 at 15:15, Amirouche Boubekki
wrote:
>
> Eventually, I can reproduced the issue with guile-next from guix:
>
> scheme@(guile-user) [1]> (make-c-struct (list '* '*) (list (string->pointer
> "hello ") (string->pointer "there!")))
> $5 = #
> scheme@(guile-user) [1]> (parse-c-struc
Hi Amirouche,
I should add to your own answer that you actually were unable to reproduce the
problem while using the latest 2.2 release tarball (the one that Ubuntu
packages to
be (even) more precise), as one can see on your gnome paste earlier today [1]
So, if this is corect, there must be a co
Eventually, I can reproduced the issue with guile-next from guix:
scheme@(guile-user) [1]> (make-c-struct (list '* '*) (list (string->pointer
"hello ") (string->pointer "there!")))
$5 = #
scheme@(guile-user) [1]> (parse-c-struct $5 (list '* '*))
$6 = (# #)
scheme@(guile-user) [1]> (map pointer->st
Hello,
guile 2.2.4.1-cdb19
,use (system foreign)
;; this fails
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->st
12 matches
Mail list logo