summaryrefslogtreecommitdiff
path: root/obt
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2010-02-16 16:26:18 -0500
committerDana Jansens <danakj@orodu.net>2010-02-16 16:32:38 -0500
commitd179d6428ae585a3b8a13479bfe4586e41de2ff9 (patch)
tree322cb58fea023dc635432cef8f06307008c8f4c8 /obt
parentd45af3cb45f35ba639efac15675ed10b3515a7f0 (diff)
more using g_slice_new() instead of g_new()
Diffstat (limited to 'obt')
-rw-r--r--obt/mainloop.c4
-rw-r--r--obt/paths.c4
-rw-r--r--obt/xevent.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/obt/mainloop.c b/obt/mainloop.c
index c0b9bb59..ecdd7f7f 100644
--- a/obt/mainloop.c
+++ b/obt/mainloop.c
@@ -155,7 +155,7 @@ ObtMainLoop *obt_main_loop_new(void)
{
ObtMainLoop *loop;
- loop = g_new0(ObtMainLoop, 1);
+ loop = g_slice_new0(ObtMainLoop);
loop->ref = 1;
FD_ZERO(&loop->fd_set);
loop->fd_x = -1;
@@ -249,7 +249,7 @@ void obt_main_loop_unref(ObtMainLoop *loop)
}
}
- obt_free0(loop, ObtMainLoop, 1);
+ g_slice_free(ObtMainLoop, loop);
}
}
diff --git a/obt/paths.c b/obt/paths.c
index 68615433..da6f288b 100644
--- a/obt/paths.c
+++ b/obt/paths.c
@@ -80,7 +80,7 @@ ObtPaths* obt_paths_new(void)
ObtPaths *p;
const gchar *path;
- p = g_new0(ObtPaths, 1);
+ p = g_slice_new0(ObtPaths);
p->ref = 1;
path = g_getenv("XDG_CONFIG_HOME");
@@ -163,7 +163,7 @@ void obt_paths_unref(ObtPaths *p)
g_free(p->data_home);
g_free(p->cache_home);
- obt_free0(p, ObtPaths, 1);
+ g_slice_free(ObtPaths, p);
}
}
diff --git a/obt/xevent.c b/obt/xevent.c
index 21beb930..10771657 100644
--- a/obt/xevent.c
+++ b/obt/xevent.c
@@ -49,7 +49,7 @@ ObtXEventHandler* xevent_new(void)
{
ObtXEventHandler *h;
- h = g_new0(ObtXEventHandler, 1);
+ h = g_slice_new0(ObtXEventHandler);
h->ref = 1;
return h;
@@ -71,7 +71,7 @@ void xevent_unref(ObtXEventHandler *h)
g_hash_table_destroy(h->bindings[i]);
g_free(h->bindings);
- obt_free0(h, ObtXEventHandler, 1);
+ g_slice_free(ObtXEventHandler, h);
}
}