changeset 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 cd81f8f36788
children 59aec2d6ec43 7ee44399f2ea
files ChangeLog.API finch/gntft.c finch/gntpounce.c finch/gntprefs.c finch/gntrequest.c finch/gntstatus.c finch/libgnt/gnttree.c finch/libgnt/gnttree.h finch/libgnt/gntwm.h finch/libgnt/wms/s.c libpurple/account.c libpurple/account.h libpurple/accountopt.c libpurple/accountopt.h libpurple/connection.h libpurple/conversation.h libpurple/dbus-analyze-functions.py libpurple/dbus-bindings.h libpurple/dbus-server.c libpurple/mime.c libpurple/mime.h libpurple/notify.h libpurple/plugins/perl/common/Account.xs libpurple/plugins/perl/common/AccountOpts.xs libpurple/plugins/perl/common/Notify.xs libpurple/plugins/perl/common/Request.xs libpurple/plugins/perl/common/SavedStatuses.xs libpurple/plugins/perl/common/Status.xs libpurple/plugins/tcl/tcl_cmds.c libpurple/protocols/gg/gg.c libpurple/protocols/jabber/xdata.c libpurple/protocols/sametime/sametime.c libpurple/protocols/silc/buddy.c libpurple/protocols/silc/chat.c libpurple/protocols/silc10/buddy.c libpurple/protocols/silc10/chat.c libpurple/prpl.c libpurple/request.c libpurple/request.h libpurple/savedstatuses.c libpurple/savedstatuses.h libpurple/status.c libpurple/status.h pidgin/gtkaccount.c pidgin/gtkpounce.c pidgin/gtkrequest.c pidgin/gtksavedstatuses.c pidgin/gtkstatusbox.c pidgin/plugins/gevolution/gevolution.c
diffstat 49 files changed, 214 insertions(+), 252 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog.API	Sat Jun 16 19:21:06 2007 +0000
+++ b/ChangeLog.API	Sat Jun 16 19:44:59 2007 +0000
@@ -21,10 +21,6 @@
 		* purple_core_ensure_single_instance
 		    This is for UIs to use to ensure only one copy is running.
 		* purple_dbus_is_owner
-		* purple_dbusify_const_GList
-		* purple_dbusify_const_GSList
-		* purple_const_GList_to_array
-		* purple_const_GSList_to_array
 		* purple_image_data_calculate_filename
 		* pidgin_retrieve_user_info, shows immediate feedback when getting
 		  information about a user.
@@ -39,7 +35,9 @@
 		    Can be used for inserting an animated image into an IMHTML.
 
 		Changed:
-		* Mark some return types const:
+		* The documentation of the following functions now properly
+		  declares that the returned value must not be modified or
+		  freed, which was always the case:
 			* purple_accounts_get_all
 			* purple_connections_get_all
 			* purple_connections_get_connecting
@@ -49,16 +47,25 @@
 			* purple_get_conversations
 			* purple_get_ims
 			* purple_notify_user_info_get_entries
-
-		Deprecated:
-		* purple_dbusify_GList:  Use purple_dbusify_const_GList (and
-		  g_list_free if needed) if depending on 2.1.0 is okay.
-		* purple_dbusify_GSList:  Use purple_dbusify_const_GSList (and
-		  g_slist_free if needed) if depending on 2.1.0 is okay..
-		* purple_GList_to_array:  Use purple_const_GList_to_array (and
-		  g_list_free if needed) if depending on 2.1.0 is okay..
-		* purple_GSList_to_array:  Use purple_const_GSList_to_array (and
-		  g_slist_free if needed) if depending on 2.1.0 is okay..
+		* The following functions now return a GList* instead of a
+		  const GList*, as const is not very useful with GLists.  The
+		  returned value still must not be modified or freed:
+			* purple_account_get_status_types
+			* purple_mime_document_get_fields
+			* purple_mime_document_get_parts
+			* purple_mime_part_get_fields
+			* purple_request_fields_get_required
+			* purple_request_field_list_get_selected
+			* purple_request_field_list_get_items
+			* purple_status_type_get_attrs
+			* purple_presence_get_statuses
+		* purple_request_field_list_set_selected now takes a GList*
+		  instead of a const GList* for items, as const is not very
+		  useful with GLists.  The passed list is still not modified
+		  or freed.
+		* purple_presence_add_list now takes a GList* instead of a
+		  const GList* for source_list, as const is not very useful with
+		  GLists.  The passed list is still not modified or freed.
 
 	Pidgin:
 		Changed:
@@ -69,6 +76,11 @@
 		Added:
 		* finch_retrieve_user_info
 
+		Changed:
+		* gnt_tree_get_rows() now returns a GList* instead of a const
+		  GList*, as const is not very useful with GLists.  The
+		  returned value still must not be modified or freed.
+
 version 2.0.2 (6/14/2007):
 	Pidgin:
 		Deprecated:
