plug-ins/script-fu/script-fu-scripts.c use GSlice to allocate structs.
2007-05-22 Sven Neumann <sven@gimp.org> * plug-ins/script-fu/script-fu-scripts.c * plug-ins/script-fu/script-fu-interface.c: use GSlice to allocate structs. svn path=/trunk/; revision=22568
This commit is contained in:

committed by
Sven Neumann

parent
ba25863e49
commit
017ff2e06d
@ -1,3 +1,9 @@
|
|||||||
|
2007-05-22 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
|
* plug-ins/script-fu/script-fu-scripts.c
|
||||||
|
* plug-ins/script-fu/script-fu-interface.c: use GSlice to allocate
|
||||||
|
structs.
|
||||||
|
|
||||||
2007-05-22 Sven Neumann <sven@gimp.org>
|
2007-05-22 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* libgimp/gimpdrawable.c
|
* libgimp/gimpdrawable.c
|
||||||
|
@ -209,7 +209,8 @@ script_fu_interface (SFScript *script,
|
|||||||
gtk_initted = TRUE;
|
gtk_initted = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
sf_interface = g_new0 (SFInterface, 1);
|
sf_interface = g_slice_new0 (SFInterface);
|
||||||
|
|
||||||
sf_interface->widgets = g_new0 (GtkWidget *, script->num_args);
|
sf_interface->widgets = g_new0 (GtkWidget *, script->num_args);
|
||||||
|
|
||||||
/* strip mnemonics from the menupath */
|
/* strip mnemonics from the menupath */
|
||||||
@ -631,7 +632,7 @@ script_fu_interface_quit (SFScript *script)
|
|||||||
g_free (sf_interface->widgets);
|
g_free (sf_interface->widgets);
|
||||||
g_free (sf_interface->last_command);
|
g_free (sf_interface->last_command);
|
||||||
|
|
||||||
g_free (sf_interface);
|
g_slice_free (SFInterface, sf_interface);
|
||||||
sf_interface = NULL;
|
sf_interface = NULL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -157,7 +157,7 @@ script_fu_add_script (scheme *sc, pointer a)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Create a new script */
|
/* Create a new script */
|
||||||
script = g_new0 (SFScript, 1);
|
script = g_slice_new0 (SFScript);
|
||||||
|
|
||||||
/* Find the script name */
|
/* Find the script name */
|
||||||
val = sc->vptr->string_value (sc->vptr->pair_car (a));
|
val = sc->vptr->string_value (sc->vptr->pair_car (a));
|
||||||
@ -646,7 +646,7 @@ script_fu_add_menu (scheme *sc, pointer a)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Create a new list of menus */
|
/* Create a new list of menus */
|
||||||
menu = g_new0 (SFMenu, 1);
|
menu = g_slice_new0 (SFMenu);
|
||||||
|
|
||||||
menu->script = script;
|
menu->script = script;
|
||||||
|
|
||||||
@ -740,7 +740,7 @@ script_fu_install_menu (SFMenu *menu)
|
|||||||
gimp_plugin_menu_register (menu->script->name, menu->menu_path);
|
gimp_plugin_menu_register (menu->script->name, menu->menu_path);
|
||||||
|
|
||||||
g_free (menu->menu_path);
|
g_free (menu->menu_path);
|
||||||
g_free (menu);
|
g_slice_free (SFMenu, menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -754,11 +754,7 @@ script_fu_remove_script (gpointer foo G_GNUC_UNUSED,
|
|||||||
GList *list;
|
GList *list;
|
||||||
|
|
||||||
for (list = scripts; list; list = g_list_next (list))
|
for (list = scripts; list; list = g_list_next (list))
|
||||||
{
|
script_fu_free_script (list->data);
|
||||||
SFScript *script = list->data;
|
|
||||||
|
|
||||||
script_fu_free_script (script);
|
|
||||||
}
|
|
||||||
|
|
||||||
g_list_free (scripts);
|
g_list_free (scripts);
|
||||||
|
|
||||||
@ -1149,7 +1145,7 @@ script_fu_free_script (SFScript *script)
|
|||||||
g_free (script->arg_types);
|
g_free (script->arg_types);
|
||||||
g_free (script->arg_values);
|
g_free (script->arg_values);
|
||||||
|
|
||||||
g_free (script);
|
g_slice_free (SFScript, script);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gint
|
static gint
|
||||||
|
Reference in New Issue
Block a user