emacs-devel
[Top][All Lists]
Advanced

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

Re: size_t vs EMACS_INT


From: Eli Zaretskii
Subject: Re: size_t vs EMACS_INT
Date: Fri, 15 Jul 2011 20:14:31 +0300

> Date: Fri, 15 Jul 2011 09:38:29 -0700
> From: Paul Eggert <address@hidden>
> CC: address@hidden
> 
> On 07/15/11 01:10, Eli Zaretskii wrote:
> > EMACS_INT should not be used
> > for anything that is not directly related to buffer or string
> > positions.
> 
> No, EMACS_INT is for anything that is related to the Emacs
> internal representation of integers.  It's not just buffer
> and string positions.

Right, that too.

> > My point was that _conceptually_,
> > EMACS_INT is limited to MOST_POSITIVE_FIXNUM
> 
> No, conceptually, EMACS_INT is limited to TYPE_MAXIMUM (EMACS_INT).
> A lot of Emacs code assumes that MOST_POSITIVE_FIXNUM is much
> less than TYPE_MAXIMUM (EMACS_INT), and any change to that assumption
> would require a significant rewrite of the Emacs internals.

Can you show examples of these assumptions?

> > let's use ssize_t
> 
> No, because POSIX allows ssize_t to be 32 bits on the same
> platform where size_t is 64 bits.

But ptrdiff_t should do, right?  If so, let's use that.



reply via email to

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