gedit r6873 - in trunk: . plugins/filebrowser
- From: icq svn gnome org
- To: svn-commits-list gnome org
- Subject: gedit r6873 - in trunk: . plugins/filebrowser
- Date: Mon, 2 Feb 2009 11:33:32 +0000 (UTC)
Author: icq
Date: Mon Feb 2 11:33:32 2009
New Revision: 6873
URL: http://svn.gnome.org/viewvc/gedit?rev=6873&view=rev
Log:
2009-02-02 Ignacio Casal Quinteiro <nacho resa gmail com>
* plugins/filebrowser/gedit-file-browser-store.c:
Use g_slice_new instead of g_new.
Modified:
trunk/ChangeLog
trunk/plugins/filebrowser/gedit-file-browser-store.c
Modified: trunk/plugins/filebrowser/gedit-file-browser-store.c
==============================================================================
--- trunk/plugins/filebrowser/gedit-file-browser-store.c (original)
+++ trunk/plugins/filebrowser/gedit-file-browser-store.c Mon Feb 2 11:33:32 2009
@@ -1288,7 +1288,7 @@
static FileBrowserNode *
file_browser_node_new (GFile * file, FileBrowserNode * parent)
{
- FileBrowserNode *node = g_new0 (FileBrowserNode, 1);
+ FileBrowserNode *node = g_slice_new0 (FileBrowserNode);
file_browser_node_init (node, file, parent);
return node;
@@ -1299,7 +1299,7 @@
GFile * file, FileBrowserNode * parent)
{
FileBrowserNode *node =
- (FileBrowserNode *) g_new0 (FileBrowserNodeDir, 1);
+ (FileBrowserNode *) g_slice_new0 (FileBrowserNodeDir);
file_browser_node_init (node, file, parent);
@@ -1381,7 +1381,11 @@
g_object_unref (node->emblem);
g_free (node->name);
- g_free (node);
+
+ if (NODE_IS_DIR (node))
+ g_slice_free (FileBrowserNodeDir, (FileBrowserNodeDir *)node);
+ else
+ g_slice_free (FileBrowserNode, (FileBrowserNode *)node);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]