epiphany r8141 - branches/gnome-2-22/embed



Author: chpe
Date: Fri Mar 28 15:06:20 2008
New Revision: 8141
URL: http://svn.gnome.org/viewvc/epiphany?rev=8141&view=rev

Log:
Use g_slice for EphyPasswordInfo, EphyPermissionInfo, PixbufCacheEntry. (#521017)



Modified:
   branches/gnome-2-22/embed/ephy-favicon-cache.c
   branches/gnome-2-22/embed/ephy-password-manager.c
   branches/gnome-2-22/embed/ephy-permission-manager.c

Modified: branches/gnome-2-22/embed/ephy-favicon-cache.c
==============================================================================
--- branches/gnome-2-22/embed/ephy-favicon-cache.c	(original)
+++ branches/gnome-2-22/embed/ephy-favicon-cache.c	Fri Mar 28 15:06:20 2008
@@ -155,7 +155,7 @@
 		g_object_unref (entry->pixbuf);
 	}
 
-	g_free (entry);
+	g_slice_free (PixbufCacheEntry, entry);
 }
 
 static gboolean
@@ -173,7 +173,7 @@
 		EphyNode *child,
 		EphyFaviconCache *eb)
 {
-	PixbufCacheEntry *entry = g_new0 (PixbufCacheEntry, 1);
+	PixbufCacheEntry *entry = g_slice_new0 (PixbufCacheEntry);
 
 	entry->node = child;
 

Modified: branches/gnome-2-22/embed/ephy-password-manager.c
==============================================================================
--- branches/gnome-2-22/embed/ephy-password-manager.c	(original)
+++ branches/gnome-2-22/embed/ephy-password-manager.c	Fri Mar 28 15:06:20 2008
@@ -57,7 +57,7 @@
 			const char *username,
 			const char *password)
 {
-	EphyPasswordInfo *info = g_new0 (EphyPasswordInfo, 1);
+	EphyPasswordInfo *info = g_slice_new0 (EphyPasswordInfo);
 
 	info->host = g_strdup (host);
 	info->username = g_strdup (username);
@@ -75,7 +75,7 @@
 EphyPasswordInfo *
 ephy_password_info_copy (const EphyPasswordInfo *info)
 {
-	EphyPasswordInfo *copy = g_new0 (EphyPasswordInfo, 1);
+	EphyPasswordInfo *copy = g_slice_new0 (EphyPasswordInfo);
 
 	copy->host = g_strdup (info->host);
 	copy->username = g_strdup (info->username);
@@ -98,7 +98,7 @@
 		g_free (info->host);
 		g_free (info->username);
 		g_free (info->password);
-		g_free (info);
+		g_slice_free (EphyPasswordInfo, info);
 	}
 }
 

Modified: branches/gnome-2-22/embed/ephy-permission-manager.c
==============================================================================
--- branches/gnome-2-22/embed/ephy-permission-manager.c	(original)
+++ branches/gnome-2-22/embed/ephy-permission-manager.c	Fri Mar 28 15:06:20 2008
@@ -54,7 +54,7 @@
 			  const char *type,
 			  EphyPermission permission)
 {
-	EphyPermissionInfo *info = g_new0 (EphyPermissionInfo, 1);
+	EphyPermissionInfo *info = g_slice_new0 (EphyPermissionInfo);
 
 	info->host = g_strdup (host);
 	info->qtype = g_quark_from_string (type);
@@ -72,7 +72,7 @@
 EphyPermissionInfo *
 ephy_permission_info_copy (const EphyPermissionInfo *info)
 {
-	EphyPermissionInfo *copy = g_new0 (EphyPermissionInfo, 1);
+	EphyPermissionInfo *copy = g_slice_new0 (EphyPermissionInfo);
 
 	copy->host = g_strdup (info->host);
 	copy->qtype = info->qtype;
@@ -93,7 +93,7 @@
 	if (info != NULL)
 	{
 		g_free (info->host);
-		g_free (info);
+		g_slice_free (EphyPermissionInfo, info);
 	}
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]