summaryrefslogtreecommitdiff
path: root/src/sortedcache.h
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-08-21 14:09:38 -0700
committerRussell Belfer <rb@github.com>2013-08-21 14:09:38 -0700
commita4977169e1e1920ed33f10a77e5dd8706f103f4f (patch)
treebbcaf6c42eac64a88461b5a7d6a3e30e4b796547 /src/sortedcache.h
parent0b7cdc02637bcc8491153a476460c9feab33f8ee (diff)
downloadlibgit2-a4977169e1e1920ed33f10a77e5dd8706f103f4f.tar.gz
Add sortedcache APIs to lookup index and remove
This adds two other APIs that I need to the sortedcache type.
Diffstat (limited to 'src/sortedcache.h')
-rw-r--r--src/sortedcache.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/sortedcache.h b/src/sortedcache.h
index 5d0d8f5a7..f63ad645b 100644
--- a/src/sortedcache.h
+++ b/src/sortedcache.h
@@ -98,4 +98,11 @@ size_t git_sortedcache_entrycount(const git_sortedcache *sc);
/* lookup item by index */
void *git_sortedcache_entry(const git_sortedcache *sc, size_t pos);
+/* lookup index of item by key */
+int git_sortedcache_lookup_index(
+ size_t *out, git_sortedcache *sc, const char *key);
+
+/* remove entry from cache */
+int git_sortedcache_remove(git_sortedcache *sc, size_t pos, bool lock);
+
#endif