diff libpurple/request.h @ 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 516f14bef90e
children 72906c5ac037
line wrap: on
line diff
--- 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);
 
 /*@}*/