[PATCH 1/9] string-list: add string_list_{pop, last} functions

2018-09-17 Thread Stefan Beller
Add a few functions to allow a string-list to be used as a stack: - string_list_last() lets a caller peek the string_list_item at the end of the string list. The caller needs to be aware that it is borrowing a pointer, which can become invalid if/when the string_list is resized. -

Re: [PATCH 1/9] string-list: add string_list_{pop, last} functions

2018-09-12 Thread Junio C Hamano
Stefan Beller writes: > Add a few functions to allow a string-list to be used as a stack: > > - string_list_last() lets a caller peek the string_list_item at the >end of the string list. The caller needs to be aware that it is >borrowing a pointer, which can become invalid if/when the

Re: [PATCH 1/9] string-list: add string_list_{pop, last} functions

2018-09-11 Thread Ramsay Jones
On 12/09/18 00:49, Stefan Beller wrote: > Add a few functions to allow a string-list to be used as a stack: > > - string_list_last() lets a caller peek the string_list_item at the >end of the string list. The caller needs to be aware that it is >borrowing a pointer, which can become

[PATCH 1/9] string-list: add string_list_{pop, last} functions

2018-09-11 Thread Stefan Beller
Add a few functions to allow a string-list to be used as a stack: - string_list_last() lets a caller peek the string_list_item at the end of the string list. The caller needs to be aware that it is borrowing a pointer, which can become invalid if/when the string_list is resized. -