[WIP/PATCH v5 05/10] for-each-ref: introduce 'ref_array_clear()'

2015-06-06 Thread Karthik Nayak
Introduce and implement 'ref_array_clear()' which will free all allocated memory for 'ref_array'. Mentored-by: Christian Couder Mentored-by: Matthieu Moy Signed-off-by: Karthik Nayak --- builtin/for-each-ref.c | 21 + 1 file changed, 21 insertions(+) diff --git a/builtin/f

Re: [WIP/PATCH v5 05/10] for-each-ref: introduce 'ref_array_clear()'

2015-06-08 Thread Matthieu Moy
Karthik Nayak writes: > +/* Free all memory allocated for ref_array */ > +void ref_array_clear(struct ref_array *array) Is this a private function? If so, then add static. If not, you probably want to export it in a .h file. -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe fr

Re: [WIP/PATCH v5 05/10] for-each-ref: introduce 'ref_array_clear()'

2015-06-08 Thread Karthik Nayak
On 06/08/2015 08:23 PM, Matthieu Moy wrote: Karthik Nayak writes: > +/* Free all memory allocated for ref_array */ > +void ref_array_clear(struct ref_array *array) Is this a private function? If so, then add static. If not, you probably want to export it in a .h file. It is in ref-filter.h.

Re: [WIP/PATCH v5 05/10] for-each-ref: introduce 'ref_array_clear()'

2015-06-08 Thread Karthik Nayak
On 06/08/2015 08:23 PM, Matthieu Moy wrote: Karthik Nayak writes: > +/* Free all memory allocated for ref_array */ > +void ref_array_clear(struct ref_array *array) Is this a private function? If so, then add static. If not, you probably want to export it in a .h file. It is in ref-filter.h.

Re: [WIP/PATCH v5 05/10] for-each-ref: introduce 'ref_array_clear()'

2015-06-08 Thread Matthieu Moy
Karthik Nayak writes: > On 06/08/2015 08:23 PM, Matthieu Moy wrote: >> Karthik Nayak writes: >> >> > +/* Free all memory allocated for ref_array */ >> > +void ref_array_clear(struct ref_array *array) >> >> Is this a private function? If so, then add static. If not, you probably >> want to export

Re: [WIP/PATCH v5 05/10] for-each-ref: introduce 'ref_array_clear()'

2015-06-08 Thread Junio C Hamano
Matthieu Moy writes: > Karthik Nayak writes: > >> On 06/08/2015 08:23 PM, Matthieu Moy wrote: >>> Karthik Nayak writes: >>> >>> > +/* Free all memory allocated for ref_array */ >>> > +void ref_array_clear(struct ref_array *array) >>> >>> Is this a private function? If so, then add static. If no

Re: [WIP/PATCH v5 05/10] for-each-ref: introduce 'ref_array_clear()'

2015-06-08 Thread Matthieu Moy
Junio C Hamano writes: > Matthieu Moy writes: > >> Karthik Nayak writes: >> >>> On 06/08/2015 08:23 PM, Matthieu Moy wrote: Karthik Nayak writes: > +/* Free all memory allocated for ref_array */ > +void ref_array_clear(struct ref_array *array) Is this a private fu

Re: [WIP/PATCH v5 05/10] for-each-ref: introduce 'ref_array_clear()'

2015-06-08 Thread Karthik Nayak
On 06/08/2015 10:51 PM, Matthieu Moy wrote: Junio C Hamano writes: Matthieu Moy writes: Karthik Nayak writes: On 06/08/2015 08:23 PM, Matthieu Moy wrote: Karthik Nayak writes: +/* Free all memory allocated for ref_array */ +void ref_array_clear(struct ref_array *array) Is this a pr

Re: [WIP/PATCH v5 05/10] for-each-ref: introduce 'ref_array_clear()'

2015-06-08 Thread Matthieu Moy
Karthik Nayak writes: > On 06/08/2015 10:51 PM, Matthieu Moy wrote: >> We could introduce ref-filter.h earlier, indeed. To me, the current >> solution is good enough, but introducing ref-filter.h early and adding >> function definition there in the same commit as you drop the "static" >> keyword