summaryrefslogtreecommitdiffstats
path: root/glib/pygspawn.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/pygspawn.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/pygspawn.c')
-rw-r--r--glib/pygspawn.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/glib/pygspawn.c b/glib/pygspawn.c
index 7f35f58..515cdd9 100644
--- a/glib/pygspawn.c
+++ b/glib/pygspawn.c
@@ -132,7 +132,7 @@ _pyg_spawn_async_callback(gpointer user_data)
PyErr_Print();
Py_DECREF(data->func);
Py_XDECREF(data->data);
- g_free(data);
+ g_slice_free(struct _PyGChildSetupData, data);
pyglib_gil_state_release(gil);
}
@@ -234,7 +234,7 @@ pyglib_spawn_async(PyObject *object, PyObject *args, PyObject *kwargs)
g_free(envp);
return NULL;
}
- callback_data = g_new(struct _PyGChildSetupData, 1);
+ callback_data = g_slice_new(struct _PyGChildSetupData);
callback_data->func = func;
callback_data->data = user_data;
Py_INCREF(callback_data->func);
@@ -257,7 +257,7 @@ pyglib_spawn_async(PyObject *object, PyObject *args, PyObject *kwargs)
if (callback_data) {
Py_DECREF(callback_data->func);
Py_XDECREF(callback_data->data);
- g_free(callback_data);
+ g_slice_free(struct _PyGChildSetupData, callback_data);
}
pyglib_error_check(&error);
return NULL;