mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-30 04:30:43 +00:00
For some reason, using static nested function as callback = segfault.
Fixed.
This commit is contained in:
parent
9a3acc8035
commit
8bbd7bc13a
1 changed files with 8 additions and 6 deletions
|
@ -85,10 +85,6 @@ GIB_Function_Free (void *ele, void *ptr)
|
||||||
Builds a new function struct and returns
|
Builds a new function struct and returns
|
||||||
a pointer to it.
|
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
|
static void
|
||||||
afree (void *data, void *unused)
|
afree (void *data, void *unused)
|
||||||
|
@ -96,6 +92,12 @@ GIB_Function_New (const char *name)
|
||||||
free (data);
|
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->text = dstring_newstr ();
|
||||||
new->name = strdup (name);
|
new->name = strdup (name);
|
||||||
new->arglist = llist_new (afree, NULL, NULL);
|
new->arglist = llist_new (afree, NULL, NULL);
|
||||||
|
|
Loading…
Reference in a new issue