diff options
49 files changed, 205 insertions, 243 deletions
diff --git a/ChangeLog.API b/ChangeLog.API index a58304dc11..505b99fcab 100644 --- a/ChangeLog.API +++ b/ChangeLog.API @@ -21,10 +21,6 @@ version 2.1.0 (??/??/????): * 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 @@ version 2.1.0 (??/??/????): 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 @@ version 2.1.0 (??/??/????): * 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 @@ version 2.1.0 (??/??/????): 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: diff --git a/finch/gntft.c b/finch/gntft.c index a721b6305d..6cfebbbe45 100644 --- a/finch/gntft.c +++ b/finch/gntft.c @@ -86,7 +86,7 @@ enum 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 @@ stop_button_cb(GntButton *button) void finch_xfer_dialog_new(void) { - const GList *iter; + GList *iter; GntWidget *window; GntWidget *bbox; GntWidget *button; diff --git a/finch/gntpounce.c b/finch/gntpounce.c index 1b7a292d8a..a3a6514981 100644 --- a/finch/gntpounce.c +++ b/finch/gntpounce.c @@ -137,7 +137,7 @@ add_pounce_to_treeview(GntTree *tree, PurplePounce *pounce) static void populate_pounces_list(PouncesManager *dialog) { - const GList *pounces; + GList *pounces; gnt_tree_remove_all(GNT_TREE(dialog->tree)); diff --git a/finch/gntprefs.c b/finch/gntprefs.c index 4227188b6c..7d5be7d9ed 100644 --- a/finch/gntprefs.c +++ b/finch/gntprefs.c @@ -89,7 +89,7 @@ static GList * 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)) diff --git a/finch/gntrequest.c b/finch/gntrequest.c index a0e0db0942..59fac8f1f9 100644 --- a/finch/gntrequest.c +++ b/finch/gntrequest.c @@ -297,7 +297,7 @@ request_fields_cb(GntWidget *button, PurpleRequestFields *fields) 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 @@ finch_request_fields(const char *title, const char *primary, 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 @@ finch_request_fields(const char *title, const char *primary, } else if (type == PURPLE_REQUEST_FIELD_LIST) { - const GList *list; + GList *list; gboolean multi = purple_request_field_list_get_multi_select(field); if (multi) { diff --git a/finch/gntstatus.c b/finch/gntstatus.c index e423727428..460043982f 100644 --- a/finch/gntstatus.c +++ b/finch/gntstatus.c @@ -83,7 +83,7 @@ reset_status_window(GntWidget *widget, gpointer null) 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 @@ update_edit_list(GntWidget *widget, EditStatus *edit) 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 @@ popup_substatus(GntTree *tree, const char *key, EditStatus *edit) 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; diff --git a/finch/libgnt/gnttree.c b/finch/libgnt/gnttree.c index 064dadcc6f..b91b36619d 100644 --- a/finch/libgnt/gnttree.c +++ b/finch/libgnt/gnttree.c @@ -1017,7 +1017,7 @@ int gnt_tree_get_visible_rows(GntTree *tree) return ret; } -const GList *gnt_tree_get_rows(GntTree *tree) +GList *gnt_tree_get_rows(GntTree *tree) { return tree->list; } diff --git a/finch/libgnt/gnttree.h b/finch/libgnt/gnttree.h index 2c25ff638e..289851fd43 100644 --- a/finch/libgnt/gnttree.h +++ b/finch/libgnt/gnttree.h @@ -190,7 +190,13 @@ char * gnt_tree_get_selection_text(GntTree *tree); */ 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); /** * diff --git a/finch/libgnt/gntwm.h b/finch/libgnt/gntwm.h index 825ec972e4..7105df5fc0 100644 --- a/finch/libgnt/gntwm.h +++ b/finch/libgnt/gntwm.h @@ -163,7 +163,7 @@ struct _GntWMClass /* 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); diff --git a/finch/libgnt/wms/s.c b/finch/libgnt/wms/s.c index 627d31413b..2cc98ceb85 100644 --- a/finch/libgnt/wms/s.c +++ b/finch/libgnt/wms/s.c @@ -121,7 +121,7 @@ s_new_window(GntWM *wm, GntWidget *win) 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); diff --git a/libpurple/account.c b/libpurple/account.c index 21aa6ab4c1..f5f852dccb 100644 --- a/libpurple/account.c +++ b/libpurple/account.c @@ -205,7 +205,7 @@ status_attrs_to_xmlnode(const PurpleStatus *status) { 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 @@ static xmlnode * statuses_to_xmlnode(const PurplePresence *presence) { xmlnode *node, *child; - const GList *statuses, *status; + GList *statuses, *status; node = xmlnode_new("statuses"); @@ -1805,7 +1805,7 @@ purple_account_get_status(const PurpleAccount *account, const char *status_id) 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 @@ purple_account_get_status_type(const PurpleAccount *account, const char *id) 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 @@ purple_account_is_status_active(const PurpleAccount *account, 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); diff --git a/libpurple/account.h b/libpurple/account.h index ef07d72e2a..4e748952e0 100644 --- a/libpurple/account.h +++ b/libpurple/account.h @@ -672,9 +672,9 @@ gboolean purple_account_is_status_active(const PurpleAccount *account, * * @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 @@ void purple_accounts_reorder(PurpleAccount *account, gint new_index); /** * Returns a list of all accounts. * - * @return A list of all accounts. + * @constreturn A list of all accounts. */ GList *purple_accounts_get_all(void); diff --git a/libpurple/accountopt.c b/libpurple/accountopt.c index e0556257cd..a0fde3ffc6 100644 --- a/libpurple/accountopt.c +++ b/libpurple/accountopt.c @@ -282,7 +282,7 @@ purple_account_option_get_masked(const PurpleAccountOption *option) return option->masked; } -const GList * +GList * purple_account_option_get_list(const PurpleAccountOption *option) { g_return_val_if_fail(option != NULL, NULL); diff --git a/libpurple/accountopt.h b/libpurple/accountopt.h index 5b3da74932..00b5242456 100644 --- a/libpurple/accountopt.h +++ b/libpurple/accountopt.h @@ -296,9 +296,9 @@ purple_account_option_get_masked(const PurpleAccountOption *option); * * @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); /*@}*/ diff --git a/libpurple/connection.h b/libpurple/connection.h index d2d73ccb23..56f586ccce 100644 --- a/libpurple/connection.h +++ b/libpurple/connection.h @@ -259,14 +259,14 @@ void purple_connections_disconnect_all(void); * 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); diff --git a/libpurple/conversation.h b/libpurple/conversation.h index f250537aaf..b860e24304 100644 --- a/libpurple/conversation.h +++ b/libpurple/conversation.h @@ -502,21 +502,21 @@ gpointer purple_conversation_get_data(PurpleConversation *conv, const char *key) * * 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 @@ GList *purple_conv_chat_set_users(PurpleConvChat *chat, GList *users); * * @param chat The chat. * - * @return The list of users. + * @constreturn The list of users. */ GList *purple_conv_chat_get_users(const PurpleConvChat *chat); diff --git a/libpurple/dbus-analyze-functions.py b/libpurple/dbus-analyze-functions.py index 050da31ad7..2689a6f8bc 100644 --- a/libpurple/dbus-analyze-functions.py +++ b/libpurple/dbus-analyze-functions.py @@ -32,8 +32,8 @@ excluded = [\ "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 @@ stringlists = [ "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 @@ class Binding: 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 @@ class ClientBinding (Binding): 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 @@ class ServerBinding (Binding): # 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 @@ class ServerBinding (Binding): 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)) diff --git a/libpurple/dbus-bindings.h b/libpurple/dbus-bindings.h index 824b37e4ae..b3bc88dd3f 100644 --- a/libpurple/dbus-bindings.h +++ b/libpurple/dbus-bindings.h @@ -83,52 +83,14 @@ purple_dbus_message_iter_get_args_valist (DBusMessageIter *iter, 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); diff --git a/libpurple/dbus-server.c b/libpurple/dbus-server.c index bf4ea6eb15..dc4f6653f0 100644 --- a/libpurple/dbus-server.c +++ b/libpurple/dbus-server.c @@ -290,112 +290,74 @@ null_to_empty(const char *s) } 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; + if (free_memory) + g_list_free(list); - g_list_free(list); return array; } dbus_int32_t * -purple_dbusify_const_GSList(const GSList *list, dbus_int32_t *len) +purple_dbusify_GSList(GSList *list, gboolean free_memory, dbus_int32_t *len) { dbus_int32_t *array; int i; - const GSList *elem; + GSList *elem; - /* g_slist_length should really take a const GSList */ - *len = g_slist_length((GSList *)list); + *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); - return array; -} - -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; + if (free_memory) + g_slist_free(list); - g_slist_free(list); return array; } gpointer * -purple_const_GList_to_array(const GList *list, dbus_int32_t *len) +purple_GList_to_array(GList *list, gboolean free_memory, dbus_int32_t *len) { gpointer *array; int i; - const GList *elem; + GList *elem; - *len = g_list_length((GList *)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; - return array; -} - -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; + if (free_memory) + g_list_free(list); - g_list_free(list); return array; } gpointer * -purple_const_GSList_to_array(const GSList *list, dbus_int32_t *len) +purple_GSList_to_array(GSList *list, gboolean free_memory, dbus_int32_t *len) { gpointer *array; int i; - const GSList *elem; + GSList *elem; - *len = g_slist_length((GSList *)list); + *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; - 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); - - if (!free_memory) - return array; + if (free_memory) + g_slist_free(list); - g_slist_free(list); return array; } diff --git a/libpurple/mime.c b/libpurple/mime.c index 2c71447580..d850418b78 100644 --- a/libpurple/mime.c +++ b/libpurple/mime.c @@ -277,7 +277,7 @@ purple_mime_part_new(PurpleMimeDocument *doc) } -const GList * +GList * purple_mime_part_get_fields(PurpleMimePart *part) { g_return_val_if_fail(part != NULL, NULL); @@ -513,7 +513,7 @@ purple_mime_document_write(PurpleMimeDocument *doc, GString *str) } -const GList * +GList * purple_mime_document_get_fields(PurpleMimeDocument *doc) { g_return_val_if_fail(doc != NULL, NULL); @@ -537,7 +537,7 @@ purple_mime_document_set_field(PurpleMimeDocument *doc, const char *field, const } -const GList * +GList * purple_mime_document_get_parts(PurpleMimeDocument *doc) { g_return_val_if_fail(doc != NULL, NULL); diff --git a/libpurple/mime.h b/libpurple/mime.h index cec5be8546..17e9c95264 100644 --- a/libpurple/mime.h +++ b/libpurple/mime.h @@ -90,10 +90,10 @@ void purple_mime_document_write(PurpleMimeDocument *doc, GString *str); * * @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 @@ void purple_mime_document_set_field(PurpleMimeDocument *doc, * * @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 @@ PurpleMimePart *purple_mime_part_new(PurpleMimeDocument *doc); * * @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); /** diff --git a/libpurple/notify.h b/libpurple/notify.h index 3130b26874..0bae63ad3e 100644 --- a/libpurple/notify.h +++ b/libpurple/notify.h @@ -456,7 +456,7 @@ void purple_notify_user_info_destroy(PurpleNotifyUserInfo *user_info); * * @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); diff --git a/libpurple/plugins/perl/common/Account.xs b/libpurple/plugins/perl/common/Account.xs index 953e83820e..96e1f8877e 100644 --- a/libpurple/plugins/perl/common/Account.xs +++ b/libpurple/plugins/perl/common/Account.xs @@ -184,7 +184,7 @@ void 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"))); diff --git a/libpurple/plugins/perl/common/AccountOpts.xs b/libpurple/plugins/perl/common/AccountOpts.xs index 87c54f89e1..8296b4b4e9 100644 --- a/libpurple/plugins/perl/common/AccountOpts.xs +++ b/libpurple/plugins/perl/common/AccountOpts.xs @@ -88,7 +88,7 @@ void 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 diff --git a/libpurple/plugins/perl/common/Notify.xs b/libpurple/plugins/perl/common/Notify.xs index 9d0d13230e..5720643f0a 100644 --- a/libpurple/plugins/perl/common/Notify.xs +++ b/libpurple/plugins/perl/common/Notify.xs @@ -140,7 +140,7 @@ void 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) { diff --git a/libpurple/plugins/perl/common/Request.xs b/libpurple/plugins/perl/common/Request.xs index 5c28cb1ba5..be4edc70d5 100644 --- a/libpurple/plugins/perl/common/Request.xs +++ b/libpurple/plugins/perl/common/Request.xs @@ -396,7 +396,7 @@ void 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 @@ void 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 @@ void 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"))); diff --git a/libpurple/plugins/perl/common/SavedStatuses.xs b/libpurple/plugins/perl/common/SavedStatuses.xs index 09ae918740..098655f76a 100644 --- a/libpurple/plugins/perl/common/SavedStatuses.xs +++ b/libpurple/plugins/perl/common/SavedStatuses.xs @@ -130,7 +130,7 @@ PROTOTYPES: ENABLE 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 @@ void 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"))); diff --git a/libpurple/plugins/perl/common/Status.xs b/libpurple/plugins/perl/common/Status.xs index 25561df959..ff5d440415 100644 --- a/libpurple/plugins/perl/common/Status.xs +++ b/libpurple/plugins/perl/common/Status.xs @@ -142,7 +142,7 @@ void 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 @@ void 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"))); diff --git a/libpurple/plugins/tcl/tcl_cmds.c b/libpurple/plugins/tcl/tcl_cmds.c index f269c88224..39687af374 100644 --- a/libpurple/plugins/tcl/tcl_cmds.c +++ b/libpurple/plugins/tcl/tcl_cmds.c @@ -113,7 +113,7 @@ int tcl_cmd_account(ClientData unused, Tcl_Interp *interp, int objc, Tcl_Obj *CO 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 @@ int tcl_cmd_presence(ClientData unused, Tcl_Interp *interp, int objc, Tcl_Obj *C 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 @@ int tcl_cmd_status_type(ClientData unused, Tcl_Interp *interp, int objc, Tcl_Obj Tcl_Obj *result = Tcl_GetObjResult(interp); PurpleStatusType *status_type; Tcl_Obj *list, *elem; - const GList *cur; + GList *cur; int error; if (objc < 2) { diff --git a/libpurple/protocols/gg/gg.c b/libpurple/protocols/gg/gg.c index 5e11c9da3a..c7481da70d 100644 --- a/libpurple/protocols/gg/gg.c +++ b/libpurple/protocols/gg/gg.c @@ -823,7 +823,7 @@ static void ggp_callback_add_to_chat_ok(PurpleConnection *gc, PurpleRequestField { 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); diff --git a/libpurple/protocols/jabber/xdata.c b/libpurple/protocols/jabber/xdata.c index 90a9a99d26..b85dda8b37 100644 --- a/libpurple/protocols/jabber/xdata.c +++ b/libpurple/protocols/jabber/xdata.c @@ -93,7 +93,7 @@ static void jabber_x_data_ok_cb(struct jabber_x_data_data *data, PurpleRequestFi 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); diff --git a/libpurple/protocols/sametime/sametime.c b/libpurple/protocols/sametime/sametime.c index 5c130c04b3..8efa3881ef 100644 --- a/libpurple/protocols/sametime/sametime.c +++ b/libpurple/protocols/sametime/sametime.c @@ -2660,7 +2660,7 @@ static void im_recv_mime(struct mwConversation *conv, 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_cancel(PurpleBuddy *buddy, 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 @@ static void remote_group_multi_cleanup(gpointer ignore, 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_done(struct mwPurplePluginData *pd, 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); diff --git a/libpurple/protocols/silc/buddy.c b/libpurple/protocols/silc/buddy.c index b375c84aad..79610125c7 100644 --- a/libpurple/protocols/silc/buddy.c +++ b/libpurple/protocols/silc/buddy.c @@ -1117,7 +1117,7 @@ static void silcpurple_add_buddy_select_cb(SilcPurpleBuddyRes r, PurpleRequestFields *fields) { PurpleRequestField *f; - const GList *list; + GList *list; SilcClientEntry client_entry; SilcDList clients; diff --git a/libpurple/protocols/silc/chat.c b/libpurple/protocols/silc/chat.c index 48f3731553..c50abcf220 100644 --- a/libpurple/protocols/silc/chat.c +++ b/libpurple/protocols/silc/chat.c @@ -291,7 +291,7 @@ silcpurple_chat_chpk_cb(SilcPurpleChauth sgc, PurpleRequestFields *fields) 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; diff --git a/libpurple/protocols/silc10/buddy.c b/libpurple/protocols/silc10/buddy.c index dcde59b420..41ce287960 100644 --- a/libpurple/protocols/silc10/buddy.c +++ b/libpurple/protocols/silc10/buddy.c @@ -1118,7 +1118,7 @@ static void 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"); diff --git a/libpurple/protocols/silc10/chat.c b/libpurple/protocols/silc10/chat.c index 343a153999..c7951bf998 100644 --- a/libpurple/protocols/silc10/chat.c +++ b/libpurple/protocols/silc10/chat.c @@ -278,7 +278,7 @@ silcpurple_chat_chpk_cb(SilcPurpleChauth sgc, PurpleRequestFields *fields) 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; diff --git a/libpurple/prpl.c b/libpurple/prpl.c index dde21d06cc..a8fc4fac35 100644 --- a/libpurple/prpl.c +++ b/libpurple/prpl.c @@ -265,7 +265,7 @@ GList * 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); diff --git a/libpurple/request.c b/libpurple/request.c index 238fb27b45..146dae9fe0 100644 --- a/libpurple/request.c +++ b/libpurple/request.c @@ -111,7 +111,7 @@ purple_request_fields_exists(const PurpleRequestFields *fields, const char *id) 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 @@ purple_request_field_list_clear_selected(PurpleRequestField *field) } 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_set_selected(PurpleRequestField *field, const GList *i 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 @@ purple_request_field_list_is_selected(const PurpleRequestField *field, 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 @@ purple_request_field_list_get_selected(const PurpleRequestField *field) 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); diff --git a/libpurple/request.h b/libpurple/request.h index 0e716e03bf..b895852db4 100644 --- a/libpurple/request.h +++ b/libpurple/request.h @@ -285,9 +285,9 @@ gboolean purple_request_fields_exists(const PurpleRequestFields *fields, * * @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 @@ void purple_request_field_list_clear_selected(PurpleRequestField *field); * 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 @@ gboolean purple_request_field_list_is_selected(const PurpleRequestField *field, * * @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 @@ const GList *purple_request_field_list_get_selected( * * @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); /*@}*/ diff --git a/libpurple/savedstatuses.c b/libpurple/savedstatuses.c index f5d531b2a0..cd6edc49b0 100644 --- a/libpurple/savedstatuses.c +++ b/libpurple/savedstatuses.c @@ -716,7 +716,7 @@ purple_savedstatus_delete(const char *title) return TRUE; } -const GList * +GList * purple_savedstatuses_get_all(void) { return saved_statuses; diff --git a/libpurple/savedstatuses.h b/libpurple/savedstatuses.h index d4a96999fe..4a362ec662 100644 --- a/libpurple/savedstatuses.h +++ b/libpurple/savedstatuses.h @@ -151,9 +151,9 @@ gboolean purple_savedstatus_delete(const char *title); /** * 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 diff --git a/libpurple/status.c b/libpurple/status.c index 8fe95c1cb3..c2cfd113be 100644 --- a/libpurple/status.c +++ b/libpurple/status.c @@ -451,7 +451,7 @@ purple_status_type_get_attr(const PurpleStatusType *status_type, const char *id) 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 @@ PurpleStatus * 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 @@ purple_status_set_active_with_attrs(PurpleStatus *status, gboolean active, va_li 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 @@ purple_presence_add_status(PurplePresence *presence, PurpleStatus *status) } 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 @@ purple_presence_get_buddy(const PurplePresence *presence) 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 @@ PurpleStatus * 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 @@ gboolean 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 @@ purple_presence_compare(const PurplePresence *presence1, 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; diff --git a/libpurple/status.h b/libpurple/status.h index f83c149031..aebb833435 100644 --- a/libpurple/status.h +++ b/libpurple/status.h @@ -387,9 +387,9 @@ PurpleStatusAttr *purple_status_type_get_attr(const PurpleStatusType *status_typ * * @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 @@ void purple_status_set_active_with_attrs(PurpleStatus *status, gboolean active, * @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 @@ void purple_presence_add_status(PurplePresence *presence, PurpleStatus *status); * 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 @@ PurpleBuddy *purple_presence_get_buddy(const PurplePresence *presence); * * @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. diff --git a/pidgin/gtkaccount.c b/pidgin/gtkaccount.c index c3cb70f776..cab8f0f2e2 100644 --- a/pidgin/gtkaccount.c +++ b/pidgin/gtkaccount.c @@ -697,7 +697,7 @@ add_protocol_options(AccountPrefsDialog *dialog, GtkWidget *parent) 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; diff --git a/pidgin/gtkpounce.c b/pidgin/gtkpounce.c index b7bda2218a..8662572c30 100644 --- a/pidgin/gtkpounce.c +++ b/pidgin/gtkpounce.c @@ -211,7 +211,7 @@ add_pounce_to_treeview(GtkListStore *model, PurplePounce *pounce) static void populate_pounces_list(PouncesManager *dialog) { - const GList *pounces; + GList *pounces; gtk_list_store_clear(dialog->model); diff --git a/pidgin/gtkrequest.c b/pidgin/gtkrequest.c index 634302d0f7..e2a899fd22 100644 --- a/pidgin/gtkrequest.c +++ b/pidgin/gtkrequest.c @@ -974,7 +974,7 @@ create_list_field(PurpleRequestField *field) GtkTreeSelection *sel; GtkTreeViewColumn *column; GtkTreeIter iter; - const GList *l; + GList *l; /* Create the scrolled window */ sw = gtk_scrolled_window_new(NULL, NULL); diff --git a/pidgin/gtksavedstatuses.c b/pidgin/gtksavedstatuses.c index 40d97c8f11..a5d24fdc9b 100644 --- a/pidgin/gtksavedstatuses.c +++ b/pidgin/gtksavedstatuses.c @@ -389,7 +389,7 @@ add_status_to_saved_status_list(GtkListStore *model, PurpleSavedStatus *saved_st 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 @@ edit_substatus(StatusEditor *status_editor, PurpleAccount *account) GtkTreeIter iter; GtkCellRenderer *rend; const char *status_id = NULL; - const GList *list; + GList *list; gboolean select = FALSE; g_return_if_fail(status_editor != NULL); diff --git a/pidgin/gtkstatusbox.c b/pidgin/gtkstatusbox.c index bd545b412a..11ebff965b 100644 --- a/pidgin/gtkstatusbox.c +++ b/pidgin/gtkstatusbox.c @@ -191,7 +191,7 @@ pidgin_status_box_get_property(GObject *object, guint param_id, 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 @@ pidgin_status_box_refresh(PidginStatusBox *status_box) 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 @@ static PurpleAccount* check_active_accounts_for_identical_statuses() { 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 @@ static void 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 @@ activate_currently_selected_status(PidginStatusBox *status_box) { /* 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) { diff --git a/pidgin/plugins/gevolution/gevolution.c b/pidgin/plugins/gevolution/gevolution.c index a895524d3f..974478161b 100644 --- a/pidgin/plugins/gevolution/gevolution.c +++ b/pidgin/plugins/gevolution/gevolution.c @@ -118,9 +118,9 @@ update_buddies_from_contact(EContact *contact) } 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; |