Mercurial > hg > xemacs-beta
diff src/rangetab.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 | 58b38d5b32d0 |
children |
line wrap: on
line diff
--- a/src/rangetab.c Sat Oct 08 12:26:09 2011 +0100 +++ b/src/rangetab.c Sun Oct 09 09:51:57 2011 +0100 @@ -474,9 +474,9 @@ CHECK_RANGE_TABLE (range_table); rt = XRANGE_TABLE (range_table); - CHECK_INT_COERCE_CHAR (pos); + CHECK_FIXNUM_COERCE_CHAR (pos); - return get_range_table (XINT (pos), gap_array_length (rt->entries), + return get_range_table (XFIXNUM (pos), gap_array_length (rt->entries), gap_array_begin (rt->entries, struct range_table_entry), gap_array_gappos (rt->entries), @@ -712,10 +712,10 @@ EMACS_INT first, last; CHECK_RANGE_TABLE (range_table); - CHECK_INT_COERCE_CHAR (start); - first = XINT (start); - CHECK_INT_COERCE_CHAR (end); - last = XINT (end); + CHECK_FIXNUM_COERCE_CHAR (start); + first = XFIXNUM (start); + CHECK_FIXNUM_COERCE_CHAR (end); + last = XFIXNUM (end); if (first > last) invalid_argument_2 ("start must be <= end", start, end); @@ -782,8 +782,8 @@ { EMACS_INT premier = first, dernier = last; internal_to_external_adjust_ends (rt->type, &premier, &dernier); - args[1] = make_int (premier); - args[2] = make_int (dernier); + args[1] = make_fixnum (premier); + args[2] = make_fixnum (dernier); } args[3] = entry.val; Ffuncall (countof (args), args); @@ -818,11 +818,11 @@ /* #### should deal with ERRB */ EXTERNAL_PROPERTY_LIST_LOOP_3 (range, data, value) { - if (!INTP (range) && !CHARP (range) + if (!FIXNUMP (range) && !CHARP (range) && !(CONSP (range) && CONSP (XCDR (range)) && NILP (XCDR (XCDR (range))) - && (INTP (XCAR (range)) || CHARP (XCAR (range))) - && (INTP (XCAR (XCDR (range))) || CHARP (XCAR (XCDR (range)))))) + && (FIXNUMP (XCAR (range)) || CHARP (XCAR (range))) + && (FIXNUMP (XCAR (XCDR (range))) || CHARP (XCAR (XCDR (range)))))) sferror ("Invalid range format", range); }