summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 982e6a7)
raw | patch | inline | side by side (parent: 982e6a7)
author | Sebastian Harl <sh@tokkee.org> | |
Wed, 2 Oct 2013 09:04:42 +0000 (11:04 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Wed, 2 Oct 2013 09:04:42 +0000 (11:04 +0200) |
src/include/utils/llist.h | patch | blob | history | |
src/utils/llist.c | patch | blob | history |
index af8285f6a3367fdc026f81bf0387243ff143c20f..104c9e45ab94c2e08a8aca2feb5e84ba57a2e1db 100644 (file)
typedef struct sdb_llist_iter sdb_llist_iter_t;
typedef int (*sdb_llist_cmp_cb)(const sdb_object_t *, const sdb_object_t *);
-typedef int (*sdb_llist_lookup_cb)(const sdb_object_t *, void *user_data);
+typedef int (*sdb_llist_lookup_cb)(const sdb_object_t *, const void *user_data);
/*
* sdb_llist_create, sdb_llist_destroy:
*/
sdb_object_t *
sdb_llist_search(sdb_llist_t *list,
- sdb_llist_lookup_cb lookup, void *user_data);
+ sdb_llist_lookup_cb lookup, const void *user_data);
/*
* sdb_llist_search_by_name:
*/
sdb_object_t *
sdb_llist_remove(sdb_llist_t *list,
- sdb_llist_lookup_cb lookup, void *user_data);
+ sdb_llist_lookup_cb lookup, const void *user_data);
/*
* sdb_llist_shift:
diff --git a/src/utils/llist.c b/src/utils/llist.c
index 3f54786074941d368bc88da4ca475b8cd2559e7c..0d61769b26b8daea103c73e6bb3d8d31e1886be3 100644 (file)
--- a/src/utils/llist.c
+++ b/src/utils/llist.c
static sdb_llist_elem_t *
llist_search(sdb_llist_t *list,
- sdb_llist_lookup_cb lookup, void *user_data)
+ sdb_llist_lookup_cb lookup, const void *user_data)
{
sdb_llist_elem_t *elem;
sdb_object_t *
sdb_llist_search(sdb_llist_t *list,
- sdb_llist_lookup_cb lookup, void *user_data)
+ sdb_llist_lookup_cb lookup, const void *user_data)
{
sdb_llist_elem_t *elem;
sdb_object_t *
sdb_llist_remove(sdb_llist_t *list,
- sdb_llist_lookup_cb lookup, void *user_data)
+ sdb_llist_lookup_cb lookup, const void *user_data)
{
sdb_llist_elem_t *elem;
sdb_object_t *obj = NULL;