git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/3] string_list: document string_list_(insert,lookup)

From
Stefan Beller <sbeller@google.com>
Date
Nov 24, 2014, 21:22 UTC
Message-ID
<1416864124-15231-1-git-send-email-sbeller@google.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
---
 string-list.h | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff --git a/string-list.h b/string-list.h
index 494eb5d..40ffe0c 100644
--- a/string-list.h
+++ b/string-list.h
@@ -55,9 +55,19 @@ void string_list_remove_empty_items(struct string_list *list, int free_util);
 int string_list_has_string(const struct string_list *list, const char *string);
 int string_list_find_insert_index(const struct string_list *list, const char *string,
 				  int negative_existing_index);
+/*
+ * Inserts the given string into the sorted list.
+ * If the string already exists, the list is not altered.
+ * Returns the string_list_item, the string is part of.
+ */
 struct string_list_item *string_list_insert(struct string_list *list, const char *string);
 struct string_list_item *string_list_insert_at_index(struct string_list *list,
 						     int insert_at, const char *string);
+
+/*
+ * Checks if the given string is part of a sorted list. If it is part of the list,
+ * return the coresponding string_list_item, NULL otherwise.
+ */
 struct string_list_item *string_list_lookup(struct string_list *list, const char *string);
 
 /*
-- 
2.2.0.rc3
Next: Stefan Beller
Message 1 of 5 in “string_list: document string_list_(insert,lookup)”
  1. 1/3 string_list: document string_list_(insert,lookup)Stefan Beller, Nov 24, 2014
  2. 2/3 mailmap: use higher level string list functionsStefan Beller, Nov 24, 2014
  3. 3/3 string_list: Remove string_list_insert_at_index from its APIStefan Beller, Nov 24, 2014
  4. Junio C HamanoNov 25, 2014
  5. Stefan BellerNov 25, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.