Update from 1.0.0-stable
[openssl.git] / crypto / pqueue / pqueue.c
index c20bc6fc965c51ac4af8a1f6efa3c1bec8d2704a..99a6fb874dc7c6443ff201ca248b33a2327f5601 100644 (file)
@@ -237,3 +237,17 @@ pqueue_next(pitem **item)
 
        return ret;
        }
+
+int
+pqueue_size(pqueue_s *pq)
+{
+       pitem *item = pq->items;
+       int count = 0;
+       
+       while(item != NULL)
+       {
+               count++;
+               item = item->next;
+       }
+       return count;
+}