[gclist] Segmentation faults + 2nd quick fix in mail
elmex@x-paste.de
elmex@x-paste.de
Tue, 1 May 2001 18:32:43 +0200
Here is a fixed version of the example:
I am sorry,
i made a little mistake in the example here:
struct L { char *a; char *b }; struct S { char *a; };
...
struct L *ptr=GC_malloc(sizeof(struct L));
struct S *sptr=NULL;
struct L *lptr=NULL;
ptr->a = GC_malloc(sizeof(char) * 4); ptr->a = my_own_strdup_uses_GC_malloc("foo");
ptr->b = GC_malloc(sizeof(char) * 4); ptr->b = my_own_strdup_uses_GC_malloc("bar");
please excuse, cya
>