ap_skiplist *sl;
};
-void *ap_skiplist_alloc(ap_skiplist *sl, size_t size);
+AP_DECLARE(void *) ap_skiplist_alloc(ap_skiplist *sl, size_t size);
-void ap_skiplist_free(ap_skiplist *sl, void *mem);
+AP_DECLARE(void) ap_skiplist_free(ap_skiplist *sl, void *mem);
-apr_status_t ap_skiplist_init(ap_skiplist **sl, apr_pool_t *p);
+AP_DECLARE(apr_status_t) ap_skiplist_init(ap_skiplist **sl, apr_pool_t *p);
-void ap_skiplist_set_compare(ap_skiplist *sl, ap_skiplist_compare,
+AP_DECLARE(void) ap_skiplist_set_compare(ap_skiplist *sl, ap_skiplist_compare,
ap_skiplist_compare);
-void ap_skiplist_add_index(ap_skiplist *sl, ap_skiplist_compare,
+AP_DECLARE(void) ap_skiplist_add_index(ap_skiplist *sl, ap_skiplist_compare,
ap_skiplist_compare);
-ap_skiplistnode *ap_skiplist_getlist(ap_skiplist *sl);
+AP_DECLARE(ap_skiplistnode *) ap_skiplist_getlist(ap_skiplist *sl);
-void *ap_skiplist_find_compare(ap_skiplist *sl,
+AP_DECLARE(void *) ap_skiplist_find_compare(ap_skiplist *sl,
void *data,
ap_skiplistnode **iter,
ap_skiplist_compare func);
-void *ap_skiplist_find(ap_skiplist *sl, void *data, ap_skiplistnode **iter);
+AP_DECLARE(void *) ap_skiplist_find(ap_skiplist *sl, void *data, ap_skiplistnode **iter);
-void *ap_skiplist_next(ap_skiplist *sl, ap_skiplistnode **iter);
+AP_DECLARE(void *) ap_skiplist_next(ap_skiplist *sl, ap_skiplistnode **iter);
-void *ap_skiplist_previous(ap_skiplist *sl, ap_skiplistnode **iter);
+AP_DECLARE(void *) ap_skiplist_previous(ap_skiplist *sl, ap_skiplistnode **iter);
-ap_skiplistnode *ap_skiplist_insert_compare(ap_skiplist *sl,
+AP_DECLARE(ap_skiplistnode *) ap_skiplist_insert_compare(ap_skiplist *sl,
void *data, ap_skiplist_compare comp);
-ap_skiplistnode *ap_skiplist_insert(ap_skiplist* sl, void *data);
+AP_DECLARE(ap_skiplistnode *) ap_skiplist_insert(ap_skiplist* sl, void *data);
-int ap_skiplist_remove_compare(ap_skiplist *sl, void *data,
+AP_DECLARE(int) ap_skiplist_remove_compare(ap_skiplist *sl, void *data,
ap_skiplist_freefunc myfree, ap_skiplist_compare comp);
-int ap_skiplist_remove(ap_skiplist *sl, void *data, ap_skiplist_freefunc myfree);
+AP_DECLARE(int) ap_skiplist_remove(ap_skiplist *sl, void *data, ap_skiplist_freefunc myfree);
-void ap_skiplist_remove_all(ap_skiplist *sl, ap_skiplist_freefunc myfree);
+AP_DECLARE(void) ap_skiplist_remove_all(ap_skiplist *sl, ap_skiplist_freefunc myfree);
-void ap_skiplist_destroy(ap_skiplist *sl, ap_skiplist_freefunc myfree);
+AP_DECLARE(void) ap_skiplist_destroy(ap_skiplist *sl, ap_skiplist_freefunc myfree);
-void *ap_skiplist_pop(ap_skiplist *a, ap_skiplist_freefunc myfree);
+AP_DECLARE(void *) ap_skiplist_pop(ap_skiplist *a, ap_skiplist_freefunc myfree);
-void *ap_skiplist_peek(ap_skiplist *a);
+AP_DECLARE(void *) ap_skiplist_peek(ap_skiplist *a);
-ap_skiplist *ap_skiplist_merge(ap_skiplist *sl1, ap_skiplist *sl2);
+AP_DECLARE(ap_skiplist *) ap_skiplist_merge(ap_skiplist *sl1, ap_skiplist *sl2);
#endif
return ((randseq & (1 << (ph - 1))) >> (ph - 1));
}
-void *ap_skiplist_alloc(ap_skiplist *sl, size_t size)
+AP_DECLARE(void *) ap_skiplist_alloc(ap_skiplist *sl, size_t size)
{
if (sl->pool) {
return apr_pcalloc(sl->pool, size);
}
}
-void ap_skiplist_free(ap_skiplist *sl, void *mem)
+AP_DECLARE(void) ap_skiplist_free(ap_skiplist *sl, void *mem)
{
if (!sl->pool) {
free(mem);
return ((ac < bc) ? -1 : ((ac > bc) ? 1 : 0));
}
-apr_status_t ap_skiplist_init(ap_skiplist **s, apr_pool_t *p)
+AP_DECLARE(apr_status_t) ap_skiplist_init(ap_skiplist **s, apr_pool_t *p)
{
ap_skiplist *sl;
skiplisti_init(s, p);
return APR_SUCCESS;
}
-void ap_skiplist_set_compare(ap_skiplist *sl,
+AP_DECLARE(void) ap_skiplist_set_compare(ap_skiplist *sl,
ap_skiplist_compare comp,
ap_skiplist_compare compk)
{
}
}
-void ap_skiplist_add_index(ap_skiplist *sl,
+AP_DECLARE(void) ap_skiplist_add_index(ap_skiplist *sl,
ap_skiplist_compare comp,
ap_skiplist_compare compk)
{
}
}
-ap_skiplistnode *ap_skiplist_getlist(ap_skiplist *sl)
+AP_DECLARE(ap_skiplistnode *) ap_skiplist_getlist(ap_skiplist *sl)
{
if (!sl->bottom) {
return NULL;
return sl->bottom->next;
}
-void *ap_skiplist_find(ap_skiplist *sl, void *data, ap_skiplistnode **iter)
+AP_DECLARE(void *) ap_skiplist_find(ap_skiplist *sl, void *data, ap_skiplistnode **iter)
{
void *ret;
ap_skiplistnode *aiter;
return count;
}
-void *ap_skiplist_find_compare(ap_skiplist *sli, void *data,
+AP_DECLARE(void *) ap_skiplist_find_compare(ap_skiplist *sli, void *data,
ap_skiplistnode **iter,
ap_skiplist_compare comp)
{
}
-void *ap_skiplist_next(ap_skiplist *sl, ap_skiplistnode **iter)
+AP_DECLARE(void *) ap_skiplist_next(ap_skiplist *sl, ap_skiplistnode **iter)
{
if (!*iter) {
return NULL;
return (*iter) ? ((*iter)->data) : NULL;
}
-void *ap_skiplist_previous(ap_skiplist *sl, ap_skiplistnode **iter)
+AP_DECLARE(void *) ap_skiplist_previous(ap_skiplist *sl, ap_skiplistnode **iter)
{
if (!*iter) {
return NULL;
return (*iter) ? ((*iter)->data) : NULL;
}
-ap_skiplistnode *ap_skiplist_insert(ap_skiplist *sl, void *data)
+AP_DECLARE(ap_skiplistnode *) ap_skiplist_insert(ap_skiplist *sl, void *data)
{
if (!sl->compare) {
return 0;
return ap_skiplist_insert_compare(sl, data, sl->compare);
}
-ap_skiplistnode *ap_skiplist_insert_compare(ap_skiplist *sl, void *data,
+AP_DECLARE(ap_skiplistnode *) ap_skiplist_insert_compare(ap_skiplist *sl, void *data,
ap_skiplist_compare comp)
{
ap_skiplistnode *m, *p, *tmp, *ret = NULL, **stack;
return ret;
}
-int ap_skiplist_remove(ap_skiplist *sl, void *data, ap_skiplist_freefunc myfree)
+AP_DECLARE(int) ap_skiplist_remove(ap_skiplist *sl, void *data, ap_skiplist_freefunc myfree)
{
if (!sl->compare) {
return 0;
return sl->height; /* return 1; ?? */
}
-int ap_skiplist_remove_compare(ap_skiplist *sli,
+AP_DECLARE(int) ap_skiplist_remove_compare(ap_skiplist *sli,
void *data,
ap_skiplist_freefunc myfree, ap_skiplist_compare comp)
{
return skiplisti_remove(sl, m, myfree);
}
-void ap_skiplist_remove_all(ap_skiplist *sl, ap_skiplist_freefunc myfree)
+AP_DECLARE(void) ap_skiplist_remove_all(ap_skiplist *sl, ap_skiplist_freefunc myfree)
{
/*
* This must remove even the place holder nodes (bottom though top)
sl->size = 0;
}
-void *ap_skiplist_pop(ap_skiplist *a, ap_skiplist_freefunc myfree)
+AP_DECLARE(void *) ap_skiplist_pop(ap_skiplist *a, ap_skiplist_freefunc myfree)
{
ap_skiplistnode *sln;
void *data = NULL;
return data;
}
-void *ap_skiplist_peek(ap_skiplist *a)
+AP_DECLARE(void *) ap_skiplist_peek(ap_skiplist *a)
{
ap_skiplistnode *sln;
sln = ap_skiplist_getlist(a);
ap_skiplist_free((ap_skiplist *) vsl, vsl);
}
-void ap_skiplist_destroy(ap_skiplist *sl, ap_skiplist_freefunc myfree)
+AP_DECLARE(void) ap_skiplist_destroy(ap_skiplist *sl, ap_skiplist_freefunc myfree)
{
while (ap_skiplist_pop(sl->index, skiplisti_destroy) != NULL)
;
ap_skiplist_remove_all(sl, myfree);
}
-ap_skiplist *ap_skiplist_merge(ap_skiplist *sl1, ap_skiplist *sl2)
+AP_DECLARE(ap_skiplist *) ap_skiplist_merge(ap_skiplist *sl1, ap_skiplist *sl2)
{
/* Check integrity! */
ap_skiplist temp;