mbox series

[0/2] string-list.h: make "nr" and "alloc" a "size_t"

Message ID cover-0.2-00000000000-20220307T113707Z-avarab@gmail.com (mailing list archive)
Headers show
Series string-list.h: make "nr" and "alloc" a "size_t" | expand

Message

Ævar Arnfjörð Bjarmason March 7, 2022, 11:37 a.m. UTC
$subject most recently came up in
https://lore.kernel.org/git/220305.86pmn030ou.gmgdl@evledraar.gmail.com/. I.e. we
have code in-tree already that's possibly (although in that case
unlikely to in practice) keeping track of size_t-indexed with a
string_list's "unsigned int"-indexed data.

Now there are no textual or semantic conflicts between this change and
"seen", so having series (which is of course based on "master") now
would be a good thing, and help to future-proof the API.

The 1/2 here isn't strictly neccesary as part of this series, but
since a large part 2/2 is adjusting the same sort of Q_() patterns I
thought it made sense to both show existing PRIuMAX use in those
macros, and how we do those casts.

Ævar Arnfjörð Bjarmason (2):
  gettext API users: correct use of casts for Q_()
  string-list API: change "nr" and "alloc" to "size_t"

 add-interactive.c           | 15 +++++++++------
 add-patch.c                 |  8 ++++----
 builtin/index-pack.c        |  2 +-
 builtin/receive-pack.c      |  9 +++++----
 builtin/shortlog.c          | 10 +++++-----
 bundle.c                    | 12 ++++++------
 commit-graph.c              |  8 ++++----
 mailmap.c                   |  7 ++++---
 merge-ort.c                 |  4 ++--
 string-list.h               |  3 ++-
 t/helper/test-run-command.c |  7 ++++---
 wt-status.c                 | 16 ++++++++--------
 12 files changed, 54 insertions(+), 47 deletions(-)