git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] refs: mark the file-local vtable symbols as static
@ 2016-06-08 14:48 Ramsay Jones
  2016-06-08 18:55 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Ramsay Jones @ 2016-06-08 14:48 UTC (permalink / raw
  To: Michael Haggerty, Junio C Hamano; +Cc: GIT Mailing-list


Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---

Hi Michael, Junio,

I would normally ask you to squash this into the relevant patch when
you next re-roll your 'mh/ref-iterators' branch, but this has already
been merged into next. (I normally have a bit more time ... sorry!).

Perhaps, after the release, when the next branch is re-wound/re-built,
this could be squashed into your branch then.

Anyway, after applying this patch, the following symbols are still
'public but unused':

	> refs/files-backend.o	- files_reflog_iterator_begin
	> refs/iterator.o	- is_empty_ref_iterator
	> refs/iterator.o	- merge_ref_iterator_begin

These all look (potentially) useful for the implementation of
additional 'ref-iter' types and look to be part of the _internal_
iterator API - so they should not be marked static. Can you just
confirm my interpretation.

Thanks.

ATB,
Ramsay Jones

 refs/files-backend.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/refs/files-backend.c b/refs/files-backend.c
index a006a65..6213891 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -711,7 +711,7 @@ static int cache_ref_iterator_abort(struct ref_iterator *ref_iterator)
 	return ITER_DONE;
 }
 
-struct ref_iterator_vtable cache_ref_iterator_vtable = {
+static struct ref_iterator_vtable cache_ref_iterator_vtable = {
 	cache_ref_iterator_advance,
 	cache_ref_iterator_peel,
 	cache_ref_iterator_abort
@@ -1933,7 +1933,7 @@ static int files_ref_iterator_abort(struct ref_iterator *ref_iterator)
 	return ok;
 }
 
-struct ref_iterator_vtable files_ref_iterator_vtable = {
+static struct ref_iterator_vtable files_ref_iterator_vtable = {
 	files_ref_iterator_advance,
 	files_ref_iterator_peel,
 	files_ref_iterator_abort
@@ -3354,7 +3354,7 @@ static int files_reflog_iterator_abort(struct ref_iterator *ref_iterator)
 	return ok;
 }
 
-struct ref_iterator_vtable files_reflog_iterator_vtable = {
+static struct ref_iterator_vtable files_reflog_iterator_vtable = {
 	files_reflog_iterator_advance,
 	files_reflog_iterator_peel,
 	files_reflog_iterator_abort
-- 
2.8.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] refs: mark the file-local vtable symbols as static
  2016-06-08 14:48 [PATCH] refs: mark the file-local vtable symbols as static Ramsay Jones
@ 2016-06-08 18:55 ` Junio C Hamano
  2016-06-09 12:40   ` Michael Haggerty
  0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2016-06-08 18:55 UTC (permalink / raw
  To: Ramsay Jones; +Cc: Michael Haggerty, GIT Mailing-list

Ramsay Jones <ramsay@ramsayjones.plus.com> writes:

> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
> ---
>
> Hi Michael, Junio,
>
> I would normally ask you to squash this into the relevant patch when
> you next re-roll your 'mh/ref-iterators' branch, but this has already
> been merged into next. (I normally have a bit more time ... sorry!).
>
> Perhaps, after the release, when the next branch is re-wound/re-built,
> this could be squashed into your branch then.

Yup, sounds like a plan.

>
> Anyway, after applying this patch, the following symbols are still
> 'public but unused':
>
> 	> refs/files-backend.o	- files_reflog_iterator_begin
> 	> refs/iterator.o	- is_empty_ref_iterator
> 	> refs/iterator.o	- merge_ref_iterator_begin
>
> These all look (potentially) useful for the implementation of
> additional 'ref-iter' types and look to be part of the _internal_
> iterator API - so they should not be marked static. Can you just
> confirm my interpretation.

I am not Michael, but FWIW I think that is sensible.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] refs: mark the file-local vtable symbols as static
  2016-06-08 18:55 ` Junio C Hamano
@ 2016-06-09 12:40   ` Michael Haggerty
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Haggerty @ 2016-06-09 12:40 UTC (permalink / raw
  To: Junio C Hamano, Ramsay Jones; +Cc: GIT Mailing-list

On 06/08/2016 08:55 PM, Junio C Hamano wrote:
> Ramsay Jones <ramsay@ramsayjones.plus.com> writes:
> 
>> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
>> ---
>>
>> Hi Michael, Junio,
>>
>> I would normally ask you to squash this into the relevant patch when
>> you next re-roll your 'mh/ref-iterators' branch, but this has already
>> been merged into next. (I normally have a bit more time ... sorry!).
>>
>> Perhaps, after the release, when the next branch is re-wound/re-built,
>> this could be squashed into your branch then.
> 
> Yup, sounds like a plan.
> 
>>
>> Anyway, after applying this patch, the following symbols are still
>> 'public but unused':
>>
>> 	> refs/files-backend.o	- files_reflog_iterator_begin
>> 	> refs/iterator.o	- is_empty_ref_iterator
>> 	> refs/iterator.o	- merge_ref_iterator_begin
>>
>> These all look (potentially) useful for the implementation of
>> additional 'ref-iter' types and look to be part of the _internal_
>> iterator API - so they should not be marked static. Can you just
>> confirm my interpretation.
> 
> I am not Michael, but FWIW I think that is sensible.

I *am* Michael, and I think your changes look good. Thanks for your review.

I've incorporated your changes with some other changes in a re-roll [1]
in case Junio wants to use it in that form. Please note that two of the
hunks that you are suggesting apply to "refs: introduce an iterator
interface" and the third to "for_each_reflog(): reimplement using
iterators".

Michael

[1] http://article.gmane.org/gmane.comp.version-control.git/296883

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-09 12:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-08 14:48 [PATCH] refs: mark the file-local vtable symbols as static Ramsay Jones
2016-06-08 18:55 ` Junio C Hamano
2016-06-09 12:40   ` Michael Haggerty

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).