--- a/finch/gntft.c	Sat Jun 16 19:21:06 2007 +0000
+++ b/finch/gntft.c	Sat Jun 16 19:44:59 2007 +0000
@@ -86,7 +86,7 @@
 static void
 update_title_progress()
 {
-	const GList *list;
+	GList *list;
 	int num_active_xfers = 0;
 	guint64 total_bytes_xferred = 0;
 	guint64 total_file_size = 0;
@@ -172,7 +172,7 @@
 void
 finch_xfer_dialog_new(void)
 {
-	const GList *iter;
+	GList *iter;
 	GntWidget *window;
 	GntWidget *bbox;
 	GntWidget *button;
--- a/finch/gntpounce.c	Sat Jun 16 19:21:06 2007 +0000
+++ b/finch/gntpounce.c	Sat Jun 16 19:44:59 2007 +0000
@@ -137,7 +137,7 @@
 static void
 populate_pounces_list(PouncesManager *dialog)
 {
-	const GList *pounces;
+	GList *pounces;
 
 	gnt_tree_remove_all(GNT_TREE(dialog->tree));
 
--- a/finch/gntprefs.c	Sat Jun 16 19:21:06 2007 +0000
+++ b/finch/gntprefs.c	Sat Jun 16 19:44:59 2007 +0000
@@ -89,7 +89,7 @@
 get_status_titles()
 {
 	GList *list = NULL;
-	const GList *iter;
+	GList *iter;
 	for (iter = purple_savedstatuses_get_all(); iter; iter = iter->next) {
 		char *str;
 		if (purple_savedstatus_is_transient(iter->data))
--- a/finch/gntrequest.c	Sat Jun 16 19:21:06 2007 +0000
+++ b/finch/gntrequest.c	Sat Jun 16 19:44:59 2007 +0000
@@ -297,7 +297,7 @@
 				GList *list = NULL;
 				if (purple_request_field_list_get_multi_select(field))
 				{
-					const GList *iter;
+					GList *iter;
 					GntWidget *tree = field->ui_data;
 
 					iter = purple_request_field_list_get_items(field);
@@ -433,7 +433,7 @@
 			else if (type == PURPLE_REQUEST_FIELD_CHOICE)
 			{
 				int id;
-				const GList *list;
+				GList *list;
 				GntWidget *combo = gnt_combo_box_new();
 				gnt_box_add_widget(GNT_BOX(hbox), combo);
 				field->ui_data = combo;
@@ -449,7 +449,7 @@
 			}
 			else if (type == PURPLE_REQUEST_FIELD_LIST)
 			{
-				const GList *list;
+				GList *list;
 				gboolean multi = purple_request_field_list_get_multi_select(field);
 				if (multi)
 				{
--- a/finch/gntstatus.c	Sat Jun 16 19:21:06 2007 +0000
+++ b/finch/gntstatus.c	Sat Jun 16 19:44:59 2007 +0000
@@ -83,7 +83,7 @@
 static void
 populate_statuses(GntTree *tree)
 {
-	const GList *list;
+	GList *list;
 
 	for (list = purple_savedstatuses_get_all(); list; list = list->next)
 	{
@@ -244,7 +244,7 @@
 static void
 set_substatuses(EditStatus *edit)
 {
-	const GList *iter;
+	GList *iter;
 	for (iter = gnt_tree_get_rows(GNT_TREE(edit->tree)); iter; iter = iter->next) {
 		RowInfo *key = iter->data;
 		if (gnt_tree_get_choice(GNT_TREE(edit->tree), key)) {
@@ -410,7 +410,7 @@
 		EditSubStatus *sub;
 		GntWidget *window, *combo, *entry, *box, *button, *l;
 		PurpleSavedStatusSub *substatus = NULL;
-		const GList *iter;
+		GList *iter;
 		char *name;
 		RowInfo *selected = gnt_tree_get_selection_data(tree);
 		PurpleAccount *account = selected->account;
--- a/finch/libgnt/gnttree.c	Sat Jun 16 19:21:06 2007 +0000
+++ b/finch/libgnt/gnttree.c	Sat Jun 16 19:44:59 2007 +0000
@@ -1017,7 +1017,7 @@
 	return ret;
 }
 
-const GList *gnt_tree_get_rows(GntTree *tree)
+GList *gnt_tree_get_rows(GntTree *tree)
 {
 	return tree->list;
 }
--- a/finch/libgnt/gnttree.h	Sat Jun 16 19:21:06 2007 +0000
+++ b/finch/libgnt/gnttree.h	Sat Jun 16 19:44:59 2007 +0000
@@ -190,7 +190,13 @@
  */
 GList * gnt_tree_get_selection_text_list(GntTree *tree);
 
-const GList *gnt_tree_get_rows(GntTree *tree);
+/**
+ *
+ * @param tree
+ *
+ * @constreturn
+ */
+GList *gnt_tree_get_rows(GntTree *tree);
 
 /**
  * 
--- a/finch/libgnt/gntwm.h	Sat Jun 16 19:21:06 2007 +0000
+++ b/finch/libgnt/gntwm.h	Sat Jun 16 19:44:59 2007 +0000
@@ -163,7 +163,7 @@
 	/* List of windows. Although the WM can keep a list of its own for the windows,
 	 * it'd be better if there was a way to share between the 'core' and the WM.
 	 */
-	/*const GList *(*window_list)();*/
+	/*GList *(*window_list)();*/
 
 	void (*res1)(void);
 	void (*res2)(void);
--- a/finch/libgnt/wms/s.c	Sat Jun 16 19:21:06 2007 +0000
+++ b/finch/libgnt/wms/s.c	Sat Jun 16 19:44:59 2007 +0000
@@ -121,7 +121,7 @@
 static GntWidget *
 find_widget(GntWM *wm, const char *wname)
 {
-	const GList *iter = wm->cws->list;
+	GList *iter = wm->cws->list;
 	for (; iter; iter = iter->next) {
 		GntWidget *widget = iter->data;
 		const char *name = gnt_widget_get_name(widget);
--- 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);
--- a/libpurple/account.h	Sat Jun 16 19:21:06 2007 +0000
+++ b/libpurple/account.h	Sat Jun 16 19:44:59 2007 +0000
@@ -672,9 +672,9 @@
  *
  * @param account The account.
  *
- * @return The account's status types.
+ * @constreturn The account's status types.
  */
-const GList *purple_account_get_status_types(const PurpleAccount *account);
+GList *purple_account_get_status_types(const PurpleAccount *account);
 
 /**
  * Returns a protocol-specific integer setting for an account.
@@ -884,7 +884,7 @@
 /**
  * Returns a list of all accounts.
  *
- * @return A list of all accounts.
+ * @constreturn A list of all accounts.
  */
 GList *purple_accounts_get_all(void);
 
--- a/libpurple/accountopt.c	Sat Jun 16 19:21:06 2007 +0000
+++ b/libpurple/accountopt.c	Sat Jun 16 19:44:59 2007 +0000
@@ -282,7 +282,7 @@
 	return option->masked;
 }
 
-const GList *
+GList *
 purple_account_option_get_list(const PurpleAccountOption *option)
 {
 	g_return_val_if_fail(option != NULL, NULL);
--- a/libpurple/accountopt.h	Sat Jun 16 19:21:06 2007 +0000
+++ b/libpurple/accountopt.h	Sat Jun 16 19:44:59 2007 +0000
@@ -296,9 +296,9 @@
  *
  * @param option The account option.
  *
- * @return The list values.
+ * @constreturn The list values.
  */
-const GList *purple_account_option_get_list(const PurpleAccountOption *option);
+GList *purple_account_option_get_list(const PurpleAccountOption *option);
 
 /*@}*/
 
--- a/libpurple/connection.h	Sat Jun 16 19:21:06 2007 +0000
+++ b/libpurple/connection.h	Sat Jun 16 19:44:59 2007 +0000
@@ -259,14 +259,14 @@
  * Returns a list of all active connections.  This does not
  * include connections that are in the process of connecting.
  *
- * @return A list of all active connections.
+ * @constreturn A list of all active connections.
  */
 GList *purple_connections_get_all(void);
 
 /**
  * Returns a list of all connections in the process of connecting.
  *
- * @return A list of connecting connections.
+ * @constreturn A list of connecting connections.
  */
 GList *purple_connections_get_connecting(void);
 
--- a/libpurple/conversation.h	Sat Jun 16 19:21:06 2007 +0000
+++ b/libpurple/conversation.h	Sat Jun 16 19:44:59 2007 +0000
@@ -502,21 +502,21 @@
  *
  * This list includes both IMs and chats.
  *
- * @return A GList of all conversations.
+ * @constreturn A GList of all conversations.
  */
 GList *purple_get_conversations(void);
 
 /**
  * Returns a list of all IMs.
  *
- * @return A GList of all IMs.
+ * @constreturn A GList of all IMs.
  */
 GList *purple_get_ims(void);
 
 /**
  * Returns a list of all chats.
  *
- * @return A GList of all chats.
+ * @constreturn A GList of all chats.
  */
 GList *purple_get_chats(void);
 
@@ -875,7 +875,7 @@
  *
  * @param chat The chat.
  *
- * @return The list of users.
+ * @constreturn The list of users.
  */
 GList *purple_conv_chat_get_users(const PurpleConvChat *chat);
 
--- a/libpurple/dbus-analyze-functions.py	Sat Jun 16 19:21:06 2007 +0000
+++ b/libpurple/dbus-analyze-functions.py	Sat Jun 16 19:44:59 2007 +0000
@@ -32,8 +32,8 @@
     "purple_log_read",
     ]
 
-# This is a list of functions that return a GList* whose elements are
-# string, not pointers to objects.
+# This is a list of functions that return a GList* or GSList * whose elements
+# are strings, not pointers to objects.
 stringlists = [
     "purple_prefs_get_path_list",
     "purple_prefs_get_string_list",
@@ -41,6 +41,32 @@
     "purple_uri_list_extract_uris",
 ]
 
+# This is a list of functions that return a GList* or GSList* that should
+# not be freed.  Ideally, this information should be obtained from the Doxygen
+# documentation at some point.
+constlists = [
+    "purple_account_get_status_types",
+    "purple_accounts_get_all",
+    "purple_account_option_get_list",
+    "purple_connections_get_all",
+    "purple_connections_get_connecting",
+    "purple_get_conversations",
+    "purple_get_ims",
+    "purple_get_chats",
+    "purple_conv_chat_get_users",
+    "purple_conv_chat_get_ignored",
+    "purple_mime_document_get_fields",
+    "purple_mime_document_get_parts",
+    "purple_mime_part_get_fields",
+    "purple_notify_user_info_get_entries",
+    "purple_request_fields_get_required",
+    "purple_request_field_list_get_selected",
+    "purple_request_field_list_get_items",
+    "purple_savedstatuses_get_all",
+    "purple_status_type_get_attrs",
+    "purple_presence_get_statuses",
+]
+
 pointer = "#pointer#"
 myexception = "My Exception"
 
@@ -152,7 +178,7 @@
                 return self.outputpurplestructure(type, name)
 
             if type[0] in ["GList", "GSList"]:
-                return self.outputlist(type, name, const)
+                return self.outputlist(type, name)
 
         raise myexception
     
@@ -254,7 +280,7 @@
         self.returncode.append("return (%s*) GINT_TO_POINTER(%s);" % (type[0], name));
         self.definepurplestructure(type)
 
-    def outputlist(self, type, name, const):
+    def outputlist(self, type, name):
         self.functiontype = "%s*" % type[0]
         self.decls.append("GArray *%s;" % name)
         self.outputparams.append(('dbus_g_type_get_collection("GArray", G_TYPE_INT)', name))
@@ -390,28 +416,20 @@
 
     # GList*, GSList*, assume that list is a list of objects
     # unless the function is in stringlists
-    def outputlist(self, type, name, const):
+    def outputlist(self, type, name):
         self.cdecls.append("\tdbus_int32_t %s_LEN;" % name)
         self.ccodeout.append("\tg_free(%s);" % name)
 
-        if const:
-            const_prefix = "const_"
-        else:
-            const_prefix = ""
-
-        if (const):
-            self.cdecls.append("\tconst %s *list;" % type[0]);
-        else:
-            self.cdecls.append("\t%s *list;" % type[0]);
+        self.cdecls.append("\t%s *list;" % type[0]);
 
         if self.function.name in stringlists:
             self.cdecls.append("\tchar **%s;" % name)
             self.ccode.append("\tlist = %s;" % self.call)
-            self.ccode.append("\t%s = (char **)purple_const_%s_to_array(list, &%s_LEN);" % \
+            self.ccode.append("\t%s = (char **)purple_%s_to_array(list, FALSE, &%s_LEN);" % \
                          (name, type[0], name))
             self.cparamsout.append("DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &%s, %s_LEN" \
                           % (name, name))
-            if (not const):
+            if (not (self.function.name in constlists)):
                 type_name = type[0].lower()[1:]
                 self.ccodeout.append("\tg_%s_foreach(list, (GFunc)g_free, NULL);" % type_name)
                 self.ccodeout.append("\tg_%s_free(list);" % type_name)
@@ -419,9 +437,9 @@
         else:
             self.cdecls.append("\tdbus_int32_t *%s;" % name)
             self.ccode.append("\tlist = %s;" % self.call)
-            self.ccode.append("\t%s = purple_dbusify_const_%s(list, &%s_LEN);" % \
+            self.ccode.append("\t%s = purple_dbusify_%s(list, FALSE, &%s_LEN);" % \
                          (name, type[0], name))
-            if (not const):
+            if (not (self.function.name in constlists)):
                 self.ccode.append("\tg_%s_free(list);" % type[0].lower()[1:])
             self.cparamsout.append("DBUS_TYPE_ARRAY, DBUS_TYPE_INT32, &%s, %s_LEN" \
                               % (name, name))
--- a/libpurple/dbus-bindings.h	Sat Jun 16 19:21:06 2007 +0000
+++ b/libpurple/dbus-bindings.h	Sat Jun 16 19:44:59 2007 +0000
@@ -83,52 +83,14 @@
 					int              first_arg_type,
 					va_list          var_args);
 
-/**
- * @deprecated In 3.0.0, this method will have a signature and behavior
- *             like that of purple_dbusify_const_GList().
- */
 dbus_int32_t* purple_dbusify_GList(GList *list, gboolean free_memory, 
 				 dbus_int32_t *len);
-/**
- * @deprecated In 3.0.0, this method will have a signature and behavior
- *             like that of purple_dbusify_const_GSList().
- */
 dbus_int32_t* purple_dbusify_GSList(GSList *list, gboolean free_memory,
 				  dbus_int32_t *len);
-
-/**
- * @since 2.1.0
- */
-dbus_int32_t* purple_dbusify_const_GList(const GList *list, dbus_int32_t *len);
-
-/**
- * @since 2.1.0
- */
-dbus_int32_t* purple_dbusify_const_GSList(const GSList *list, dbus_int32_t *len);
-
-/**
- * @deprecated In 3.0.0, this method will have a signature and behavior
- *             like that of purple_const_GList_to_array().
- */
 gpointer* purple_GList_to_array(GList *list, gboolean free_memory,
 			      dbus_int32_t *len);
-/**
- * @deprecated In 3.0.0, this method will have a signature and behavior
- *             like that of purple_const_GSList_to_array().
- */
 gpointer* purple_GSList_to_array(GSList *list, gboolean free_memory,
 			      dbus_int32_t *len);
-
-/**
- * @since 2.1.0
- */
-gpointer* purple_const_GList_to_array(const GList *list, dbus_int32_t *len);
-
-/**
- * @since 2.1.0
- */
-gpointer* purple_const_GSList_to_array(const GSList *list, dbus_int32_t *len);
-
 GHashTable *purple_dbus_iter_hash_table(DBusMessageIter *iter, DBusError *error);
 
 const char* empty_to_null(const char *str);
--- a/libpurple/dbus-server.c	Sat Jun 16 19:21:06 2007 +0000
+++ b/libpurple/dbus-server.c	Sat Jun 16 19:44:59 2007 +0000
@@ -290,45 +290,19 @@
 }
 
 dbus_int32_t *
-purple_dbusify_const_GList(const GList *list, dbus_int32_t *len)
+purple_dbusify_GList(GList *list, gboolean free_memory, dbus_int32_t *len)
 {
 	dbus_int32_t *array;
 	int i;
-	const GList *elem;
+	GList *elem;
 
-	/* g_list_length() should really take a const GList */
-	*len = g_list_length((GList *)list);
+	*len = g_list_length(list);
 	array = g_new0(dbus_int32_t, *len);
 	for (i = 0, elem = list; elem != NULL; elem = elem->next, i++)
 		array[i] = purple_dbus_pointer_to_id(elem->data);
 
-	return array;
-}
-
-dbus_int32_t *
-purple_dbusify_GList(GList *list, gboolean free_memory, dbus_int32_t *len)
-{
-	dbus_int32_t *array = purple_dbusify_const_GList(list, len);
-
-	if (!free_memory)
-		return array;
-
-	g_list_free(list);
-	return array;
-}
-
-dbus_int32_t *
-purple_dbusify_const_GSList(const GSList *list, dbus_int32_t *len)
-{
-	dbus_int32_t *array;
-	int i;
-	const GSList *elem;
-
-	/* g_slist_length should really take a const GSList */
-	*len = g_slist_length((GSList *)list);
-	array = g_new0(dbus_int32_t, *len);
-	for (i = 0, elem = list; elem != NULL; elem = elem->next, i++)
-		array[i] = purple_dbus_pointer_to_id(elem->data);
+	if (free_memory)
+		g_list_free(list);
 
 	return array;
 }
@@ -336,26 +310,17 @@
 dbus_int32_t *
 purple_dbusify_GSList(GSList *list, gboolean free_memory, dbus_int32_t *len)
 {
-	dbus_int32_t *array = purple_dbusify_const_GSList(list, len);
-
-	if (!free_memory)
-		return array;
-
-	g_slist_free(list);
-	return array;
-}
+	dbus_int32_t *array;
+	int i;
+	GSList *elem;
 
-gpointer *
-purple_const_GList_to_array(const GList *list, dbus_int32_t *len)
-{
-	gpointer *array;
-	int i;
-	const GList *elem;
+	*len = g_slist_length(list);
+	array = g_new0(dbus_int32_t, *len);
+	for (i = 0, elem = list; elem != NULL; elem = elem->next, i++)
+		array[i] = purple_dbus_pointer_to_id(elem->data);
 
-	*len = g_list_length((GList *)list);
-	array = g_new0(gpointer, *len);
-	for (i = 0, elem = list; elem != NULL; elem = elem->next, i++)
-		array[i] = elem->data;
+	if (free_memory)
+		g_slist_free(list);
 
 	return array;
 }
@@ -363,39 +328,36 @@
 gpointer *
 purple_GList_to_array(GList *list, gboolean free_memory, dbus_int32_t *len)
 {
-	gpointer *array = purple_const_GList_to_array(list, len);
-
-	if (!free_memory)
-		return array;
-
-	g_list_free(list);
-	return array;
-}
-
-gpointer *
-purple_const_GSList_to_array(const GSList *list, dbus_int32_t *len)
-{
 	gpointer *array;
 	int i;
-	const GSList *elem;
+	GList *elem;
 
-	*len = g_slist_length((GSList *)list);
+	*len = g_list_length(list);
 	array = g_new0(gpointer, *len);
 	for (i = 0, elem = list; elem != NULL; elem = elem->next, i++)
 		array[i] = elem->data;
 
+	if (free_memory)
+		g_list_free(list);
+
 	return array;
 }
 
 gpointer *
 purple_GSList_to_array(GSList *list, gboolean free_memory, dbus_int32_t *len)
 {
-	gpointer *array = purple_const_GSList_to_array(list, len);
+	gpointer *array;
+	int i;
+	GSList *elem;
 
-	if (!free_memory)
-		return array;
+	*len = g_slist_length(list);
+	array = g_new0(gpointer, *len);
+	for (i = 0, elem = list; elem != NULL; elem = elem->next, i++)
+		array[i] = elem->data;
 
-	g_slist_free(list);
+	if (free_memory)
+		g_slist_free(list);
+
 	return array;
 }
 
--- a/libpurple/mime.c	Sat Jun 16 19:21:06 2007 +0000
+++ b/libpurple/mime.c	Sat Jun 16 19:44:59 2007 +0000
@@ -277,7 +277,7 @@
 }
 
 
-const GList *
+GList *
 purple_mime_part_get_fields(PurpleMimePart *part)
 {
 	g_return_val_if_fail(part != NULL, NULL);
@@ -513,7 +513,7 @@
 }
 
 
-const GList *
+GList *
 purple_mime_document_get_fields(PurpleMimeDocument *doc)
 {
 	g_return_val_if_fail(doc != NULL, NULL);
@@ -537,7 +537,7 @@
 }
 
 
-const GList *
+GList *
 purple_mime_document_get_parts(PurpleMimeDocument *doc)
 {
 	g_return_val_if_fail(doc != NULL, NULL);
--- a/libpurple/mime.h	Sat Jun 16 19:21:06 2007 +0000
+++ b/libpurple/mime.h	Sat Jun 16 19:44:59 2007 +0000
@@ -90,10 +90,10 @@
  *
  * @param doc The MIME document.
  *
- * @returns   A list of strings indicating the fields (but not the values of
- *            the fields) in the header of doc.
+ * @constreturn A list of strings indicating the fields (but not the values
+ *              of the fields) in the header of doc.
  */
-const GList *purple_mime_document_get_fields(PurpleMimeDocument *doc);
+GList *purple_mime_document_get_fields(PurpleMimeDocument *doc);
 
 /**
  * Get the value of a specific field in the header of a document.
@@ -125,9 +125,9 @@
  *
  * @param doc The MIME document.
  *
- * @returns   List of PurpleMimePart contained within doc.
+ * @constreturn   List of PurpleMimePart contained within doc.
  */
-const GList *purple_mime_document_get_parts(PurpleMimeDocument *doc);
+GList *purple_mime_document_get_parts(PurpleMimeDocument *doc);
 
 /**
  * Create and insert a new part into a MIME document.
@@ -142,10 +142,10 @@
  *
  * @param part The MIME document part.
  *
- * @returns    List of strings indicating the fields (but not the values
- *             of the fields) in the header of part.
+ * @constreturn List of strings indicating the fields (but not the values
+ *              of the fields) in the header of part.
  */
-const GList *purple_mime_part_get_fields(PurpleMimePart *part);
+GList *purple_mime_part_get_fields(PurpleMimePart *part);
 
 
 /**
--- a/libpurple/notify.h	Sat Jun 16 19:21:06 2007 +0000
+++ b/libpurple/notify.h	Sat Jun 16 19:44:59 2007 +0000
@@ -456,7 +456,7 @@
  *
  * @param user_info          The PurpleNotifyUserInfo
  *
- * @result                   A GList of PurpleNotifyUserInfoEntry objects
+ * @constreturn              A GList of PurpleNotifyUserInfoEntry objects
  */
 GList *purple_notify_user_info_get_entries(PurpleNotifyUserInfo *user_info);
 
--- a/libpurple/plugins/perl/common/Account.xs	Sat Jun 16 19:21:06 2007 +0000
+++ b/libpurple/plugins/perl/common/Account.xs	Sat Jun 16 19:44:59 2007 +0000
@@ -184,7 +184,7 @@
 purple_account_get_status_types(account)
     Purple::Account account
 PREINIT:
-    const GList *l;
+    GList *l;
 PPCODE:
     for (l = purple_account_get_status_types(account); l != NULL; l = l->next) {
         XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::StatusType")));
--- a/libpurple/plugins/perl/common/AccountOpts.xs	Sat Jun 16 19:21:06 2007 +0000
+++ b/libpurple/plugins/perl/common/AccountOpts.xs	Sat Jun 16 19:44:59 2007 +0000
@@ -88,7 +88,7 @@
 purple_account_option_get_list(option)
 	Purple::Account::Option option
 PREINIT:
-	const GList *l;
+	GList *l;
 PPCODE:
 	for (l = purple_account_option_get_list(option); l != NULL; l = l->next) {
 		/* XXX These are actually PurpleKeyValuePairs but we don't have a
--- a/libpurple/plugins/perl/common/Notify.xs	Sat Jun 16 19:21:06 2007 +0000
+++ b/libpurple/plugins/perl/common/Notify.xs	Sat Jun 16 19:44:59 2007 +0000
@@ -140,7 +140,7 @@
 purple_notify_user_info_get_entries(user_info)
 	Purple::NotifyUserInfo user_info
 PREINIT:
-	const GList *l;
+	GList *l;
 PPCODE:
 	l = purple_notify_user_info_get_entries(user_info);
 	for (; l != NULL; l = l->next) {
--- a/libpurple/plugins/perl/common/Request.xs	Sat Jun 16 19:21:06 2007 +0000
+++ b/libpurple/plugins/perl/common/Request.xs	Sat Jun 16 19:44:59 2007 +0000
@@ -396,7 +396,7 @@
 purple_request_field_list_get_items(field)
 	Purple::Request::Field field
 PREINIT:
-	const GList *l;
+	GList *l;
 PPCODE:
 	for (l = purple_request_field_list_get_items(field); l != NULL; l = l->next) {
 		XPUSHs(sv_2mortal(newSVpv(l->data, 0)));
@@ -410,7 +410,7 @@
 purple_request_field_list_get_selected(field)
 	Purple::Request::Field field
 PREINIT:
-	const GList *l;
+	GList *l;
 PPCODE:
 	for (l = purple_request_field_list_get_selected(field); l != NULL; l = l->next) {
 		XPUSHs(sv_2mortal(newSVpv(l->data, 0)));
@@ -625,7 +625,7 @@
 purple_request_fields_get_required(fields)
 	Purple::Request::Fields fields
 PREINIT:
-	const GList *l;
+	GList *l;
 PPCODE:
 	for (l = purple_request_fields_get_required(fields); l != NULL; l = l->next) {
 		XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::Request::Field")));
--- a/libpurple/plugins/perl/common/SavedStatuses.xs	Sat Jun 16 19:21:06 2007 +0000
+++ b/libpurple/plugins/perl/common/SavedStatuses.xs	Sat Jun 16 19:44:59 2007 +0000
@@ -130,7 +130,7 @@
 void
 purple_savedstatuses_get_all()
 PREINIT:
-	const GList *l;
+	GList *l;
 PPCODE:
 	for (l = purple_savedstatuses_get_all(); l != NULL; l = l->next) {
 		XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::SavedStatus")));
@@ -140,7 +140,7 @@
 purple_savedstatuses_get_popular(how_many)
 	unsigned int how_many
 PREINIT:
-	const GList *l;
+	GList *l;
 PPCODE:
 	for (l = purple_savedstatuses_get_popular(how_many); l != NULL; l = l->next) {
 		XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::SavedStatus")));
--- a/libpurple/plugins/perl/common/Status.xs	Sat Jun 16 19:21:06 2007 +0000
+++ b/libpurple/plugins/perl/common/Status.xs	Sat Jun 16 19:44:59 2007 +0000
@@ -142,7 +142,7 @@
 purple_presence_get_statuses(presence)
 	Purple::Presence presence
 PREINIT:
-	const GList *l;
+	GList *l;
 PPCODE:
 	for (l = purple_presence_get_statuses(presence); l != NULL; l = l->next) {
 		XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::Status")));
@@ -392,7 +392,7 @@
 purple_status_type_get_attrs(status_type)
 	Purple::StatusType status_type
 PREINIT:
-	const GList *l;
+	GList *l;
 PPCODE:
 	for (l = purple_status_type_get_attrs(status_type); l != NULL; l = l->next) {
 		XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::StatusAttr")));
--- a/libpurple/plugins/tcl/tcl_cmds.c	Sat Jun 16 19:21:06 2007 +0000
+++ b/libpurple/plugins/tcl/tcl_cmds.c	Sat Jun 16 19:44:59 2007 +0000
@@ -113,7 +113,7 @@
 	const char *listopts[] = { "-all", "-online", NULL };
 	enum { CMD_ACCOUNTLIST_ALL, CMD_ACCOUNTLIST_ONLINE } listopt;
 	const char *alias;
-	const GList *cur;
+	GList *cur;
 	PurpleAccount *account;
 	PurpleStatus *status;
 	PurpleStatusType *status_type;
@@ -1082,7 +1082,7 @@
 	Tcl_Obj *result = Tcl_GetObjResult(interp);
 	Tcl_Obj *list, *elem;
 	PurplePresence *presence;
-	const GList *cur;
+	GList *cur;
 	int error, idle, idle_time, login_time;
 
 	if (objc < 2) {
@@ -1524,7 +1524,7 @@
 	Tcl_Obj *result = Tcl_GetObjResult(interp);
 	PurpleStatusType *status_type;
 	Tcl_Obj *list, *elem;
-	const GList *cur;
+	GList *cur;
 	int error;
 
 	if (objc < 2) {
--- a/libpurple/protocols/gg/gg.c	Sat Jun 16 19:21:06 2007 +0000
+++ b/libpurple/protocols/gg/gg.c	Sat Jun 16 19:44:59 2007 +0000
@@ -823,7 +823,7 @@
 {
 	GGPInfo *info = gc->proto_data;
 	PurpleRequestField *field;
-	const GList *sel;
+	GList *sel;
 
 	field = purple_request_fields_get_field(fields, "name");
 	sel = purple_request_field_list_get_selected(field);
--- a/libpurple/protocols/jabber/xdata.c	Sat Jun 16 19:21:06 2007 +0000
+++ b/libpurple/protocols/jabber/xdata.c	Sat Jun 16 19:44:59 2007 +0000
@@ -93,7 +93,7 @@
 				case JABBER_X_DATA_LIST_SINGLE:
 				case JABBER_X_DATA_LIST_MULTI:
 					{
-					const GList *selected = purple_request_field_list_get_selected(field);
+					GList *selected = purple_request_field_list_get_selected(field);
 					char *value;
 					fieldnode = xmlnode_new_child(result, "field");
 					xmlnode_set_attrib(fieldnode, "var", id);
--- a/libpurple/protocols/sametime/sametime.c	Sat Jun 16 19:21:06 2007 +0000
+++ b/libpurple/protocols/sametime/sametime.c	Sat Jun 16 19:44:59 2007 +0000
@@ -2660,7 +2660,7 @@
   GString *str;
 
   PurpleMimeDocument *doc;
-  const GList *parts;
+  GList *parts;
 
   img_by_cid = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL);
   images = NULL;
@@ -3401,7 +3401,7 @@
 static void conf_select_prompt_invite(PurpleBuddy *buddy,
 				      PurpleRequestFields *fields) {
   PurpleRequestField *f;
-  const GList *l;
+  GList *l;
   const char *msg;
   
   f = purple_request_fields_get_field(fields, CHAT_KEY_INVITE);
@@ -5268,7 +5268,7 @@
 				       PurpleRequestFields *fields) {
   
   PurpleRequestField *f;
-  const GList *l;
+  GList *l;
 
   f = purple_request_fields_get_field(fields, "group");
   l = purple_request_field_list_get_items(f);
@@ -5334,7 +5334,7 @@
 static void remote_group_multi_cb(struct mwPurplePluginData *pd,
 				  PurpleRequestFields *fields) {
   PurpleRequestField *f;
-  const GList *l;
+  GList *l;
 
   f = purple_request_fields_get_field(fields, "group");
   l = purple_request_field_list_get_selected(f);
--- a/libpurple/protocols/silc/buddy.c	Sat Jun 16 19:21:06 2007 +0000
+++ b/libpurple/protocols/silc/buddy.c	Sat Jun 16 19:44:59 2007 +0000
@@ -1117,7 +1117,7 @@
 silcpurple_add_buddy_select_cb(SilcPurpleBuddyRes r, PurpleRequestFields *fields)
 {
 	PurpleRequestField *f;
-	const GList *list;
+	GList *list;
 	SilcClientEntry client_entry;
 	SilcDList clients;
 
--- a/libpurple/protocols/silc/chat.c	Sat Jun 16 19:21:06 2007 +0000
+++ b/libpurple/protocols/silc/chat.c	Sat Jun 16 19:44:59 2007 +0000
@@ -291,7 +291,7 @@
 	SilcClient client = sg->client;
 	SilcClientConnection conn = sg->conn;
 	PurpleRequestField *f;
-	const GList *list;
+	GList *list;
 	SilcPublicKey public_key;
 	SilcBuffer chpks, pk, chidp;
 	SilcUInt16 c = 0, ct;
--- a/libpurple/protocols/silc10/buddy.c	Sat Jun 16 19:21:06 2007 +0000
+++ b/libpurple/protocols/silc10/buddy.c	Sat Jun 16 19:44:59 2007 +0000
@@ -1118,7 +1118,7 @@
 silcpurple_add_buddy_select_cb(SilcPurpleBuddyRes r, PurpleRequestFields *fields)
 {
 	PurpleRequestField *f;
-	const GList *list;
+	GList *list;
 	SilcClientEntry client_entry;
 
 	f = purple_request_fields_get_field(fields, "list");
--- a/libpurple/protocols/silc10/chat.c	Sat Jun 16 19:21:06 2007 +0000
+++ b/libpurple/protocols/silc10/chat.c	Sat Jun 16 19:44:59 2007 +0000
@@ -278,7 +278,7 @@
 	SilcClient client = sg->client;
 	SilcClientConnection conn = sg->conn;
 	PurpleRequestField *f;
-	const GList *list;
+	GList *list;
 	SilcPublicKey public_key;
 	SilcBuffer chpks, pk, chidp;
 	SilcUInt16 c = 0, ct;
--- a/libpurple/prpl.c	Sat Jun 16 19:21:06 2007 +0000
+++ b/libpurple/prpl.c	Sat Jun 16 19:44:59 2007 +0000
@@ -265,7 +265,7 @@
 purple_prpl_get_statuses(PurpleAccount *account, PurplePresence *presence)
 {
 	GList *statuses = NULL;
-	const GList *l;
+	GList *l;
 	PurpleStatus *status;
 
 	g_return_val_if_fail(account  != NULL, NULL);
--- a/libpurple/request.c	Sat Jun 16 19:21:06 2007 +0000
+++ b/libpurple/request.c	Sat Jun 16 19:44:59 2007 +0000
@@ -111,7 +111,7 @@
 	return (g_hash_table_lookup(fields->fields, id) != NULL);
 }
 
-const GList *
+GList *
 purple_request_fields_get_required(const PurpleRequestFields *fields)
 {
 	g_return_val_if_fail(fields != NULL, NULL);
@@ -872,9 +872,9 @@
 }
 
 void
-purple_request_field_list_set_selected(PurpleRequestField *field, const GList *items)
+purple_request_field_list_set_selected(PurpleRequestField *field, GList *items)
 {
-	const GList *l;
+	GList *l;
 
 	g_return_if_fail(field != NULL);
 	g_return_if_fail(items != NULL);
@@ -883,7 +883,7 @@
 	purple_request_field_list_clear_selected(field);
 
 	if (!purple_request_field_list_get_multi_select(field) &&
-		g_list_length((GList*)items) > 1)
+		g_list_length(items) > 1)
 	{
 		purple_debug_warning("request",
 						   "More than one item added to non-multi-select "
@@ -913,7 +913,7 @@
 										item, NULL, NULL);
 }
 
-const GList *
+GList *
 purple_request_field_list_get_selected(const PurpleRequestField *field)
 {
 	g_return_val_if_fail(field != NULL, NULL);
@@ -922,7 +922,7 @@
 	return field->u.list.selected;
 }
 
-const GList *
+GList *
 purple_request_field_list_get_items(const PurpleRequestField *field)
 {
 	g_return_val_if_fail(field != NULL, NULL);
--- a/libpurple/request.h	Sat Jun 16 19:21:06 2007 +0000
+++ b/libpurple/request.h	Sat Jun 16 19:44:59 2007 +0000
@@ -285,9 +285,9 @@
  *
  * @param fields The fields list.
  *
- * @return The list of required fields.
+ * @constreturn The list of required fields.
  */
-const GList *purple_request_fields_get_required(const PurpleRequestFields *fields);
+GList *purple_request_fields_get_required(const PurpleRequestFields *fields);
 
 /**
  * Returns whether or not a field with the specified ID is required.
@@ -917,10 +917,10 @@
  * Sets a list of selected items in a list field.
  *
  * @param field The field.
- * @param items The list of selected items.
+ * @param items The list of selected items, which is not modified or freed.
  */
 void purple_request_field_list_set_selected(PurpleRequestField *field,
-										  const GList *items);
+										  GList *items);
 
 /**
  * Returns whether or not a particular item is selected in a list field.
@@ -941,9 +941,9 @@
  *
  * @param field The field.
  *
- * @return The list of selected items.
+ * @constreturn The list of selected items.
  */
-const GList *purple_request_field_list_get_selected(
+GList *purple_request_field_list_get_selected(
 	const PurpleRequestField *field);
 
 /**
@@ -951,9 +951,9 @@
  *
  * @param field The field.
  *
- * @return The list of items.
+ * @constreturn The list of items.
  */
-const GList *purple_request_field_list_get_items(const PurpleRequestField *field);
+GList *purple_request_field_list_get_items(const PurpleRequestField *field);
 
 /*@}*/
 
--- a/libpurple/savedstatuses.c	Sat Jun 16 19:21:06 2007 +0000
+++ b/libpurple/savedstatuses.c	Sat Jun 16 19:44:59 2007 +0000
@@ -716,7 +716,7 @@
 	return TRUE;
 }
 
-const GList *
+GList *
 purple_savedstatuses_get_all(void)
 {
 	return saved_statuses;
--- a/libpurple/savedstatuses.h	Sat Jun 16 19:21:06 2007 +0000
+++ b/libpurple/savedstatuses.h	Sat Jun 16 19:44:59 2007 +0000
@@ -151,9 +151,9 @@
 /**
  * Returns all saved statuses.
  *
- * @return A list of saved statuses.
+ * @constreturn A list of saved statuses.
  */
-const GList *purple_savedstatuses_get_all(void);
+GList *purple_savedstatuses_get_all(void);
 
 /**
  * Returns the n most popular saved statuses.  "Popularity" is
--- a/libpurple/status.c	Sat Jun 16 19:21:06 2007 +0000
+++ b/libpurple/status.c	Sat Jun 16 19:44:59 2007 +0000
@@ -451,7 +451,7 @@
 	return NULL;
 }
 
-const GList *
+GList *
 purple_status_type_get_attrs(const PurpleStatusType *status_type)
 {
 	g_return_val_if_fail(status_type != NULL, NULL);
@@ -548,7 +548,7 @@
 purple_status_new(PurpleStatusType *status_type, PurplePresence *presence)
 {
 	PurpleStatus *status;
-	const GList *l;
+	GList *l;
 
 	g_return_val_if_fail(status_type != NULL, NULL);
 	g_return_val_if_fail(presence    != NULL, NULL);
@@ -719,10 +719,10 @@
 
 void
 purple_status_set_active_with_attrs_list(PurpleStatus *status, gboolean active,
-									   const GList *attrs)
+									   GList *attrs)
 {
 	gboolean changed = FALSE;
-	const GList *l;
+	GList *l;
 	GList *specified_attr_ids = NULL;
 	PurpleStatusType *status_type;
 
@@ -1168,9 +1168,9 @@
 }
 
 void
-purple_presence_add_list(PurplePresence *presence, const GList *source_list)
+purple_presence_add_list(PurplePresence *presence, GList *source_list)
 {
-	const GList *l;
+	GList *l;
 
 	g_return_if_fail(presence    != NULL);
 	g_return_if_fail(source_list != NULL);
@@ -1396,7 +1396,7 @@
 	return presence->u.buddy.buddy;
 }
 
-const GList *
+GList *
 purple_presence_get_statuses(const PurplePresence *presence)
 {
 	g_return_val_if_fail(presence != NULL, NULL);
@@ -1408,7 +1408,7 @@
 purple_presence_get_status(const PurplePresence *presence, const char *status_id)
 {
 	PurpleStatus *status;
-	const GList *l = NULL;
+	GList *l = NULL;
 
 	g_return_val_if_fail(presence  != NULL, NULL);
 	g_return_val_if_fail(status_id != NULL, NULL);
@@ -1487,7 +1487,7 @@
 purple_presence_is_status_primitive_active(const PurplePresence *presence,
 		PurpleStatusPrimitive primitive)
 {
-	const GList *l;
+	GList *l;
 
 	g_return_val_if_fail(presence  != NULL,              FALSE);
 	g_return_val_if_fail(primitive != PURPLE_STATUS_UNSET, FALSE);
@@ -1535,7 +1535,7 @@
 	gboolean idle1, idle2;
 	time_t idle_time_1, idle_time_2;
 	int score1 = 0, score2 = 0;
-	const GList *l;
+	GList *l;
 
 	if (presence1 == presence2)
 		return 0;
--- a/libpurple/status.h	Sat Jun 16 19:21:06 2007 +0000
+++ b/libpurple/status.h	Sat Jun 16 19:44:59 2007 +0000
@@ -387,9 +387,9 @@
  *
  * @param status_type The status type.
  *
- * @return The list of attributes.
+ * @constreturn The list of attributes.
  */
-const GList *purple_status_type_get_attrs(const PurpleStatusType *status_type);
+GList *purple_status_type_get_attrs(const PurpleStatusType *status_type);
 
 /**
  * Find the PurpleStatusType with the given id.
@@ -515,10 +515,11 @@
  * @param active The active state.
  * @param attrs  A list of attributes to set on the status.  This list is
  *               composed of key/value pairs, where each key is a valid
- *               attribute name for this PurpleStatusType.
+ *               attribute name for this PurpleStatusType.  The list is
+ *               not modified or freed by this function.
  */
 void purple_status_set_active_with_attrs_list(PurpleStatus *status, gboolean active,
-											const GList *attrs);
+											GList *attrs);
 
 /**
  * Sets the boolean value of an attribute in a status with the specified ID.
@@ -768,9 +769,10 @@
  * Adds a list of statuses to the presence.
  *
  * @param presence    The presence.
- * @param source_list The source list of statuses to add.
+ * @param source_list The source list of statuses to add, which is not
+ *                    modified or freed by this function.
  */
-void purple_presence_add_list(PurplePresence *presence, const GList *source_list);
+void purple_presence_add_list(PurplePresence *presence, GList *source_list);
 
 /**
  * Sets the active state of a status in a presence.
@@ -869,9 +871,9 @@
  *
  * @param presence The presence.
  *
- * @return The statuses.
+ * @constreturn The statuses.
  */
-const GList *purple_presence_get_statuses(const PurplePresence *presence);
+GList *purple_presence_get_statuses(const PurplePresence *presence);
 
 /**
  * Returns the status with the specified ID from a presence.
--- a/pidgin/gtkaccount.c	Sat Jun 16 19:21:06 2007 +0000
+++ b/pidgin/gtkaccount.c	Sat Jun 16 19:44:59 2007 +0000
@@ -697,7 +697,7 @@
 	PurpleAccountOption *option;
 	PurpleAccount *account;
 	GtkWidget *frame, *vbox, *check, *entry, *combo, *menu, *item;
-	const GList *list, *node;
+	GList *list, *node;
 	gint i, idx, int_value;
 	GtkListStore *model;
 	GtkTreeIter iter;
--- a/pidgin/gtkpounce.c	Sat Jun 16 19:21:06 2007 +0000
+++ b/pidgin/gtkpounce.c	Sat Jun 16 19:44:59 2007 +0000
@@ -211,7 +211,7 @@
 static void
 populate_pounces_list(PouncesManager *dialog)
 {
-	const GList *pounces;
+	GList *pounces;
 
 	gtk_list_store_clear(dialog->model);
 
--- a/pidgin/gtkrequest.c	Sat Jun 16 19:21:06 2007 +0000
+++ b/pidgin/gtkrequest.c	Sat Jun 16 19:44:59 2007 +0000
@@ -974,7 +974,7 @@
 	GtkTreeSelection *sel;
 	GtkTreeViewColumn *column;
 	GtkTreeIter iter;
-	const GList *l;
+	GList *l;
 
 	/* Create the scrolled window */
 	sw = gtk_scrolled_window_new(NULL, NULL);
--- a/pidgin/gtksavedstatuses.c	Sat Jun 16 19:21:06 2007 +0000
+++ b/pidgin/gtksavedstatuses.c	Sat Jun 16 19:44:59 2007 +0000
@@ -389,7 +389,7 @@
 static void
 populate_saved_status_list(StatusWindow *dialog)
 {
-	const GList *saved_statuses;
+	GList *saved_statuses;
 
 	gtk_list_store_clear(dialog->model);
 
@@ -1393,7 +1393,7 @@
 	GtkTreeIter iter;
 	GtkCellRenderer *rend;
 	const char *status_id = NULL;
-	const GList *list;
+	GList *list;
 	gboolean select = FALSE;
 
 	g_return_if_fail(status_editor != NULL);
--- a/pidgin/gtkstatusbox.c	Sat Jun 16 19:21:06 2007 +0000
+++ b/pidgin/gtkstatusbox.c	Sat Jun 16 19:44:59 2007 +0000
@@ -191,7 +191,7 @@
 static void
 update_to_reflect_account_status(PidginStatusBox *status_box, PurpleAccount *account, PurpleStatus *newstatus)
 {
-	const GList *l;
+	GList *l;
 	int status_no = -1;
 	const PurpleStatusType *statustype = NULL;
 	const char *message;
@@ -732,7 +732,7 @@
 static PurpleStatusType *
 find_status_type_by_index(const PurpleAccount *account, gint active)
 {
-	const GList *l = purple_account_get_status_types(account);
+	GList *l = purple_account_get_status_types(account);
 	gint i;
 
 	for (i = 0; l; l = l->next) {
@@ -941,7 +941,7 @@
 {
 	PurpleAccount *acct = NULL, *acct2;
 	GList *tmp, *tmp2, *active_accts = purple_accounts_get_all_active();
-	const GList *s, *s1, *s2;
+	GList *s, *s1, *s2;
 
 	for (tmp = active_accts; tmp; tmp = tmp->next) {
 		acct = tmp->data;
@@ -989,7 +989,7 @@
 add_account_statuses(PidginStatusBox *status_box, PurpleAccount *account)
 {
 	/* Per-account */
-	const GList *l;
+	GList *l;
 	GdkPixbuf *pixbuf;
 
 	for (l = purple_account_get_status_types(account); l != NULL; l = l->next)
@@ -2223,7 +2223,7 @@
 		{
 			/* Manually find the appropriate transient acct */
 			if (status_box->token_status_account) {
-				const GList *iter = purple_savedstatuses_get_all();
+				GList *iter = purple_savedstatuses_get_all();
 				GList *tmp, *active_accts = purple_accounts_get_all_active();
 
 				for (; iter != NULL; iter = iter->next) {
--- a/pidgin/plugins/gevolution/gevolution.c	Sat Jun 16 19:21:06 2007 +0000
+++ b/pidgin/plugins/gevolution/gevolution.c	Sat Jun 16 19:44:59 2007 +0000
@@ -118,9 +118,9 @@
 }
 
 static void
-contacts_changed_cb(EBookView *book_view, const GList *contacts)
+contacts_changed_cb(EBookView *book_view, GList *contacts)
 {
-	const GList *l;
+	GList *l;
 
 	if (purple_connections_get_all() == NULL)
 		return;