From: Junio C Hamano <gitster@pobox.com>
To: Thiago Farina <tfransosi@gmail.com>
Cc: Nicolas Pitre <nico@fluxnic.net>,
Junio C Hamano <gitster@pobox.com>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
git@vger.kernel.org
Subject: Re: [PATCH] string-list: remove print_string_list, since it is not used anymore.
Date: Mon, 11 Jan 2010 14:51:50 -0800 [thread overview]
Message-ID: <7veilwb6gp.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <a4c8a6d01001111434j18b77b88j525b9acb47c7e100@mail.gmail.com> (Thiago Farina's message of "Mon\, 11 Jan 2010 20\:34\:02 -0200")
Thiago Farina <tfransosi@gmail.com> writes:
> I can add the comment if Junio is ok with it. Something like this:
> "This functions is for debugging purpose only. Please, do NOT remove
> it."
Something like this should suffice, as I think "Please blah" is just
superfluous.
I don't know if I like "#ifdef DEBUG" better, though. It will still let
you say "call print_string_list(...)" in your debugger session, and people
wouldn't muck with it even if there is no caller.
diff --git a/string-list.c b/string-list.c
index 1ac536e..793e619 100644
--- a/string-list.c
+++ b/string-list.c
@@ -139,6 +139,7 @@ void string_list_clear_func(struct string_list *list, string_list_clear_func_t c
}
+#ifndef NDEBUG
void print_string_list(const char *text, const struct string_list *p)
{
int i;
@@ -147,6 +148,7 @@ void print_string_list(const char *text, const struct string_list *p)
for (i = 0; i < p->nr; i++)
printf("%s:%p\n", p->items[i].string, p->items[i].util);
}
+#endif
struct string_list_item *string_list_append(const char *string, struct string_list *list)
{
diff --git a/string-list.h b/string-list.h
index 6569cf6..8598257 100644
--- a/string-list.h
+++ b/string-list.h
@@ -12,7 +12,6 @@ struct string_list
unsigned int strdup_strings:1;
};
-void print_string_list(const char *text, const struct string_list *p);
void string_list_clear(struct string_list *list, int free_util);
/* Use this function to call a custom clear function on each util pointer */
prev parent reply other threads:[~2010-01-11 22:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-11 21:29 [PATCH] string-list: remove print_string_list, since it is not used anymore Thiago Farina
2010-01-11 21:52 ` Johannes Schindelin
2010-01-11 22:14 ` Junio C Hamano
2010-01-11 22:23 ` Nicolas Pitre
2010-01-11 22:34 ` Thiago Farina
2010-01-11 22:51 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7veilwb6gp.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=nico@fluxnic.net \
--cc=tfransosi@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox