summaryrefslogtreecommitdiff
path: root/string-list.h
diff options
context:
space:
mode:
authorJohannes Sixt <j.sixt@viscovery.net>2011-08-12 05:20:00 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-08-14 21:19:35 (GMT)
commit86d4b528d8a4752cc689279fb6d38c8697a507bb (patch)
tree960aa6832d1f56ba8f2ae53aa145b55eb430c0a2 /string-list.h
parentaacb82de3ff8ae7b0a9e4cfec16c1807b6c315ef (diff)
downloadgit-86d4b528d8a4752cc689279fb6d38c8697a507bb.zip
git-86d4b528d8a4752cc689279fb6d38c8697a507bb.tar.gz
git-86d4b528d8a4752cc689279fb6d38c8697a507bb.tar.bz2
string-list: Add API to remove an item from an unsorted list
Teach the string-list API how to remove an entry in O(1) runtime by moving the last entry to the vacated spot. As such, the routine works only for unsorted lists. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'string-list.h')
-rw-r--r--string-list.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/string-list.h b/string-list.h
index bda6983..0684cb7 100644
--- a/string-list.h
+++ b/string-list.h
@@ -44,4 +44,5 @@ void sort_string_list(struct string_list *list);
int unsorted_string_list_has_string(struct string_list *list, const char *string);
struct string_list_item *unsorted_string_list_lookup(struct string_list *list,
const char *string);
+void unsorted_string_list_delete_item(struct string_list *list, int i, int free_util);
#endif /* STRING_LIST_H */