From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/3] revision: clear decoration structs during release_revisions()
Date: Fri, 06 Oct 2023 09:42:29 -0700 [thread overview]
Message-ID: <xmqqa5svbt3e.fsf@gitster.g> (raw)
In-Reply-To: <20231006005132.GA992085@coredump.intra.peff.net> (Jeff King's message of "Thu, 5 Oct 2023 20:51:32 -0400")
Jeff King <peff@peff.net> writes:
> On Thu, Oct 05, 2023 at 04:00:54PM -0700, Junio C Hamano wrote:
>
>> Wow, nested maze of callbacks make my head spin ;-) but they all
>> look reasonable. Thanks.
>
> Yeah, I don't love those one-liner callbacks just to handle the cast.
>
> The other alternative is to write some kind of for_each_decoration()
> macro, but I think it ends up in the usual macro hell (requiring the
> caller to provide iterator variables, hanging half-open braces, and so
> on). It might be worth it if iterating could be used in other places,
> but I don't think it is.
>
> So I tried to choose the lesser of two evils. :)
Oh, I am happy with the result.
next prev parent reply other threads:[~2023-10-06 16:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-05 21:28 [PATCH 0/3] a few more leak fixes Jeff King
2023-10-05 21:29 ` [PATCH 1/3] decorate: add clear_decoration() function Jeff King
2023-10-05 21:30 ` [PATCH 2/3] revision: clear decoration structs during release_revisions() Jeff King
2023-10-05 23:00 ` Junio C Hamano
2023-10-06 0:51 ` Jeff King
2023-10-06 16:42 ` Junio C Hamano [this message]
2023-10-05 21:33 ` [PATCH 3/3] daemon: free listen_addr before returning Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqa5svbt3e.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.