64-bit lint

Stephen J. Turnbull stephen at xemacs.org
Wed Feb 10 07:19:00 EST 2010


Ben Wing writes:
 > On Wed, Feb 10, 2010 at 12:29 AM, Stephen J. Turnbull
 > <stephen at xemacs.org> wrote:

 > > AFAIK in XEmacs we should not be using int, long, or unsigned versions
 > > thereof, except for things like loop variables.  Instead, anything
 > > that is global, and especially anything visible to Lisp, should be
 > > using EMACS_INT (or, rarely, EMACS_UINT).

 > You are right, but I would say, we should use typedefs like Bytecount,
 > Charcount or Elemcount.  All of these boil down to EMACS_INT.

I think it's worthwhile using the typedefs for XEmacs-specific things,
especially where easily confused (such as Bytecount vs. Charcount,
although the compiler won't check those for us).

However, Elemcount and similar generic typedefs seem dubious to me
(unless it's taken as the "not elsewhere classified" idiom for
EMACS_INT).  I rarely remember typedefs other than EMACS_INT,
Bytecount, Charcount, and Ichar.

 > There are a few other typedefs for things with other semantics, and
 > if we find things that don't fit we can always create new ones.

This may be useful for you, but for the typical developer, they're
just more stuff to remember when they just want to fix a bug.

If you want that kind of practice followed by other developers, you're
either going to have to review their code and make a point of asking
them to fix it, or convince the other reviewers to do that.  And
either way it needs to be documented somewhere that people will find
it an pay attention to it.




More information about the XEmacs-Beta mailing list