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

Re: [PATCH v2 1/1] Upcast size_t variables to uintmax_t when printing

From
Jeff King <peff@peff.net>
Date
Nov 11, 2018, 07:28 UTC
Message-ID
<20181111072835.GL30850@sigill.intra.peff.net>
In-Reply-To
<20181111070504.12858-1-tboegi@web.de>
On Sun, Nov 11, 2018 at 08:05:04AM +0100, tboegi@web.de wrote:
Show 11 quoted lines
> From: Torsten Bögershausen <tboegi@web.de>
> 
> When printing variables which contain a size, today "unsigned long"
> is used at many places.
> In order to be able to change the type from "unsigned long" into size_t
> some day in the future, we need to have a way to print 64 bit variables
> on a system that has "unsigned long" defined to be 32 bit, like Win64.
> 
> Upcast all those variables into uintmax_t before they are printed.
> This is to prepare for a bigger change, when "unsigned long"
> will be converted into size_t for variables which may be > 4Gib.

I like the overall direction. I feel a little funny doing this step now, and not as part of a series to convert individual variables. But I cannot offhand think of any reason that it would behave badly even if the other part does not materialize

-Peff
Previous: tboegi@web.deNext: Torsten Bögershausen
Message 2 of 4 in “Upcast size_t variables to uintmax_t when printing”
  1. 1/1 Upcast size_t variables to uintmax_t when printingtboegi@web.de, Nov 11, 2018
  2. Jeff KingNov 11, 2018
  3. Torsten BögershausenNov 11, 2018
  4. Jeff KingNov 12, 2018

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.