diff libpurple/account.c @ 18118:ab6d2763b8d8

Re-fix the DBus list handling code by killing const GList* / const GSList* everywhere. Now we maintain a list of functions which return a GList or GSList which must not be freed. Ideally at some point this will be replaced with code that looks at the Doxygen comment for the function and honors @constreturn, which I've declared as a macro around @return that prints a @note about not modifying or freeing the returned value.
author Richard Laager <rlaager@wiktel.com>
date Sat, 16 Jun 2007 19:44:59 +0000
parents 926ccb104da0
children 45865fb3f4f9
line wrap: on
line diff
--- a/libpurple/account.c	Sat Jun 16 19:21:06 2007 +0000
+++ b/libpurple/account.c	Sat Jun 16 19:44:59 2007 +0000
@@ -205,7 +205,7 @@
 {
 	PurpleStatusType *type = purple_status_get_type(status);
 	xmlnode *node, *child;
-	const GList *attrs, *attr;
+	GList *attrs, *attr;
 
 	node = xmlnode_new("attributes");
 
@@ -241,7 +241,7 @@
 statuses_to_xmlnode(const PurplePresence *presence)
 {
 	xmlnode *node, *child;
-	const GList *statuses, *status;
+	GList *statuses, *status;
 
 	node = xmlnode_new("statuses");
 
@@ -1805,7 +1805,7 @@
 PurpleStatusType *
 purple_account_get_status_type(const PurpleAccount *account, const char *id)
 {
-	const GList *l;
+	GList *l;
 
 	g_return_val_if_fail(account != NULL, NULL);
 	g_return_val_if_fail(id      != NULL, NULL);
@@ -1824,7 +1824,7 @@
 PurpleStatusType *
 purple_account_get_status_type_with_primitive(const PurpleAccount *account, PurpleStatusPrimitive primitive)
 {
-	const GList *l;
+	GList *l;
 
 	g_return_val_if_fail(account != NULL, NULL);
 
@@ -1857,7 +1857,7 @@
 	return purple_presence_is_status_active(account->presence, status_id);
 }
 
-const GList *
+GList *
 purple_account_get_status_types(const PurpleAccount *account)
 {
 	g_return_val_if_fail(account != NULL, NULL);