summaryrefslogtreecommitdiff
path: root/toxcore/list.h
diff options
context:
space:
mode:
authorMarc Schütz <schuetzm@gmx.net>2014-06-10 18:42:52 +0200
committerMarc Schütz <schuetzm@gmx.net>2014-06-10 18:42:52 +0200
commite651cc9984d982a2d55d4f3ac4673b727a7341a3 (patch)
tree4395e3b24f33d040b53d59f6d1903aee7fe00203 /toxcore/list.h
parent55d986270b3af91019dabfb2169817cd894d84fe (diff)
Const correctness in toxcore/list.c
Diffstat (limited to 'toxcore/list.h')
-rw-r--r--toxcore/list.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/toxcore/list.h b/toxcore/list.h
index 580cc51c..090853f9 100644
--- a/toxcore/list.h
+++ b/toxcore/list.h
@@ -41,7 +41,7 @@ typedef struct {
41void bs_list_init(BS_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 bs_list_free(BS_LIST *list); 44void bs_list_free(const 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 bs_list_free(BS_LIST *list);
49 * >= 0 : id associated with data 49 * >= 0 : id associated with data
50 * -1 : failure 50 * -1 : failure
51 */ 51 */
52int bs_list_find(BS_LIST *list, void *data); 52int bs_list_find(const BS_LIST *list, const 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,14 +57,14 @@ int bs_list_find(BS_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 bs_list_add(BS_LIST *list, void *data, int id); 60int bs_list_add(BS_LIST *list, const void *data, int id);
61 61
62/* Remove element from the list 62/* Remove element from the list
63 * 63 *
64 * return value: 64 * return value:
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 bs_list_remove(BS_LIST *list, void *data, int id); 68int bs_list_remove(BS_LIST *list, const void *data, int id);
69 69
70#endif 70#endif