diff src/elhash.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 3192994c49ca
line wrap: on
line diff
--- a/src/elhash.c	Sat Oct 08 12:26:09 2011 +0100
+++ b/src/elhash.c	Sun Oct 09 09:51:57 2011 +0100
@@ -289,9 +289,9 @@
   res = IGNORE_MULTIPLE_VALUES (Ffuncall (countof (args), args));
   UNGCPRO;
 
-  if (INTP (res))
+  if (FIXNUMP (res))
     {
-      return (Hashcode) (XINT (res));
+      return (Hashcode) (XFIXNUM (res));
     }
 
 #ifdef HAVE_BIGNUM
@@ -820,7 +820,7 @@
           /* hash_table_size() can't handle excessively large sizes. */
           maybe_signal_error_1 (Qargs_out_of_range,
                                 list3 (value, Qzero,
-                                       make_integer (EMACS_INT_MAX)),
+                                       make_integer (MOST_POSITIVE_FIXNUM)),
                                 Qhash_table, errb);
           return 0;
         }
@@ -841,7 +841,7 @@
 static Elemcount
 decode_hash_table_size (Lisp_Object obj)
 {
-  return NILP (obj) ? HASH_TABLE_DEFAULT_SIZE : XINT (obj);
+  return NILP (obj) ? HASH_TABLE_DEFAULT_SIZE : XFIXNUM (obj);
 }
 
 static int
@@ -1373,11 +1373,11 @@
       break;
 
   if (!HTENTRY_CLEAR_P (probe))
-    probe->value = make_int (XINT (probe->value) + offset);
+    probe->value = make_fixnum (XFIXNUM (probe->value) + offset);
   else
     {
       probe->key   = key;
-      probe->value = make_int (offset);
+      probe->value = make_fixnum (offset);
 
       if (++ht->count >= ht->rehash_count)
         {
@@ -1490,7 +1490,7 @@
 */
        (hash_table))
 {
-  return make_int (xhash_table (hash_table)->count);
+  return make_fixnum (xhash_table (hash_table)->count);
 }
 
 DEFUN ("hash-table-test", Fhash_table_test, 1, 1, 0, /*
@@ -1511,7 +1511,7 @@
 */
        (hash_table))
 {
-  return make_int (xhash_table (hash_table)->size);
+  return make_fixnum (xhash_table (hash_table)->size);
 }
 
 DEFUN ("hash-table-rehash-size", Fhash_table_rehash_size, 1, 1, 0, /*
@@ -2085,9 +2085,9 @@
           return LISP_HASH (make_char (CANONCASE (NULL, XCHAR (obj))));
         }
 
-      if (INTP (obj))
+      if (FIXNUMP (obj))
         {
-          return FLOAT_HASHCODE_FROM_DOUBLE ((double) (XINT (obj)));
+          return FLOAT_HASHCODE_FROM_DOUBLE ((double) (XFIXNUM (obj)));
         }
     }
 
@@ -2206,7 +2206,7 @@
   min = Ffunction_min_args (equal_function);
   max = Ffunction_max_args (equal_function);
 
-  if (!((XINT (min) <= 2) && (NILP (max) || 2 <= XINT (max))))
+  if (!((XFIXNUM (min) <= 2) && (NILP (max) || 2 <= XFIXNUM (max))))
     {
       signal_wrong_number_of_arguments_error (equal_function, 2);
     }
@@ -2214,7 +2214,7 @@
   min = Ffunction_min_args (hash_function);
   max = Ffunction_max_args (hash_function);
 
-  if (!((XINT (min) <= 1) && (NILP (max) || 1 <= XINT (max))))
+  if (!((XFIXNUM (min) <= 1) && (NILP (max) || 1 <= XFIXNUM (max))))
     {
       signal_wrong_number_of_arguments_error (hash_function, 1);
     }
@@ -2403,7 +2403,7 @@
   assert (!NILP (Fassq (Qeql, weak_list_list)));
   assert (!NILP (Fassq (Qequal, weak_list_list)));
   assert (!NILP (Fassq (Qequalp, weak_list_list)));
-  assert (4 == XINT (Flength (weak_list_list)));
+  assert (4 == XFIXNUM (Flength (weak_list_list)));
 
   Vhash_table_test_weak_list = make_weak_list (WEAK_LIST_KEY_ASSOC);
   XWEAK_LIST_LIST (Vhash_table_test_weak_list) = weak_list_list;