diff options
| author | Dana Jansens <danakj@orodu.net> | 2010-02-12 13:55:26 -0500 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2010-02-12 13:55:26 -0500 |
| commit | 4f93731cdbecbf43b82aa000c07ec8b40f97dd03 (patch) | |
| tree | 023b9a8787b4488487c0328302516c08c430c948 /openbox/actions.c | |
| parent | 1d57f7b08590255e57dd5931a1993507b4f116c2 (diff) | |
use g_slice_new() instead of g_new() part 2
Diffstat (limited to 'openbox/actions.c')
| -rw-r--r-- | openbox/actions.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/openbox/actions.c b/openbox/actions.c index 945233e6..2324bc95 100644 --- a/openbox/actions.c +++ b/openbox/actions.c @@ -102,7 +102,7 @@ ObActionsDefinition* do_register(const gchar *name, return NULL; } - def = g_new(ObActionsDefinition, 1); + def = g_slice_new(ObActionsDefinition); def->ref = 1; def->name = g_strdup(name); def->free = free; @@ -164,7 +164,7 @@ static void actions_definition_unref(ObActionsDefinition *def) { if (def && --def->ref == 0) { g_free(def->name); - g_free(def); + g_slice_free(ObActionsDefinition, def); } } @@ -184,7 +184,7 @@ static ObActionsAct* actions_build_act_from_string(const gchar *name) /* if we found the action */ if (def) { - act = g_new(ObActionsAct, 1); + act = g_slice_new(ObActionsAct); act->ref = 1; act->def = def; actions_definition_ref(act->def); @@ -268,7 +268,7 @@ void actions_act_unref(ObActionsAct *act) act->def->free(act->options); /* unref the definition */ actions_definition_unref(act->def); - g_free(act); + g_slice_free(ObActionsAct, act); } } |
