diff options
| author | Russell Belfer <rb@github.com> | 2013-08-21 14:09:38 -0700 |
|---|---|---|
| committer | Russell Belfer <rb@github.com> | 2013-08-21 14:09:38 -0700 |
| commit | a4977169e1e1920ed33f10a77e5dd8706f103f4f (patch) | |
| tree | bbcaf6c42eac64a88461b5a7d6a3e30e4b796547 /src/sortedcache.h | |
| parent | 0b7cdc02637bcc8491153a476460c9feab33f8ee (diff) | |
| download | libgit2-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.h | 7 |
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 |
