diff src/symbols.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 2014ff433daf
line wrap: on
line diff
--- a/src/symbols.c	Sat Oct 08 12:26:09 2011 +0100
+++ b/src/symbols.c	Sun Oct 09 09:51:57 2011 +0100
@@ -245,11 +245,11 @@
 
   len = XSTRING_LENGTH (string);
   object = oblookup (obarray, XSTRING_DATA (string), len);
-  if (!INTP (object))
+  if (!FIXNUMP (object))
     /* Found it */
     return object;
 
-  ptr = &XVECTOR_DATA (obarray)[XINT (object)];
+  ptr = &XVECTOR_DATA (obarray)[XFIXNUM (object)];
 
   object = Fmake_symbol (string);
   symbol = object;
@@ -301,7 +301,7 @@
     string = symbol_name (XSYMBOL (name));
 
   tem = oblookup (obarray, XSTRING_DATA (string), XSTRING_LENGTH (string));
-  if (INTP (tem) || (SYMBOLP (name) && !EQ (name, tem)))
+  if (FIXNUMP (tem) || (SYMBOLP (name) && !EQ (name, tem)))
     return default_;
   else
     return tem;
@@ -332,7 +332,7 @@
     }
 
   tem = oblookup (obarray, XSTRING_DATA (string), XSTRING_LENGTH (string));
-  if (INTP (tem))
+  if (FIXNUMP (tem))
     return Qnil;
   /* If arg was a symbol, don't delete anything but that symbol itself.  */
   if (SYMBOLP (name) && !EQ (name, tem))
@@ -423,7 +423,7 @@
 	if (!tail)
 	  break;
       }
-  return make_int (hash);
+  return make_fixnum (hash);
 }
 
 /* An excellent string hashing function.
@@ -1209,7 +1209,7 @@
     {
     case SYMVAL_FIXNUM_FORWARD:
     case SYMVAL_CONST_FIXNUM_FORWARD:
-      return make_int (*((Fixnum *)symbol_value_forward_forward (fwd)));
+      return make_fixnum (*((Fixnum *)symbol_value_forward_forward (fwd)));
 
     case SYMVAL_BOOLEAN_FORWARD:
     case SYMVAL_CONST_BOOLEAN_FORWARD:
@@ -1271,7 +1271,7 @@
     = XSYMBOL_VALUE_FORWARD (valcontents);
   int offset = ((Rawbyte *) symbol_value_forward_forward (fwd)
 		- (Rawbyte *) &buffer_local_flags);
-  int mask = XINT (*((Lisp_Object *) symbol_value_forward_forward (fwd)));
+  int mask = XFIXNUM (*((Lisp_Object *) symbol_value_forward_forward (fwd)));
   int (*magicfun) (Lisp_Object simm, Lisp_Object *val, Lisp_Object in_object,
 		   int flags) = symbol_value_forward_magicfun (fwd);
 
@@ -1311,7 +1311,7 @@
     = XSYMBOL_VALUE_FORWARD (valcontents);
   int offset = ((Rawbyte *) symbol_value_forward_forward (fwd)
 		- (Rawbyte *) &console_local_flags);
-  int mask = XINT (*((Lisp_Object *) symbol_value_forward_forward (fwd)));
+  int mask = XFIXNUM (*((Lisp_Object *) symbol_value_forward_forward (fwd)));
   int (*magicfun) (Lisp_Object simm, Lisp_Object *val, Lisp_Object in_object,
 		   int flags) = symbol_value_forward_magicfun (fwd);
 
@@ -1379,10 +1379,10 @@
       switch (XSYMBOL_VALUE_MAGIC_TYPE (ovalue))
 	{
 	case SYMVAL_FIXNUM_FORWARD:
-	  CHECK_INT (newval);
+	  CHECK_FIXNUM (newval);
 	  if (magicfun)
 	    magicfun (sym, &newval, Qnil, 0);
-	  *((Fixnum *) symbol_value_forward_forward (fwd)) = XINT (newval);
+	  *((Fixnum *) symbol_value_forward_forward (fwd)) = XFIXNUM (newval);
 	  return;
 
 	case SYMVAL_BOOLEAN_FORWARD:
@@ -1947,7 +1947,7 @@
       {
 	const struct symbol_value_forward *fwd
 	  = XSYMBOL_VALUE_FORWARD (valcontents);
-	int mask = XINT (*((Lisp_Object *)
+	int mask = XFIXNUM (*((Lisp_Object *)
 			   symbol_value_forward_forward (fwd)));
 	if (mask > 0)
 	  /* Setting this variable makes it buffer-local */
