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

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

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

From: Matthieu Moy <hidden>
Date: 2016-06-15 23:05:12

Junio C Hamano [off-list ref] writes:
Matthieu Moy [off-list ref] writes:
quoted
Karthik Nayak [off-list ref] writes:
quoted
On 06/08/2015 08:23 PM, Matthieu Moy wrote:
quoted
Karthik Nayak [off-list ref] writes:
quoted
+/* 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.
Ah, OK. It comes later in the series.
Confused I am; if it comes later not in the same patch then it is
not OK, is it?
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 for them would clearly be an improvement.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

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

From: Karthik Nayak <hidden>
Date: 2016-06-15 23:05:13

On 06/08/2015 10:51 PM, Matthieu Moy wrote:
Junio C Hamano [off-list ref] writes:
quoted
Matthieu Moy [off-list ref] writes:
quoted
Karthik Nayak [off-list ref] writes:
quoted
On 06/08/2015 08:23 PM, Matthieu Moy wrote:
quoted
Karthik Nayak [off-list ref] writes:
quoted
+/* 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.
Ah, OK. It comes later in the series.
Confused I am; if it comes later not in the same patch then it is
not OK, is it?
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 for them would clearly be an improvement.
But that would break the flow, wouldn't it? I wanted ref-filter to be 
introduced together, hence right after ref-filter.h we move code to
ref-filter.c

-- 
Regards,
Karthik
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help