diff src/tooltalk.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/tooltalk.c	Sat Oct 08 12:26:09 2011 +0100
+++ b/src/tooltalk.c	Sun Oct 09 09:51:57 2011 +0100
@@ -291,10 +291,10 @@
 static int
 tooltalk_constant_value (Lisp_Object s)
 {
-  if (INTP (s))
-    return XINT (s);
+  if (FIXNUMP (s))
+    return XFIXNUM (s);
   else if (SYMBOLP (s))
-    return XINT (XSYMBOL (s)->value);
+    return XFIXNUM (XSYMBOL (s)->value);
   else
     return 0;   /* should never occur */
 }
@@ -586,8 +586,8 @@
       EQ (attribute, (Qtt_arg_type))  ||
       EQ (attribute, (Qtt_arg_val)))
     {
-      CHECK_INT (argn);
-      n = XINT (argn);
+      CHECK_FIXNUM (argn);
+      n = XFIXNUM (argn);
     }
 
   if (!VALID_TOOLTALK_MESSAGEP (m))
@@ -609,7 +609,7 @@
     return tt_message_arg_bval_vector (m, n);
 
   else if (EQ (attribute, Qtt_args_count))
-    return make_int (tt_message_args_count (m));
+    return make_fixnum (tt_message_args_count (m));
 
   else if (EQ (attribute, Qtt_address))
     return tt_address_symbol (tt_message_address (m));
@@ -618,13 +618,13 @@
     return tt_class_symbol (tt_message_class (m));
 
   else if (EQ (attribute, Qtt_disposition))
-    return make_int (tt_message_disposition (m));
+    return make_fixnum (tt_message_disposition (m));
 
   else if (EQ (attribute, Qtt_file))
     return tt_build_c_string (tt_message_file (m));
 
   else if (EQ (attribute, Qtt_gid))
-    return make_int (tt_message_gid (m));
+    return make_fixnum (tt_message_gid (m));
 
   else if (EQ (attribute, Qtt_handler))
     return tt_build_c_string (tt_message_handler (m));
@@ -660,13 +660,13 @@
     return tt_state_symbol (tt_message_state (m));
 
   else if (EQ (attribute, Qtt_status))
-    return make_int (tt_message_status (m));
+    return make_fixnum (tt_message_status (m));
 
   else if (EQ (attribute, Qtt_status_string))
     return tt_build_c_string (tt_message_status_string (m));
 
   else if (EQ (attribute, Qtt_uid))
-    return make_int (tt_message_uid (m));
+    return make_fixnum (tt_message_uid (m));
 
   else if (EQ (attribute, Qtt_callback))
     return XTOOLTALK_MESSAGE (message_)->callback;
@@ -716,8 +716,8 @@
       EQ (attribute, (Qtt_arg_ival))  ||
       EQ (attribute, (Qtt_arg_val)))
     {
-      CHECK_INT (argn);
-      n = XINT (argn);
+      CHECK_FIXNUM (argn);
+      n = XFIXNUM (argn);
     }
 
   if (!VALID_TOOLTALK_MESSAGEP (m))
@@ -773,8 +773,8 @@
     }
   else if (EQ (attribute, Qtt_arg_ival))
     {
-      CHECK_INT (value);
-      tt_message_arg_ival_set (m, n, XINT (value));
+      CHECK_FIXNUM (value);
+      tt_message_arg_ival_set (m, n, XFIXNUM (value));
     }
   else if (EQ (attribute, Qtt_arg_val))
     {
@@ -785,8 +785,8 @@
     }
   else if (EQ (attribute, Qtt_status))
     {
-      CHECK_INT (value);
-      tt_message_status_set (m, XINT (value));
+      CHECK_FIXNUM (value);
+      tt_message_status_set (m, XFIXNUM (value));
     }
   else if (EQ (attribute, Qtt_callback))
     {
@@ -930,8 +930,8 @@
 	value_ext = LISP_STRING_TO_EXTERNAL (value, Qtooltalk_encoding);
 	tt_message_arg_add (m, n, vtype_ext, value_ext);
       }
-    else if (INTP (value))
-      tt_message_iarg_add (m, n, vtype_ext, XINT (value));
+    else if (FIXNUMP (value))
+      tt_message_iarg_add (m, n, vtype_ext, XFIXNUM (value));
   }
 
   return Qnil;
@@ -1129,8 +1129,8 @@
 	value_ext = LISP_STRING_TO_EXTERNAL (value, Qtooltalk_encoding);
 	tt_pattern_arg_add (p, n, vtype_ext, value_ext);
       }
-    else if (INTP (value))
-      tt_pattern_iarg_add (p, n, vtype_ext, XINT (value));
+    else if (FIXNUMP (value))
+      tt_pattern_iarg_add (p, n, vtype_ext, XFIXNUM (value));
   }
 
   return Qnil;
@@ -1254,7 +1254,7 @@
   if (tt_ptr_error (retval) != TT_OK)
     return;
 
-  Vtooltalk_fd = make_int (tt_fd ());
+  Vtooltalk_fd = make_fixnum (tt_fd ());
 
   tt_session_join (tt_default_session ());
 
@@ -1422,7 +1422,7 @@
 
 #define MAKE_CONSTANT(name) do { \
     defsymbol (&Q_ ## name, #name); \
-    Fset (Q_ ## name, make_int (name)); \
+    Fset (Q_ ## name, make_fixnum (name)); \
   } while (0)
 
   MAKE_CONSTANT (TT_MODE_UNDEFINED);