From 7ddaea319550bd44bb295f935bef038a1ac37c3f Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Tue, 30 Jan 2024 11:30:12 +0100 Subject: Move LIMD_GLUE_API definitions to public headers --- src/collection.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/collection.c') diff --git a/src/collection.c b/src/collection.c index ef47217..0744427 100644 --- a/src/collection.c +++ b/src/collection.c @@ -37,7 +37,7 @@ #define CAPACITY_STEP 8 -LIBIMOBILEDEVICE_GLUE_API void collection_init(struct collection *col) +void collection_init(struct collection *col) { col->list = malloc(sizeof(void *) * CAPACITY_STEP); assert(col->list); @@ -45,14 +45,14 @@ LIBIMOBILEDEVICE_GLUE_API void collection_init(struct collection *col) col->capacity = CAPACITY_STEP; } -LIBIMOBILEDEVICE_GLUE_API void collection_free(struct collection *col) +void collection_free(struct collection *col) { free(col->list); col->list = NULL; col->capacity = 0; } -LIBIMOBILEDEVICE_GLUE_API void collection_add(struct collection *col, void *element) +void collection_add(struct collection *col, void *element) { int i; for(i=0; icapacity; i++) { @@ -69,7 +69,7 @@ LIBIMOBILEDEVICE_GLUE_API void collection_add(struct collection *col, void *elem col->capacity += CAPACITY_STEP; } -LIBIMOBILEDEVICE_GLUE_API int collection_remove(struct collection *col, void *element) +int collection_remove(struct collection *col, void *element) { int i; for(i=0; icapacity; i++) { @@ -82,7 +82,7 @@ LIBIMOBILEDEVICE_GLUE_API int collection_remove(struct collection *col, void *el return -1; } -LIBIMOBILEDEVICE_GLUE_API int collection_count(struct collection *col) +int collection_count(struct collection *col) { int i, cnt = 0; for(i=0; icapacity; i++) { @@ -92,7 +92,7 @@ LIBIMOBILEDEVICE_GLUE_API int collection_count(struct collection *col) return cnt; } -LIBIMOBILEDEVICE_GLUE_API void collection_copy(struct collection *dest, struct collection *src) +void collection_copy(struct collection *dest, struct collection *src) { if (!dest || !src) return; dest->capacity = src->capacity; -- cgit v1.1-32-gdbae