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;
#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
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");