git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Mar 7, 2022, 11:37 UTC
Message-ID
<cover-0.2-00000000000-20220307T113707Z-avarab@gmail.com>

$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(-)
-- 
2.35.1.1241.gd8d69a17521
Next: Ævar Arnfjörð Bjarmason
Message 1 of 15 in “string-list.h: make "nr" and "alloc" a "size_t"”
  1. 0/2 string-list.h: make "nr" and "alloc" a "size_t"Ævar Arnfjörð Bjarmason, Mar 7, 2022
  2. 1/2 gettext API users: correct use of casts for Q_()Ævar Arnfjörð Bjarmason, Mar 7, 2022
  3. Derrick StoleeMar 7, 2022
  4. Ævar Arnfjörð BjarmasonMar 7, 2022
  5. Derrick StoleeMar 7, 2022
  6. 2/2 string-list API: change "nr" and "alloc" to "size_t"Ævar Arnfjörð Bjarmason, Mar 7, 2022
  7. Derrick StoleeMar 7, 2022
  8. Ævar Arnfjörð BjarmasonMar 7, 2022
  9. 0/2 string-list.h: make "nr" and "alloc" a "size_t"Ævar Arnfjörð Bjarmason, Mar 7, 2022
  10. 1/2 gettext API users: don't explicitly cast ngettext()'s "n"Ævar Arnfjörð Bjarmason, Mar 7, 2022
  11. 2/2 string-list API: change "nr" and "alloc" to "size_t"Ævar Arnfjörð Bjarmason, Mar 7, 2022
  12. Philip OakleyMar 7, 2022
  13. Junio C HamanoMar 7, 2022
  14. Philip OakleyMar 7, 2022
  15. Derrick StoleeMar 7, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.