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

[PATCH] string-list: remove print_string_list from string-list's API

From
Alexander Kuleshov <kuleshovmail@gmail.com>
Date
Jan 15, 2015, 17:42 UTC
Message-ID
<1421343725-3973-1-git-send-email-kuleshovmail@gmail.com>
print_string_list routine has no callers anywhere.
Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
 Documentation/technical/api-string-list.txt |  6 ------
 string-list.c                               | 10 ----------
 string-list.h                               |  1 -
 3 files changed, 17 deletions(-)
diff --git a/Documentation/technical/api-string-list.txt b/Documentation/technical/api-string-list.txt
index c08402b..99e12e9 100644
--- a/Documentation/technical/api-string-list.txt
+++ b/Documentation/technical/api-string-list.txt
@@ -87,12 +87,6 @@ Functions
 	call free() on the util members of any items that have to be
 	deleted.  Preserve the order of the items that are retained.
 
-`print_string_list`::
-
-	Dump a string_list to stdout, useful mainly for debugging purposes. It
-	can take an optional header argument and it writes out the
-	string-pointer pairs of the string_list, each one in its own line.
-
 `string_list_clear`::
 
 	Free a string_list. The `string` pointer of the items will be freed in
diff --git a/string-list.c b/string-list.c
index 2a32a3f..ba832da 100644
--- a/string-list.c
+++ b/string-list.c
@@ -182,16 +182,6 @@ void string_list_clear_func(struct string_list *list, string_list_clear_func_t c
 	list->nr = list->alloc = 0;
 }
 
-
-void print_string_list(const struct string_list *p, const char *text)
-{
-	int i;
-	if ( text )
-		printf("%s\n", text);
-	for (i = 0; i < p->nr; i++)
-		printf("%s:%p\n", p->items[i].string, p->items[i].util);
-}
-
 struct string_list_item *string_list_append_nodup(struct string_list *list,
 						  char *string)
 {
diff --git a/string-list.h b/string-list.h
index d3809a1..c417bd5 100644
--- a/string-list.h
+++ b/string-list.h
@@ -20,7 +20,6 @@ struct string_list {
 
 void string_list_init(struct string_list *list, int strdup_strings);
 
-void print_string_list(const struct string_list *p, const char *text);
 void string_list_clear(struct string_list *list, int free_util);
 
 /* Use this function to call a custom clear function on each util pointer */
-- 
2.3.0.rc0.315.g0e14eda
Next: Alexander Kuleshov
Message 1 of 2 in “string-list: remove print_string_list from string-list's API”
  1. string-list: remove print_string_list from string-list's APIAlexander Kuleshov, Jan 15, 2015
  2. Alexander KuleshovJan 15, 2015

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.