data_structures

data structures in C
Log | Files | Refs | Feed

commit 69ddc53db121d077471eea3a8675028d7d0a747d
parent 625911257a550014862d6c3619e3e8bf562c53af
Author: Jenny Doe <tng@soykaf.me>
Date:   Fri, 22 Mar 2019 16:46:15 +0100

fixed: void * to const void *

Diffstat:
Mclist.c | 2+-
Mclist.h | 2+-
Mdlist.c | 4++--
Mdlist.h | 4++--
Mlist.c | 2+-
Mlist.h | 2+-
6 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/clist.c b/clist.c @@ -33,7 +33,7 @@ clist_destroy(cList * list) int -clist_ins_next(cList * list, cListElmt * left, void *data) +clist_ins_next(cList * list, cListElmt * left, const void *data) { /* silently fail */ if (list->size == UINT_MAX - 1) { diff --git a/clist.h b/clist.h @@ -24,7 +24,7 @@ void clist_init(cList *, void (*) (void *)); void clist_destroy(cList *); /* returns 0 on success or max size, 1 when malloc fail */ -int clist_ins_next(cList *, cListElmt *, void *); +int clist_ins_next(cList *, cListElmt *, const void *); /* returns 0 on success, 1 if list's size is 0 */ int clist_rem_next(cList *, cListElmt *, void **); diff --git a/dlist.c b/dlist.c @@ -34,7 +34,7 @@ dlist_destroy(dList * list) int -dlist_ins_next(dList * list, dListElmt * left, void *data) +dlist_ins_next(dList * list, dListElmt * left, const void *data) { /* silently fail */ if (list->size == UINT_MAX - 1) { @@ -71,7 +71,7 @@ dlist_ins_next(dList * list, dListElmt * left, void *data) } int -dlist_ins_prev(dList * list, dListElmt * right, void *data) +dlist_ins_prev(dList * list, dListElmt * right, const void *data) { /* silently fail */ if (list->size == UINT_MAX - 1) { diff --git a/dlist.h b/dlist.h @@ -26,8 +26,8 @@ void dlist_init(dList *, void (*) (void *)); void dlist_destroy(dList *); /* returns 0 on success or max size, 1 when malloc fail */ -int dlist_ins_next(dList *, dListElmt *, void *); -int dlist_ins_prev(dList *, dListElmt *, void *); +int dlist_ins_next(dList *, dListElmt *, const void *); +int dlist_ins_prev(dList *, dListElmt *, const void *); /* returns 0 on success, 1 if list's size is 0 */ int dlist_remove(dList *, dListElmt *, void **); diff --git a/list.c b/list.c @@ -34,7 +34,7 @@ list_destroy(List * list) int -list_ins_next(List * list, ListElmt * left, void *data) +list_ins_next(List * list, ListElmt * left, const void *data) { /* silently fail */ if (list->size == UINT_MAX - 1) { diff --git a/list.h b/list.h @@ -25,7 +25,7 @@ void list_init(List *, void (*) (void *)); void list_destroy(List *); /* returns 0 on success or max size, 1 when malloc fail */ -int list_ins_next(List *, ListElmt *, void *); +int list_ins_next(List *, ListElmt *, const void *); /* returns 0 on success, 1 if list's size is 0 */ int list_rem_next(List *, ListElmt *, void **);