From: Junio C Hamano <gitster@pobox.com>
To: "Mohit Marathe via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Mohit Marathe <mohitmarathe@proton.me>
Subject: Re: [PATCH 0/2] utf8: change return type of some helpers from int to size_t
Date: Sun, 17 Mar 2024 09:51:50 -0700 [thread overview]
Message-ID: <xmqq7ci0n6mx.fsf@gitster.g> (raw)
In-Reply-To: <pull.1690.git.1710664071.gitgitgadget@gmail.com> (Mohit Marathe via GitGitGadget's message of "Sun, 17 Mar 2024 08:27:49 +0000")
"Mohit Marathe via GitGitGadget" <gitgitgadget@gmail.com> writes:
> There are lot of places in the codebase where int is used to store size of
> an object instead of size_t (which is better alternative due to reasons like
> portability, readability, etc). This patch series accomplishes one such
> #TODO comment, which addresses this issue.
Nice. In principle this is the right thing to do.
To reviewers, if I were reviewing this series (which I will not in
the next 24 hours), I'd pay particular attention to the callers that
currently accept "int" and use negative return value as an sign of a
failure. Moving to "size_t" from "int" will break such callers.
Thanks.
next prev parent reply other threads:[~2024-03-17 16:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-17 8:27 [PATCH 0/2] utf8: change return type of some helpers from int to size_t Mohit Marathe via GitGitGadget
2024-03-17 8:27 ` [PATCH 1/2] utf8: change type " Mohit Marathe via GitGitGadget
2024-03-21 10:30 ` Patrick Steinhardt
2024-03-17 8:27 ` [PATCH 2/2] utf8: make utf8_strnwidth & utf8_strwidth return size_t instead of int Mohit Marathe via GitGitGadget
2024-03-17 16:51 ` Junio C Hamano [this message]
2024-03-21 10:30 ` [PATCH 0/2] utf8: change return type of some helpers from int to size_t Patrick Steinhardt
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=xmqq7ci0n6mx.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=mohitmarathe@proton.me \
/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;
as well as URLs for NNTP newsgroup(s).