Mercurial > hg > xemacs-beta
diff src/select-xlike-inc.c @ 5581:56144c8593a8
Mechanically change INT to FIXNUM in our sources.
src/ChangeLog addition:
2011-10-09 Aidan Kehoe <kehoea@parhasard.net>
[...]
Mechanically change INT (where it refers to non-bignum Lisp
integers) to FIXNUM in our sources. Done for the following
functions, enums, and macros: Lisp_Type_Int_Even,
Lisp_Type_Int_Odd, INT_GCBITS, INT_VALBITS, make_int(), INTP(),
XINT(), CHECK_INT(), XREALINT(), INT_PLUS(), INT_MINUS(),
EMACS_INT_MAX (to MOST_POSITIVE_FIXNUM), EMACS_INT_MIN (to
MOST_NEGATIVE_FIXNUM), NUMBER_FITS_IN_AN_EMACS_INT() to
NUMBER_FITS_IN_A_FIXNUM(), XFLOATINT, XCHAR_OR_INT, INT_OR_FLOAT.
The EMACS_INT typedef was not changed, it does not describe
non-bignum Lisp integers.
Script that did the change available in
http://mid.gmane.org/20067.17650.181273.12014@parhasard.net .
modules/ChangeLog addition:
2011-10-09 Aidan Kehoe <kehoea@parhasard.net>
[...]
Mechanically change INT to FIXNUM, where the usage describes non-bignum
Lisp integers. See the src/ChangeLog entry for more details.
man/ChangeLog addition:
2011-10-09 Aidan Kehoe <kehoea@parhasard.net>
* internals/internals.texi (How Lisp Objects Are Represented in C):
* internals/internals.texi (Integers and Characters):
Mechanically change INT to FIXNUM, where the usage describes non-bignum
Lisp integers.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 09 Oct 2011 09:51:57 +0100 |
parents | 308d34e9f07d |
children |
line wrap: on
line diff
--- a/src/select-xlike-inc.c Sat Oct 08 12:26:09 2011 +0100 +++ b/src/select-xlike-inc.c Sun Oct 09 09:51:57 2011 +0100 @@ -110,9 +110,9 @@ { Elemcount i; Elemcount len = size / sizeof (XE_ATOM_TYPE); - Lisp_Object v = Fmake_vector (make_int (len), Qzero); + Lisp_Object v = Fmake_vector (make_fixnum (len), Qzero); for (i = 0; i < len; i++) - Faset (v, make_int (i), XE_ATOM_TO_SYMBOL (d, ((XE_ATOM_TYPE *) data) [i])); + Faset (v, make_fixnum (i), XE_ATOM_TO_SYMBOL (d, ((XE_ATOM_TYPE *) data) [i])); return v; } } @@ -124,7 +124,7 @@ else if (format == 32 && size == sizeof (long)) return word_to_lisp (((unsigned long *) data) [0]); else if (format == 16 && size == sizeof (short)) - return make_int ((int) (((unsigned short *) data) [0])); + return make_fixnum ((int) (((unsigned short *) data) [0])); /* Convert any other kind of data to a vector of numbers, represented as above (as an integer, or a cons of two 16 bit integers). @@ -149,7 +149,7 @@ for (i = 0; i < size / 4; i++) { int j = (int) ((unsigned short *) data) [i]; - Faset (v, make_int (i), make_int (j)); + Faset (v, make_fixnum (i), make_fixnum (j)); } return v; } @@ -160,7 +160,7 @@ for (i = 0; i < size / 4; i++) { unsigned long j = ((unsigned long *) data) [i]; - Faset (v, make_int (i), word_to_lisp (j)); + Faset (v, make_fixnum (i), word_to_lisp (j)); } return v; } @@ -239,18 +239,18 @@ (*(XE_ATOM_TYPE **) data_ret) [0] = XE_SYMBOL_TO_ATOM (d, obj, 0); if (NILP (type)) type = QATOM; } - else if (INTP (obj) && - XINT (obj) <= 0x7FFF && - XINT (obj) >= -0x8000) + else if (FIXNUMP (obj) && + XFIXNUM (obj) <= 0x7FFF && + XFIXNUM (obj) >= -0x8000) { *format_ret = 16; *size_ret = 1; *data_ret = xnew_rawbytes (sizeof (short) + 1); (*data_ret) [sizeof (short)] = 0; - (*(short **) data_ret) [0] = (short) XINT (obj); + (*(short **) data_ret) [0] = (short) XFIXNUM (obj); if (NILP (type)) type = QINTEGER; } - else if (INTP (obj) || CONSP (obj)) + else if (FIXNUMP (obj) || CONSP (obj)) { *format_ret = 32; *size_ret = 1; @@ -318,7 +318,7 @@ for (i = 0; i < *size_ret; i++) if (CONSP (XVECTOR_DATA (obj) [i])) *format_ret = 32; - else if (!INTP (XVECTOR_DATA (obj) [i])) + else if (!FIXNUMP (XVECTOR_DATA (obj) [i])) syntax_error ("all elements of the vector must be integers or conses of integers", obj);