comparison src/specifier.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 d12a0c55b174
children b0d40183ac79
comparison
equal deleted inserted replaced
5580:a0e81357194e 5581:56144c8593a8
284 write_fmt_string (printcharfun, "#<%s-specifier global=", sp->methods->name); 284 write_fmt_string (printcharfun, "#<%s-specifier global=", sp->methods->name);
285 #if 0 285 #if 0
286 /* #### Not obvious this is useful, and overrides user settings; if we 286 /* #### Not obvious this is useful, and overrides user settings; if we
287 resurrect this, create variables like `print-specifier-length' so it 287 resurrect this, create variables like `print-specifier-length' so it
288 can be controlled. */ 288 can be controlled. */
289 specbind (Qprint_string_length, make_int (100)); 289 specbind (Qprint_string_length, make_fixnum (100));
290 specbind (Qprint_length, make_int (5)); 290 specbind (Qprint_length, make_fixnum (5));
291 #endif 291 #endif
292 the_specs = Fspecifier_specs (obj, Qglobal, Qnil, Qnil); 292 the_specs = Fspecifier_specs (obj, Qglobal, Qnil, Qnil);
293 if (NILP (the_specs)) 293 if (NILP (the_specs))
294 /* there are no global specs */ 294 /* there are no global specs */
295 write_ascstring (printcharfun, "<unspecified>"); 295 write_ascstring (printcharfun, "<unspecified>");
883 } 883 }
884 884
885 static Lisp_Object 885 static Lisp_Object
886 canonicalize_tag_set (Lisp_Object tag_set) 886 canonicalize_tag_set (Lisp_Object tag_set)
887 { 887 {
888 int len = XINT (Flength (tag_set)); 888 int len = XFIXNUM (Flength (tag_set));
889 Lisp_Object *tags, rest; 889 Lisp_Object *tags, rest;
890 int i, j; 890 int i, j;
891 891
892 /* We assume in this function that the tag_set has already been 892 /* We assume in this function that the tag_set has already been
893 validated, so there are no surprises. */ 893 validated, so there are no surprises. */
1051 static Lisp_Object 1051 static Lisp_Object
1052 call_charset_predicate (Lisp_Object charset_predicate, Lisp_Object charset) 1052 call_charset_predicate (Lisp_Object charset_predicate, Lisp_Object charset)
1053 { 1053 {
1054 struct gcpro gcpro1; 1054 struct gcpro gcpro1;
1055 Lisp_Object charpres = make_vector (NUM_MATCHSPEC_STAGES, Qnil); 1055 Lisp_Object charpres = make_vector (NUM_MATCHSPEC_STAGES, Qnil);
1056 int max_args = XINT (Ffunction_max_args (charset_predicate)); 1056 int max_args = XFIXNUM (Ffunction_max_args (charset_predicate));
1057 GCPRO1 (charpres); 1057 GCPRO1 (charpres);
1058 1058
1059 1059
1060 #define DEFINE_SPECIFIER_TAG_FROB(stage, enumstage) \ 1060 #define DEFINE_SPECIFIER_TAG_FROB(stage, enumstage) \
1061 do { \ 1061 do { \
1240 1240
1241 if (!NILP (charset_predicate)) 1241 if (!NILP (charset_predicate))
1242 { 1242 {
1243 Lisp_Object min_args = Ffunction_min_args (charset_predicate); 1243 Lisp_Object min_args = Ffunction_min_args (charset_predicate);
1244 Lisp_Object max_args = Ffunction_max_args (charset_predicate); 1244 Lisp_Object max_args = Ffunction_max_args (charset_predicate);
1245 if (!(INTP (min_args) && XINT (min_args) == 1 && 1245 if (!(FIXNUMP (min_args) && XFIXNUM (min_args) == 1 &&
1246 INTP (max_args) && XINT (max_args) == 1)) 1246 FIXNUMP (max_args) && XFIXNUM (max_args) == 1))
1247 { 1247 {
1248 /* We only allow the stage argument to be specifed from C. */ 1248 /* We only allow the stage argument to be specifed from C. */
1249 invalid_change ("Charset predicate must take one argument", 1249 invalid_change ("Charset predicate must take one argument",
1250 tag); 1250 tag);
1251 } 1251 }
2962 device = FRAME_DEVICE (XFRAME (frame)); 2962 device = FRAME_DEVICE (XFRAME (frame));
2963 2963
2964 /* device had better be determined by now; abort if not. */ 2964 /* device had better be determined by now; abort if not. */
2965 (void) DEVICE_CLASS (XDEVICE (device)); 2965 (void) DEVICE_CLASS (XDEVICE (device));
2966 2966
2967 depth = make_int (1 + XINT (depth)); 2967 depth = make_fixnum (1 + XFIXNUM (depth));
2968 if (XINT (depth) > 20) 2968 if (XFIXNUM (depth) > 20)
2969 { 2969 {
2970 maybe_signal_error (Qstack_overflow, 2970 maybe_signal_error (Qstack_overflow,
2971 "Apparent loop in specifier inheritance", 2971 "Apparent loop in specifier inheritance",
2972 Qunbound, Qspecifier, errb); 2972 Qunbound, Qspecifier, errb);
2973 /* The specification is fucked; at least try the fallback 2973 /* The specification is fucked; at least try the fallback
3613 DEFINE_SPECIFIER_TYPE (integer); 3613 DEFINE_SPECIFIER_TYPE (integer);
3614 3614
3615 static void 3615 static void
3616 integer_validate (Lisp_Object instantiator) 3616 integer_validate (Lisp_Object instantiator)
3617 { 3617 {
3618 CHECK_INT (instantiator); 3618 CHECK_FIXNUM (instantiator);
3619 } 3619 }
3620 3620
3621 DEFUN ("integer-specifier-p", Finteger_specifier_p, 1, 1, 0, /* 3621 DEFUN ("integer-specifier-p", Finteger_specifier_p, 1, 1, 0, /*
3622 Return non-nil if OBJECT is an integer specifier. 3622 Return non-nil if OBJECT is an integer specifier.
3623 3623