summaryrefslogtreecommitdiffstats
path: root/glib/glibmodule.c
diff options
context:
space:
mode:
authorJohan Dahlin <johan@gnome.org>2008-07-26 08:23:01 +0000
committerJohan Dahlin <johan@src.gnome.org>2008-07-26 08:23:01 +0000
commit215c9ddd9fbb3d2248a31acfb8e213a122be4cd1 (patch)
tree0e758f01735f95cf37c986cb367b33642607d8aa /glib/glibmodule.c
parent6ac66c8fb6be0f3b27508582063afaced63250c1 (diff)
downloadpygobject-215c9ddd9fbb3d2248a31acfb8e213a122be4cd1.tar.gz
pygobject-215c9ddd9fbb3d2248a31acfb8e213a122be4cd1.tar.xz
pygobject-215c9ddd9fbb3d2248a31acfb8e213a122be4cd1.zip
Use g_slice_new instead of g_new
2008-07-26 Johan Dahlin <johan@gnome.org> * glib/glibmodule.c (child_watch_dnotify), (pyglib_child_watch_add): * glib/pygiochannel.c (pyg_iowatch_data_free), (py_io_channel_add_watch): * glib/pygspawn.c (_pyg_spawn_async_callback), (pyglib_spawn_async): Use g_slice_new instead of g_new svn path=/trunk/; revision=855
Diffstat (limited to 'glib/glibmodule.c')
-rw-r--r--glib/glibmodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/glib/glibmodule.c b/glib/glibmodule.c
index 830da13..0abf505 100644
--- a/glib/glibmodule.c
+++ b/glib/glibmodule.c
@@ -340,7 +340,7 @@ child_watch_dnotify(gpointer data)
struct _PyGChildData *child_data = (struct _PyGChildData *) data;
Py_DECREF(child_data->func);
Py_XDECREF(child_data->data);
- g_free(child_data);
+ g_slice_free(struct _PyGChildData, child_data);
}
@@ -364,7 +364,7 @@ pyglib_child_watch_add(PyObject *unused, PyObject *args, PyObject *kwargs)
return NULL;
}
- child_data = g_new(struct _PyGChildData, 1);
+ child_data = g_slice_new(struct _PyGChildData);
child_data->func = func;
child_data->data = user_data;
Py_INCREF(child_data->func);