diff options
author | Lennart Poettering <lennart@poettering.net> | 2005-01-21 00:16:08 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2005-01-21 00:16:08 +0000 |
commit | 0781d5363fb6fd723a2316fc7558aef6439b2f71 (patch) | |
tree | f6a942889c55230611d4472c21a7075a7c2fc609 /prioq.c | |
parent | d6e2dbabccb08970da991e6d2b0fda7a56d83e6f (diff) |
massive work
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@8 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'prioq.c')
-rw-r--r-- | prioq.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,6 +1,6 @@ #include "prioq.h" -flxPrioQueue* flx_prio_queue_new(gint (*compare) (gpointer a, gpointer b)) { +flxPrioQueue* flx_prio_queue_new(gint (*compare) (gconstpointer a, gconstpointer b)) { flxPrioQueue *q; g_assert(compare); @@ -216,7 +216,7 @@ static void exchange_nodes(flxPrioQueue *q, flxPrioQueueNode *a, flxPrioQueueNod } /* Move a node to the correct position */ -static void shuffle_node(flxPrioQueue *q, flxPrioQueueNode *n) { +void flx_prio_queue_shuffle(flxPrioQueue *q, flxPrioQueueNode *n) { g_assert(q); g_assert(n); @@ -290,7 +290,7 @@ flxPrioQueueNode* flx_prio_queue_put(flxPrioQueue *q, gpointer data) { q->last = n; q->n_nodes++; - shuffle_node(q, n); + flx_prio_queue_shuffle(q, n); return n; } @@ -303,7 +303,7 @@ void flx_prio_queue_remove(flxPrioQueue *q, flxPrioQueueNode *n) { flxPrioQueueNode *replacement = q->last; exchange_nodes(q, replacement, n); flx_prio_queue_remove(q, q->last); - shuffle_node(q, replacement); + flx_prio_queue_shuffle(q, replacement); return; } |