diff options
Diffstat (limited to 'include/openssl/pqueue.h')
-rw-r--r-- | include/openssl/pqueue.h | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/include/openssl/pqueue.h b/include/openssl/pqueue.h index 8ad023a..ceb1fa2 100644 --- a/include/openssl/pqueue.h +++ b/include/openssl/pqueue.h @@ -84,11 +84,11 @@ typedef struct _pitem *piterator; /* pqueue_new allocates a fresh, empty priority queue object and returns it, or * NULL on error. */ -pqueue pqueue_new(); +OPENSSL_EXPORT pqueue pqueue_new(void); /* pqueue_free frees |pq| but not any of the items it points to. Thus |pq| must * be empty or a memory leak will occur. */ -void pqueue_free(pqueue pq); +OPENSSL_EXPORT void pqueue_free(pqueue pq); /* Creating and freeing items. */ @@ -97,47 +97,46 @@ void pqueue_free(pqueue pq); * has a priority given by |prio64be|, which is a 64-bit, unsigned number * expressed in big-endian form. It returns the fresh item, or NULL on * error. */ -pitem *pitem_new(uint8_t prio64be[8], void *data); +OPENSSL_EXPORT pitem *pitem_new(uint8_t prio64be[8], void *data); /* pitem_free frees |item|, but not any data that it points to. */ -void pitem_free(pitem *item); +OPENSSL_EXPORT void pitem_free(pitem *item); /* Queue accessor functions */ /* pqueue_peek returns the item with the smallest priority from |pq|, or NULL * if empty. */ -pitem *pqueue_peek(pqueue pq); +OPENSSL_EXPORT pitem *pqueue_peek(pqueue pq); /* pqueue_find returns the item whose priority matches |prio64be| or NULL if no * such item exists. */ -pitem *pqueue_find(pqueue pq, unsigned char *prio64be); +OPENSSL_EXPORT pitem *pqueue_find(pqueue pq, uint8_t *prio64be); /* Queue mutation functions */ /* pqueue_insert inserts |item| into |pq| and returns item. */ -pitem *pqueue_insert(pqueue pq, pitem *item); +OPENSSL_EXPORT pitem *pqueue_insert(pqueue pq, pitem *item); /* pqueue_pop takes the item with the least priority from |pq| and returns it, * or NULL if |pq| is empty. */ -pitem *pqueue_pop(pqueue pq); +OPENSSL_EXPORT pitem *pqueue_pop(pqueue pq); /* pqueue_size returns the number of items in |pq|. */ -size_t pqueue_size(pqueue pq); +OPENSSL_EXPORT size_t pqueue_size(pqueue pq); /* Iterating */ /* pqueue_iterator returns an iterator that can be used to iterate over the * contents of the queue. */ -pitem *pqueue_iterator(pqueue pq); +OPENSSL_EXPORT piterator pqueue_iterator(pqueue pq); /* pqueue_next returns the current value of |iter| and advances it to the next * position. If the iterator has advanced over all the elements, it returns * NULL. */ -pitem *pqueue_next(piterator *iter); - +OPENSSL_EXPORT pitem *pqueue_next(piterator *iter); #if defined(__cplusplus) |