Just Launched: You can now import projects and releases from Google Code onto SourceForge
We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps. Read More
From: Michael Kappert <michael.kappert@gm...> - 2013-11-20 22:29:57
I'm using this definiton
(next (c-ptr-null glist))
(prev (c-ptr-null glist)))
to fetch a return value of type GList (from gtk_container_get_children).
This segfaults if the list is longer than 1.
If I use instead
(next (c-pointer glist))
(prev (c-pointer glist)))
there is no segfault and I can walk the list using
(memory-as (glist-next l) (parse-c-type 'glist))
Am I missing something?
I'm using CLISP 2.49+ and the current ffcall (from Savannah).
From: Michael Kappert <michael.kappert@gm...> - 2013-11-21 00:27:28
On 11/20/2013 11:29 PM, Michael Kappert wrote:
> (def-c-struct glist
> (data c-pointer)
> (next (c-ptr-null glist))
> (prev (c-ptr-null glist)))
> This segfaults if the list is longer than 1.
Ouch. It does not segfault, it runs into a Program stack overflow. Which
is not totally unexpected with a double-linked list...