emacs-devel
[Top][All Lists]
Advanced

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

Re: Type-error in C code


From: Thien-Thi Nguyen
Subject: Re: Type-error in C code
Date: Sat, 13 Nov 2010 20:52:25 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

() Jan Djärv <address@hidden>
() Sat, 13 Nov 2010 20:19:05 +0100

   Interesting.  Maybe they used those bits as a type indictor at
   one point.  Looking at the X source now, I can't find any reson
   for this.

IIRC, X was originally conceived and implemented on a Lisp system.
The term "Atom", and its 29 bits max-ness are direct consequences.

   However, I fixed the code to use make_fixnum_or_float anyway.
   In the future somebody may come along and wonder why a 32-bit
   number is put in a Lisp integer.

Not if they understand that an Atom is NOT a 32-bit number.
Perhaps if you revert the change and explain the limits of
the type in a nice comment, future programmers will not be
inclined to wonder when they look (only) at the source.

I think routing through ‘make_fixnum_or_float’ is suboptimal.



reply via email to

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