# HG changeset patch # User Mike Becker # Date 1612724893 -3600 # Node ID 8cd2743524193ac5959510f24e066383db3f36d5 # Parent 8902fcd1e05700aa295f38363980c5f3a9a0182f changes off_t to ptrdiff_t diff -r 8902fcd1e057 -r 8cd274352419 src/cx/linked_list.h --- a/src/cx/linked_list.h Sun Feb 07 20:05:26 2021 +0100 +++ b/src/cx/linked_list.h Sun Feb 07 20:08:13 2021 +0100 @@ -29,11 +29,12 @@ #ifndef UCX_LINKED_LIST_H #define UCX_LINKED_LIST_H +#include #include "list.h" -void *cx_linked_list_last(void **begin, void **end, off_t loc_next); +void *cx_linked_list_last(void **begin, void **end, ptrdiff_t loc_next); -int cx_linked_list_add(void **begin, void **end, off_t loc_next, off_t loc_prev, void *newnode); +int cx_linked_list_add(void **begin, void **end, ptrdiff_t loc_next, ptrdiff_t loc_prev, void *newnode); CxList cxLinkedListCreate(CxAllocator allocator, CxListComparator comparator); diff -r 8902fcd1e057 -r 8cd274352419 src/linked_list.c --- a/src/linked_list.c Sun Feb 07 20:05:26 2021 +0100 +++ b/src/linked_list.c Sun Feb 07 20:08:13 2021 +0100 @@ -27,13 +27,12 @@ */ #include "cx/linked_list.h" -#include /* LOW LEVEL LINKED LIST FUNCTIONS */ #define CX_LL_PTR(cur, off) ((void**)(((char*)cur)+off)) -void *cx_linked_list_last(void **begin, void **end, off_t loc_next) { +void *cx_linked_list_last(void **begin, void **end, ptrdiff_t loc_next) { if (end != NULL) { return *end; } else { @@ -50,7 +49,7 @@ } } -int cx_linked_list_add(void **begin, void **end, off_t loc_next, off_t loc_prev, void *newnode) { +int cx_linked_list_add(void **begin, void **end, ptrdiff_t loc_next, ptrdiff_t loc_prev, void *newnode) { // TODO: how do we report error messages? if (loc_next < 0 || (begin == NULL && end == NULL)) { return 1;