renamed list_add_list to list_append_list
authorJean-Philippe Orsini <jeanfi@gmail.com>
Tue, 6 Sep 2011 20:53:27 +0000 (20:53 +0000)
committerJean-Philippe Orsini <jeanfi@gmail.com>
Tue, 6 Sep 2011 20:53:27 +0000 (20:53 +0000)
added doc

src/list.c
src/list.h
src/lp_ws.c

index 20e1858..4157dee 100644 (file)
@@ -58,7 +58,7 @@ void **list_add(void **list, void *new_item)
        return new_list;
 }
 
-void **list_add_list(void **list1, void **list2)
+void **list_append_list(void **list1, void **list2)
 {
        int n1, n2, n;
        void **list;
index 69b7b25..1b66014 100644 (file)
 #ifndef _PPASTATS_LIST_H_
 #define _PPASTATS_LIST_H_
 
+/*
+ * Convenience functions for manipulating null-terminated list of
+ * pointers.
+ */
+
+/* Returns the number of items in the list. */
 int list_length(void **list);
+
+/*
+ * Adds item into a list.
+ *
+ * Returns a new allocated list contains all items.
+ */
 void **list_add(void **list, void *new_item);
-void **list_add_list(void **list1, void **list2);
+
+/*
+ * Appends all items of two lists.
+ *
+ * Returns a new allocated list containing all items.
+ */
+void **list_append_list(void **list1, void **list2);
 
 #endif
index d6f4087..4b51be8 100644 (file)
@@ -149,8 +149,8 @@ get_binary_package_publishing_history_list(const char *archive_url,
                if (!o)
                        break;
 
-               result = list_add_list(result,
-                                      (void **)json_object_to_bpph_list(o));
+               result = list_append_list(result,
+                                         (void **)json_object_to_bpph_list(o));
 
                o_next = json_object_object_get(o, "next_collection_link");