Mercurial > pidgin.yaz
diff libpurple/request.c @ 18118:ab6d2763b8d8
Re-fix the DBus list handling code by killing const GList* / const GSList*
everywhere. Now we maintain a list of functions which return a GList or
GSList which must not be freed. Ideally at some point this will be
replaced with code that looks at the Doxygen comment for the function and
honors @constreturn, which I've declared as a macro around @return that
prints a @note about not modifying or freeing the returned value.
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sat, 16 Jun 2007 19:44:59 +0000 |
parents | 08db93bbd798 |
children | 7df46d8bf114 |
line wrap: on
line diff
--- 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);