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: Eli Zaretskii
Subject: Re: Type-error in C code
Date: Fri, 12 Nov 2010 17:48:14 +0200

> From: Julien Danjou <address@hidden>
> Date: Fri, 12 Nov 2010 16:32:10 +0100
> Cc: Stefan Monnier <address@hidden>, address@hidden
> 
> It seems we can store 32 bits unsigned using XSETFASTINT.

No.

>   for (iter = data; CONSP (iter); iter = XCDR (iter))
>     {
>       Lisp_Object o = XCAR (iter);
> 
>       if (INTEGERP (o))
>         val = (long) XFASTINT (o);
> --8<---------------cut here---------------end--------------->8---
> 
> So IIUC, we could use XSETFASTINT to store the atom. Am I wrong?

Yes, you are wrong.  You should only use XSETFASTINT if you know the
value will not overflow a Lisp integer.

In a nutshell, nothing can work around the basic limitation that only
integer values smaller or equal to most-positive-fixnum can be put
into a Lisp integer.



reply via email to

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