All of lore.kernel.org
 help / color / mirror / Atom feed
From: Derrick Stolee <derrickstolee@github.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>, git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>, Taylor Blau <me@ttaylorr.com>
Subject: Re: [PATCH v2 0/2] string-list.h: make "nr" and "alloc" a "size_t"
Date: Mon, 7 Mar 2022 10:55:02 -0500	[thread overview]
Message-ID: <0b0802fb-c977-d8ab-092a-b8a576daf3c6@github.com> (raw)
In-Reply-To: <cover-v2-0.2-00000000000-20220307T152316Z-avarab@gmail.com>

On 3/7/2022 10:27 AM, Ævar Arnfjörð Bjarmason wrote:
> Change the "struct string_list" to have a "size_t" for "nr" and
> "alloc", ensuring we won't overflow on platforms where size_t is 64
> bit, but "unsigned int" is 32 bit.
> 
> This replaces the v1 1/2 to get rid of the casts we use for Q_(), and
> the 2/2's addition of casts is then consistent with those.

This version looks a lot better, localizing the need for understanding
cast implications into the implementation of Q_() instead of every
caller.

Thanks,
-Stolee

      parent reply	other threads:[~2022-03-07 15:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-07 11:37 [PATCH 0/2] string-list.h: make "nr" and "alloc" a "size_t" Ævar Arnfjörð Bjarmason
2022-03-07 11:38 ` [PATCH 1/2] gettext API users: correct use of casts for Q_() Ævar Arnfjörð Bjarmason
2022-03-07 13:41   ` Derrick Stolee
2022-03-07 13:54     ` Ævar Arnfjörð Bjarmason
2022-03-07 15:53       ` Derrick Stolee
2022-03-07 11:38 ` [PATCH 2/2] string-list API: change "nr" and "alloc" to "size_t" Ævar Arnfjörð Bjarmason
2022-03-07 13:43   ` Derrick Stolee
2022-03-07 14:10     ` Ævar Arnfjörð Bjarmason
2022-03-07 15:27 ` [PATCH v2 0/2] string-list.h: make "nr" and "alloc" a "size_t" Ævar Arnfjörð Bjarmason
2022-03-07 15:27   ` [PATCH v2 1/2] gettext API users: don't explicitly cast ngettext()'s "n" Ævar Arnfjörð Bjarmason
2022-03-07 15:27   ` [PATCH v2 2/2] string-list API: change "nr" and "alloc" to "size_t" Ævar Arnfjörð Bjarmason
2022-03-07 16:23     ` Philip Oakley
2022-03-07 20:43       ` Junio C Hamano
2022-03-07 23:34         ` Philip Oakley
2022-03-07 15:55   ` Derrick Stolee [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=0b0802fb-c977-d8ab-092a-b8a576daf3c6@github.com \
    --to=derrickstolee@github.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=me@ttaylorr.com \
    /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.