@@ -1959,7 +1959,7 @@
       {
 	const struct symbol_value_forward *fwd
 	  = XSYMBOL_VALUE_FORWARD (valcontents);
-	int mask = XINT (*((Lisp_Object *)
+	int mask = XFIXNUM (*((Lisp_Object *)
 			   symbol_value_forward_forward (fwd)));
 	if (mask > 0)
 	  /* Setting this variable makes it console-local */
@@ -2243,7 +2243,7 @@
 
   if (nargs & 1)		/* Odd number of arguments? */
     Fsignal (Qwrong_number_of_arguments,
-	     list2 (Qsetq_default, make_int (nargs)));
+	     list2 (Qsetq_default, make_fixnum (nargs)));
 
   GC_PROPERTY_LIST_LOOP_3 (symbol, val, args)
     {
@@ -2547,7 +2547,7 @@
 	int offset = ((Rawbyte *) symbol_value_forward_forward (fwd)
 			       - (Rawbyte *) &buffer_local_flags);
 	int mask =
-	  XINT (*((Lisp_Object *) symbol_value_forward_forward (fwd)));
+	  XFIXNUM (*((Lisp_Object *) symbol_value_forward_forward (fwd)));
 
 	if (mask > 0)
 	  {
@@ -2642,7 +2642,7 @@
 	int offset = ((Rawbyte *) symbol_value_forward_forward (fwd)
 			       - (Rawbyte *) &console_local_flags);
 	int mask =
-	  XINT (*((Lisp_Object *) symbol_value_forward_forward (fwd)));
+	  XFIXNUM (*((Lisp_Object *) symbol_value_forward_forward (fwd)));
 
 	if (mask > 0)
 	  {
@@ -2698,7 +2698,7 @@
 	  {
 	    const struct symbol_value_forward *fwd
 	      = XSYMBOL_VALUE_FORWARD (valcontents);
-	    int mask = XINT (*((Lisp_Object *)
+	    int mask = XFIXNUM (*((Lisp_Object *)
 			       symbol_value_forward_forward (fwd)));
 	    if ((mask <= 0) || (buffer && (buffer->local_var_flags & mask)))
 	      /* Already buffer-local */
@@ -2876,17 +2876,17 @@
 {
   Lisp_Object documentation = Fget (symbol, Qvariable_documentation, Qnil);
       
-  if ((INTP (documentation) && XINT (documentation) < 0) ||
+  if ((FIXNUMP (documentation) && XFIXNUM (documentation) < 0) ||
       (STRINGP (documentation) &&
        (string_byte (documentation, 0) == '*')) ||
       /* If (STRING . INTEGER), a negative integer means a user variable. */
       (CONSP (documentation)
        && STRINGP (XCAR (documentation))
-       && INTP (XCDR (documentation))
-       && XINT (XCDR (documentation)) < 0) ||
+       && FIXNUMP (XCDR (documentation))
+       && XFIXNUM (XCDR (documentation)) < 0) ||
       !NILP (Fcustom_variable_p (symbol)))
     {
-      return make_int(1);
+      return make_fixnum(1);
     }
 
   return Qzero;
@@ -2925,7 +2925,7 @@
       return Qnil;
     }
 
-  assert (EQ (make_int (1), mapped));
+  assert (EQ (make_fixnum (1), mapped));
 
   return Qt;
 }