summaryrefslogtreecommitdiff
path: root/toxcore/list.h
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2014-06-06 13:23:21 -0400
committerirungentoo <irungentoo@gmail.com>2014-06-06 13:23:21 -0400
commit7adefb6e6bc22eb3e68b4acc754a401caccffb4f (patch)
treee968b42ef01ddfe5e7b79a6556ad2cb68ef586e0 /toxcore/list.h
parentac5e44debbbc2cb475da04562b5cd1d64e87d255 (diff)
Renamed list functions to fix conflict issue on certain machines.
Diffstat (limited to 'toxcore/list.h')
-rw-r--r--toxcore/list.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/toxcore/list.h b/toxcore/list.h
index 299c010d..580cc51c 100644
--- a/toxcore/list.h
+++ b/toxcore/list.h
@@ -35,13 +35,13 @@ typedef struct {
35 uint32_t size; //size of the elements 35 uint32_t size; //size of the elements
36 void *data; //array of elements 36 void *data; //array of elements
37 int *ids; //array of element ids 37 int *ids; //array of element ids
38} LIST; 38} BS_LIST;
39 39
40/* Initialize a list, element_size is the size of the elements in the list */ 40/* Initialize a list, element_size is the size of the elements in the list */
41void list_init(LIST *list, uint32_t element_size); 41void bs_list_init(BS_LIST *list, uint32_t element_size);
42 42
43/* Free a list initiated with list_init */ 43/* Free a list initiated with list_init */
44void list_free(LIST *list); 44void bs_list_free(BS_LIST *list);
45 45
46/* Retrieve the id of an element in the list 46/* Retrieve the id of an element in the list
47 * 47 *
@@ -49,7 +49,7 @@ void list_free(LIST *list);
49 * >= 0 : id associated with data 49 * >= 0 : id associated with data
50 * -1 : failure 50 * -1 : failure
51 */ 51 */
52int list_find(LIST *list, void *data); 52int bs_list_find(BS_LIST *list, void *data);
53 53
54/* Add an element with associated id to the list 54/* Add an element with associated id to the list
55 * 55 *
@@ -57,7 +57,7 @@ int list_find(LIST *list, void *data);
57 * 1 : success 57 * 1 : success
58 * 0 : failure (data already in list) 58 * 0 : failure (data already in list)
59 */ 59 */
60int list_add(LIST *list, void *data, int id); 60int bs_list_add(BS_LIST *list, void *data, int id);
61 61
62/* Remove element from the list 62/* Remove element from the list
63 * 63 *
@@ -65,6 +65,6 @@ int list_add(LIST *list, void *data, int id);
65 * 1 : success 65 * 1 : success
66 * 0 : failure (element not found or id does not match 66 * 0 : failure (element not found or id does not match
67 */ 67 */
68int list_remove(LIST *list, void *data, int id); 68int bs_list_remove(BS_LIST *list, void *data, int id);
69 69
70#endif 70#endif