[gclist] Segmentation faults + quick fix in mail
elmex@x-paste.de
elmex@x-paste.de
Tue, 1 May 2001 18:05:20 +0200
I am sorry,
i made a little mistake in the example here:
> Here is what i mean:
> ===
> struct L { char *a; char *b }; struct S { char *a; };
> ...
> struct L *ptr=malloc(sizeof(struct L));
> struct S *sptr=NULL;
> struct L *lptr=NULL;
> ptr->a = GC_malloc(sizeof(char) * 4); ptr->a = "foo";
> ptr->b = GC_malloc(sizeof(char) * 4); ptr->b = "bar";
Its of course:
ptr->a = my_own_strdup("foo");
ptr->b = my_own_strdup("bar");
...
cya