summaryrefslogtreecommitdiff
path: root/src/pqueue.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2016-09-23 12:42:33 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2016-10-06 11:04:55 +0200
commit0bd43371c27b5fee23768c1b369bf2c62601578f (patch)
treeb9b04e70097439d19482f236018c35ea4e11dd05 /src/pqueue.h
parent6708618c10f509ed1d22298628bf578a514d2624 (diff)
downloadlibgit2-0bd43371c27b5fee23768c1b369bf2c62601578f.tar.gz
vector, pqueue: add git_vector_reverse and git_pqueue_reverse
This is a convenience function to reverse the contents of a vector and a pqueue in-place. The pqueue function is useful in the case where we're treating it as a LIFO queue.
Diffstat (limited to 'src/pqueue.h')
-rw-r--r--src/pqueue.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pqueue.h b/src/pqueue.h
index da7b74edf..76b14919e 100644
--- a/src/pqueue.h
+++ b/src/pqueue.h
@@ -35,6 +35,7 @@ extern int git_pqueue_init(
#define git_pqueue_clear git_vector_clear
#define git_pqueue_size git_vector_length
#define git_pqueue_get git_vector_get
+#define git_pqueue_reverse git_vector_reverse
/**
* Insert a new item into the queue