For some reason, using static nested function as callback = segfault.

Fixed.
This commit is contained in:
Brian Koropoff 2004-04-09 18:18:19 +00:00
parent 9a3acc8035
commit 8bbd7bc13a

View file

@ -85,10 +85,6 @@ GIB_Function_Free (void *ele, void *ptr)
Builds a new function struct and returns
a pointer to it.
*/
static gib_function_t *
GIB_Function_New (const char *name)
{
gib_function_t *new = calloc (1, sizeof (gib_function_t));
static void
afree (void *data, void *unused)
@ -96,6 +92,12 @@ GIB_Function_New (const char *name)
free (data);
};
static gib_function_t *
GIB_Function_New (const char *name)
{
gib_function_t *new = calloc (1, sizeof (gib_function_t));
new->text = dstring_newstr ();
new->name = strdup (name);
new->arglist = llist_new (afree, NULL, NULL);