emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Preferring ptrdiff_t to ssize_t


From: Paul Eggert
Subject: Re: Preferring ptrdiff_t to ssize_t
Date: Wed, 01 Oct 2014 21:04:20 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2

Eli Zaretskii wrote:
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.

ssize_t is not necessarily the same width as size_t.

Since the variable's initializer is of type 'int', how about simply declaring the variable to be 'int' as well? That would avoid confusion caused by ssize_t's appearing out of the blue, and would fit better with Emacs's general preference for using the type 'int' for smallish integer values.

I wish you'd discuss these issues before making changes

The issue is so minor it didn't seem worth discussing. I assumed you thought so too, as your recent change introduced ssize_t there without discussing the matter either. But as you say, this point is moot now.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]