]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
lib/generic/queue: move KR_EXPORT to header
authorVladimír Čunát <vladimir.cunat@nic.cz>
Mon, 10 Aug 2020 14:51:27 +0000 (16:51 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Thu, 27 Aug 2020 08:07:31 +0000 (10:07 +0200)
It... feels better that way.

lib/generic/queue.c
lib/generic/queue.h

index afe8c6eb82cadb4e1802039fecc6faf2083de972..f46050ff5bb26c5041669ec8a929fbbe9dcef59e 100644 (file)
@@ -5,7 +5,7 @@
 #include "lib/generic/queue.h"
 #include <string.h>
 
-KR_EXPORT void queue_init_impl(struct queue *q, size_t item_size)
+void queue_init_impl(struct queue *q, size_t item_size)
 {
        q->len = 0;
        q->item_size = item_size;
@@ -19,7 +19,7 @@ KR_EXPORT void queue_init_impl(struct queue *q, size_t item_size)
        if (!q->chunk_cap) q->chunk_cap = 1; /* item_size big enough by itself */
 }
 
-KR_EXPORT void queue_deinit_impl(struct queue *q)
+void queue_deinit_impl(struct queue *q)
 {
        assert(q);
        struct queue_chunk *p = q->head;
@@ -46,7 +46,7 @@ static struct queue_chunk * queue_chunk_new(const struct queue *q)
 }
 
 /* Return pointer to the space for the new element. */
-KR_EXPORT void * queue_push_impl(struct queue *q)
+void * queue_push_impl(struct queue *q)
 {
        assert(q);
        struct queue_chunk *t = q->tail; // shorthand
@@ -75,7 +75,7 @@ KR_EXPORT void * queue_push_impl(struct queue *q)
 }
 
 /* Return pointer to the space for the new element. */
-KR_EXPORT void * queue_push_head_impl(struct queue *q)
+void * queue_push_head_impl(struct queue *q)
 {
        /* When we have choice, we optimize for further _push_head,
         * i.e. when shifting or allocating a chunk,
index e538b81afe79266f76ec279bf6e376ce47f641f8..75c2a8355b55d56c31d3953dfcc117ecb0312eb7 100644 (file)
 
 struct queue;
 /* Non-inline functions are exported to be usable from daemon. */
-void queue_init_impl(struct queue *q, size_t item_size);
-void queue_deinit_impl(struct queue *q);
-void * queue_push_impl(struct queue *q);
-void * queue_push_head_impl(struct queue *q);
+KR_EXPORT void queue_init_impl(struct queue *q, size_t item_size);
+KR_EXPORT void queue_deinit_impl(struct queue *q);
+KR_EXPORT void * queue_push_impl(struct queue *q);
+KR_EXPORT void * queue_push_head_impl(struct queue *q);
 
 struct queue_chunk;
 struct queue {