unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: emacs-devel@gnu.org
Subject: Re: Preferring ptrdiff_t to ssize_t
Date: Thu, 02 Oct 2014 05:54:32 +0300	[thread overview]
Message-ID: <83zjdfi3kn.fsf@gnu.org> (raw)
In-Reply-To: <542C6434.8020505@cs.ucla.edu>

> Date: Wed, 01 Oct 2014 13:29:40 -0700
> From: Paul Eggert <eggert@cs.ucla.edu>
> 
> I'm bringing this up now because in emacs-24 bzr 117515 Eli introduced a 
> ssize_t local variable, in trunk bzr 117993 I changed it to ptrdiff_t, 
> and Eli reverted the latter change in trunk bzr 117997.  In this 
> particular case the value happens to be an 'int', so on second thought 
> perhaps Emacs should just declare it as 'int' rather than mess with *_t 
> types.

I reverted it because your change was motivated by purely stylistic
reasons in that particular case.  The value in question is being
passed to realloc, which accepts an argument of type size_t.  I needed
a signed type of the same width, so I've chosen ssize_t.  I don't see
any problems with that in this particular case, even if we accept your
suggested general preference of ptrdiff_t, and this single case
doesn't change in any way our factual preferences, which are quite
clear from looking at the sources.

More generally, I wish you'd discuss these issues before making
changes, not after.  But I guess this is a moot point.



  parent reply	other threads:[~2014-10-02  2:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-01 20:29 Preferring ptrdiff_t to ssize_t Paul Eggert
2014-10-02  1:49 ` Stephen J. Turnbull
2014-10-02  2:54 ` Eli Zaretskii [this message]
2014-10-02  4:04   ` Paul Eggert
2014-10-02 15:36     ` Eli Zaretskii

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: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=83zjdfi3kn.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    /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://git.savannah.gnu.org/cgit/emacs.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).