# HG changeset patch # User Mike Becker # Date 1632650247 -7200 # Node ID 067aa769796aa03e2f0c3864ddd456d2810bd10b # Parent 81a4c3a63e655cc60ddf4c6e4d07fcbb9ca45a44 fix missing extern "C" diff -r 81a4c3a63e65 -r 067aa769796a src/cx/allocator.h --- a/src/cx/allocator.h Mon Mar 01 22:19:06 2021 +0100 +++ b/src/cx/allocator.h Sun Sep 26 11:57:27 2021 +0200 @@ -31,6 +31,10 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + typedef struct { void *(*malloc)(void *data, size_t n); void *(*realloc)(void *data, void *mem, size_t n); @@ -58,4 +62,8 @@ void cxFree(CxAllocator allocator, void *mem); +#ifdef __cplusplus +} /* extern "C" */ +#endif + #endif /* UCX_ALLOCATOR_H */ diff -r 81a4c3a63e65 -r 067aa769796a src/cx/linked_list.h --- a/src/cx/linked_list.h Mon Mar 01 22:19:06 2021 +0100 +++ b/src/cx/linked_list.h Sun Sep 26 11:57:27 2021 +0200 @@ -32,6 +32,10 @@ #include #include "list.h" +#ifdef __cplusplus +extern "C" { +#endif + void *cx_linked_list_last(void **begin, void **end, ptrdiff_t loc_next); int cx_linked_list_add(void **begin, void **end, ptrdiff_t loc_prev, ptrdiff_t loc_next, void *new_node); @@ -44,4 +48,8 @@ size_t cxLinkedListRecalculateSize(CxList list); +#ifdef __cplusplus +} /* extern "C" */ +#endif + #endif /* UCX_LINKED_LIST_H */ diff -r 81a4c3a63e65 -r 067aa769796a src/cx/list.h --- a/src/cx/list.h Mon Mar 01 22:19:06 2021 +0100 +++ b/src/cx/list.h Sun Sep 26 11:57:27 2021 +0200 @@ -32,6 +32,10 @@ #include #include "allocator.h" +#ifdef __cplusplus +extern "C" { +#endif + typedef int(*CxListComparator)(void const *left, void const *right); typedef struct { @@ -45,9 +49,13 @@ typedef struct { int (*add)(cx_list *list, void *elem); + int (*insert)(cx_list *list, size_t index, void *elem); + void *(*remove)(cx_list *list, size_t index); + size_t (*find)(cx_list *list, void *elem); + void *(*last)(cx_list *list); } cx_list_class; @@ -68,4 +76,8 @@ void *cxListLast(CxList list); +#ifdef __cplusplus +} /* extern "C" */ +#endif + #endif /* UCX_LIST_H */