|
From: | Jan Djärv |
Subject: | Re: Type-error in C code |
Date: | Sat, 13 Nov 2010 20:19:05 +0100 |
User-agent: | Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; sv-SE; rv:1.9.2.11) Gecko/20101013 Thunderbird/3.1.5 |
Thien-Thi Nguyen skrev 2010-11-12 22.15:
() Jan Djärv<address@hidden> () Fri, 12 Nov 2010 16:12:17 +0100 An Atom is 32 bits. ... with the top 3 bits guaranteed to be zero (X Windows System Protocol, section 3. Common Types). In this Emacs, ‘most-positive-fixnum’ is 536870911, i.e., #x1fffffff, i.e., 29 1s. Coincidence?
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.
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.
Jan D.
[Prev in Thread] | Current Thread | [Next in Thread] |