Re: [PATCH for master] Rename path_list to string_list
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jul 22, 2008, 11:09 UTC
- Message-ID
- <alpine.DEB.1.00.0807221308050.3391@eeepc-johanness>
- In-Reply-To
- <7v3am2sldy.fsf@gitster.siamese.dyndns.org>
Hi,
On Mon, 21 Jul 2008, Junio C Hamano wrote:
Show 15 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes: > > > @@ -64,9 +65,10 @@ Functions > > > > `string_list_clear`:: > > > > - Free a string_list. The `path` pointer of the items will be freed in case > > - the `strdup_strings` member of the string_list is set. The second parameter > > - controls if the `util` pointer of the items should be freed or not. > > + Free a string_list. The `path` pointer of the items will be freed in > > + case the `strdup_strings` member of the string_list is set. The second > > + parameter controls if the `util` pointer of the items should be freed > > + or not. > > Missed 's/path/string/' here?
Good catch. I clearly forgot to grep for "path" in all the files that I touched. I did that now, but only looked at comments (in the hope that the compiler would have caught the other ones).
-- snipsnap -- [PATCH] Fix two leftovers from path_list->string_list
In the documentation, where you cannot get compile errors for using the wrong member name, there were two mentions of 'path' left.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> --- Documentation/technical/api-string-list.txt | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/technical/api-string-list.txt b/Documentation/technical/api-string-list.txt index 92b3ecd..293bb15 100644 --- a/Documentation/technical/api-string-list.txt +++ b/Documentation/technical/api-string-list.txt @@ -41,7 +41,7 @@ memset(&list, 0, sizeof(struct string_list)); string_list_append("foo", &list); string_list_append("bar", &list); for (i = 0; i < list.nr; i++) - printf("%s\n", list.items[i].path) + printf("%s\n", list.items[i].string) ---- NOTE: It is more efficient to build an unsorted list and sort it @@ -113,7 +113,7 @@ Data structures * `struct string_list_item` -Represents an item of the list. The `path` member is a pointer to the +Represents an item of the list. The `string` member is a pointer to the string, and you may use the `util` member for any purpose, if you want. * `struct string_list`
-- 1.5.6.2.516.g22071