From: Junio C Hamano <gitster@pobox.com>
To: "René Scharfe" <l.s.r@web.de>
Cc: git@vger.kernel.org, Jeff King <peff@peff.net>
Subject: Re: [PATCH v2 0/2] use __builtin_add_overflow() in st_add() with Clang
Date: Tue, 19 May 2026 09:57:17 +0900 [thread overview]
Message-ID: <xmqq4ik4b4ia.fsf@gitster.g> (raw)
In-Reply-To: <20260518202502.25682-1-l.s.r@web.de> ("René Scharfe"'s message of "Mon, 18 May 2026 22:25:00 +0200")
René Scharfe <l.s.r@web.de> writes:
> Changes since v2:
> - Pass variable instead of st_add3() expression to ALLOC_GROW.
> - Add the helper st_add_overflow() that mimics __builtin_add_overflow()
> for size_t to avoid duplicating most of the definition of st_add().
>
> strbuf: use st_add3() in strbuf_grow()
> use __builtin_add_overflow() in st_add() with Clang
Nice simplification without becoming overly ambitious. Very well
done.
Let me mark it for 'next'.
Thanks.
prev parent reply other threads:[~2026-05-19 0:57 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-14 15:11 [PATCH 1/2] strbuf: use st_add3() in strbuf_grow() René Scharfe
2026-05-14 15:13 ` [PATCH 2/2] use __builtin_add_overflow() in st_add() with Clang René Scharfe
2026-05-14 19:12 ` Junio C Hamano
2026-05-14 20:17 ` René Scharfe
2026-05-15 16:49 ` René Scharfe
2026-05-15 4:40 ` Jeff King
2026-05-15 14:36 ` René Scharfe
2026-05-15 16:53 ` Jeff King
2026-05-14 19:07 ` [PATCH 1/2] strbuf: use st_add3() in strbuf_grow() Junio C Hamano
2026-05-14 20:13 ` René Scharfe
2026-05-15 4:36 ` Jeff King
2026-05-15 14:30 ` René Scharfe
2026-05-15 16:50 ` Jeff King
2026-05-18 20:25 ` [PATCH v2 0/2] use __builtin_add_overflow() in st_add() with Clang René Scharfe
2026-05-18 20:25 ` [PATCH v2 1/2] strbuf: use st_add3() in strbuf_grow() René Scharfe
2026-05-18 20:25 ` [PATCH v2 2/2] use __builtin_add_overflow() in st_add() with Clang René Scharfe
2026-05-19 0:44 ` [PATCH v2 0/2] " Jeff King
2026-05-19 0:57 ` Junio C Hamano [this message]
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=xmqq4ik4b4ia.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=l.s.r@web.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox