Mercurial > hg > xemacs-beta
comparison src/insdel.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 | 65d65b52d608 |
comparison
equal
deleted
inserted
replaced
5580:a0e81357194e | 5581:56144c8593a8 |
---|---|
496 /* Don't allow a buffer size that won't fit in an int | 496 /* Don't allow a buffer size that won't fit in an int |
497 even if it will fit in a Lisp integer. | 497 even if it will fit in a Lisp integer. |
498 That won't work because so many places use `int'. */ | 498 That won't work because so many places use `int'. */ |
499 | 499 |
500 if (BUF_Z (buf) - BUF_BEG (buf) + BUF_GAP_SIZE (buf) + increment | 500 if (BUF_Z (buf) - BUF_BEG (buf) + BUF_GAP_SIZE (buf) + increment |
501 > EMACS_INT_MAX) | 501 > MOST_POSITIVE_FIXNUM) |
502 out_of_memory ("Maximum buffer size exceeded", Qunbound); | 502 out_of_memory ("Maximum buffer size exceeded", Qunbound); |
503 | 503 |
504 result = BUFFER_REALLOC (buf->text->beg, | 504 result = BUFFER_REALLOC (buf->text->beg, |
505 BYTE_BUF_Z (buf) - BYTE_BUF_BEG (buf) + | 505 BYTE_BUF_Z (buf) - BYTE_BUF_BEG (buf) + |
506 BUF_GAP_SIZE (buf) + increment + | 506 BUF_GAP_SIZE (buf) + increment + |
818 || !NILP (symbol_value_in_buffer (Qbefore_change_function, buffer))) | 818 || !NILP (symbol_value_in_buffer (Qbefore_change_function, buffer))) |
819 { | 819 { |
820 set_buffer_internal (buf); | 820 set_buffer_internal (buf); |
821 va_run_hook_with_args_trapping_problems | 821 va_run_hook_with_args_trapping_problems |
822 (Qchange, Qbefore_change_functions, 2, | 822 (Qchange, Qbefore_change_functions, 2, |
823 make_int (start), make_int (end), | 823 make_fixnum (start), make_fixnum (end), |
824 INHIBIT_EXISTING_PERMANENT_DISPLAY_OBJECT_DELETION); | 824 INHIBIT_EXISTING_PERMANENT_DISPLAY_OBJECT_DELETION); |
825 /* Obsolete, for compatibility */ | 825 /* Obsolete, for compatibility */ |
826 va_run_hook_with_args_trapping_problems | 826 va_run_hook_with_args_trapping_problems |
827 (Qchange, Qbefore_change_function, 2, | 827 (Qchange, Qbefore_change_function, 2, |
828 make_int (start), make_int (end), | 828 make_fixnum (start), make_fixnum (end), |
829 INHIBIT_EXISTING_PERMANENT_DISPLAY_OBJECT_DELETION); | 829 INHIBIT_EXISTING_PERMANENT_DISPLAY_OBJECT_DELETION); |
830 } | 830 } |
831 } | 831 } |
832 | 832 |
833 /* Make sure endpoints remain valid. before-change-functions | 833 /* Make sure endpoints remain valid. before-change-functions |
907 set_buffer_internal (buf); | 907 set_buffer_internal (buf); |
908 /* The actual after-change functions take slightly | 908 /* The actual after-change functions take slightly |
909 different arguments than what we were passed. */ | 909 different arguments than what we were passed. */ |
910 va_run_hook_with_args_trapping_problems | 910 va_run_hook_with_args_trapping_problems |
911 (Qchange, Qafter_change_functions, 3, | 911 (Qchange, Qafter_change_functions, 3, |
912 make_int (start), make_int (new_end), | 912 make_fixnum (start), make_fixnum (new_end), |
913 make_int (orig_end - start), | 913 make_fixnum (orig_end - start), |
914 INHIBIT_EXISTING_PERMANENT_DISPLAY_OBJECT_DELETION); | 914 INHIBIT_EXISTING_PERMANENT_DISPLAY_OBJECT_DELETION); |
915 /* Obsolete, for compatibility */ | 915 /* Obsolete, for compatibility */ |
916 va_run_hook_with_args_trapping_problems | 916 va_run_hook_with_args_trapping_problems |
917 (Qchange, Qafter_change_function, 3, | 917 (Qchange, Qafter_change_function, 3, |
918 make_int (start), make_int (new_end), | 918 make_fixnum (start), make_fixnum (new_end), |
919 make_int (orig_end - start), | 919 make_fixnum (orig_end - start), |
920 INHIBIT_EXISTING_PERMANENT_DISPLAY_OBJECT_DELETION); | 920 INHIBIT_EXISTING_PERMANENT_DISPLAY_OBJECT_DELETION); |
921 } | 921 } |
922 } | 922 } |
923 | 923 |
924 /* Make sure endpoints remain valid. after-change-functions | 924 /* Make sure endpoints remain valid. after-change-functions |
1090 as translatable, then Fgettext() should be called on obj if it | 1090 as translatable, then Fgettext() should be called on obj if it |
1091 is a string. */ | 1091 is a string. */ |
1092 #endif | 1092 #endif |
1093 | 1093 |
1094 /* Make sure that point-max won't exceed the size of an emacs int. */ | 1094 /* Make sure that point-max won't exceed the size of an emacs int. */ |
1095 if ((length + BUF_Z (buf)) > EMACS_INT_MAX) | 1095 if ((length + BUF_Z (buf)) > MOST_POSITIVE_FIXNUM) |
1096 out_of_memory ("Maximum buffer size exceeded", Qunbound); | 1096 out_of_memory ("Maximum buffer size exceeded", Qunbound); |
1097 | 1097 |
1098 /* theoretically not necessary -- caller should GCPRO. | 1098 /* theoretically not necessary -- caller should GCPRO. |
1099 #### buffer_insert_from_buffer_1() doesn't! */ | 1099 #### buffer_insert_from_buffer_1() doesn't! */ |
1100 GCPRO1 (reloc); | 1100 GCPRO1 (reloc); |