git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Torsten Bögershausen" <tboegi@web.de>
Cc: Derrick Stolee <stolee@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH/RFC v1 1/1] Use size_t instead of unsigned long
Date: Tue, 20 Nov 2018 10:36:42 +0900	[thread overview]
Message-ID: <xmqqin0scyxh.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20181119163323.GA15913@tor.lan> ("Torsten Bögershausen"'s message of "Mon, 19 Nov 2018 17:33:23 +0100")

Torsten Bögershausen <tboegi@web.de> writes:

> The only problematic system is Win64, where "unsigned long" is 32 bit,
> and therefore we must use size_t to address data in memory.
> This is not to be confused with off_t, which is used for "data on disk"
> (and nothing else) or timestamp_t which is used for timestamps (and nothing else).
>
> I haven't followed the "coccinelle script" development at all, if someone
> makes a patch do replace "unsigned long" with size_t, that could replace
> my whole patch. (Some of them may be downgraded to "unsigned int" ?)

This paragraph makes it sound as if this patch is s/ulong/size_t/,
but that contradicts with the previous paragraph, no?  It is much
better to leave a ulong that is not about the size of a memory
region as-is, to be turned into appropriate and correct type later,
than changing it into another wrong type (size_t).

In short, we could do ulong to size_t with Coccinelle, but I do not
think we want to blindly rewrite all.


  reply	other threads:[~2018-11-20  1:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-17 15:11 [PATCH/RFC v1 1/1] Use size_t instead of unsigned long tboegi
2018-11-18 20:18 ` Derrick Stolee
2018-11-18 23:40   ` Junio C Hamano
2018-11-19  5:33     ` Torsten Bögershausen
2018-11-19 18:15       ` René Scharfe
2018-11-19 16:33   ` Torsten Bögershausen
2018-11-20  1:36     ` Junio C Hamano [this message]
2018-11-20  5:04 ` [PATCH v2 1/1] Use size_t instead of 'unsigned long' for data in memory tboegi
2018-11-21 11:55   ` Derrick Stolee
2019-01-16 21:46   ` Thomas Braun
2019-01-19 17:06     ` Torsten Bögershausen
2019-01-22 14:25       ` Thomas Braun
2019-04-13 15:18 ` [PATCH v3 " tboegi

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqin0scyxh.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=stolee@gmail.com \
    --cc=tboegi@web.de \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).