Mercurial > emacs
changeset 21523:33d800bf97c3
(Fsubstring, substring_both, Fchar_table_range,
Fset_char_table_range): Fix mixing of Lisp_Object and int.
author | Andreas Schwab <schwab@suse.de> |
---|---|
date | Tue, 14 Apr 1998 12:59:32 +0000 |
parents | 48def841655f |
children | e4ab93e19658 |
files | src/fns.c |
diffstat | 1 files changed, 15 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/fns.c Tue Apr 14 12:58:24 1998 +0000 +++ b/src/fns.c Tue Apr 14 12:59:32 1998 +0000 @@ -975,8 +975,8 @@ res = make_specified_string (XSTRING (string)->data + from_byte, to_char - from_char, to_byte - from_byte, STRING_MULTIBYTE (string)); - copy_text_properties (from_char, to_char, string, - make_number (0), res, Qnil); + copy_text_properties (make_number (from_char), make_number (to_char), + string, make_number (0), res, Qnil); } else res = Fvector (to_char - from_char, @@ -1016,7 +1016,8 @@ res = make_specified_string (XSTRING (string)->data + from_byte, to - from, to_byte - from_byte, STRING_MULTIBYTE (string)); - copy_text_properties (from, to, string, make_number (0), res, Qnil); + copy_text_properties (make_number (from), make_number (to), + string, make_number (0), res, Qnil); } else res = Fvector (to - from, @@ -1763,12 +1764,15 @@ charset_info = Fget (range, Qcharset); CHECK_VECTOR (charset_info, 0); - return Faref (char_table, XVECTOR (charset_info)->contents[0] + 128); + return Faref (char_table, + make_number (XINT (XVECTOR (charset_info)->contents[0]) + + 128)); } else if (VECTORP (range)) { if (XVECTOR (range)->size == 1) - return Faref (char_table, XVECTOR (range)->contents[0] + 128); + return Faref (char_table, + make_number (XINT (XVECTOR (range)->contents[0]) + 128)); else { int size = XVECTOR (range)->size; @@ -1808,7 +1812,9 @@ charset_info = Fget (range, Qcharset); CHECK_VECTOR (charset_info, 0); - return Faset (char_table, XVECTOR (charset_info)->contents[0] + 128, + return Faset (char_table, + make_number (XINT (XVECTOR (charset_info)->contents[0]) + + 128), value); } else if (INTEGERP (range)) @@ -1816,7 +1822,9 @@ else if (VECTORP (range)) { if (XVECTOR (range)->size == 1) - return Faset (char_table, XVECTOR (range)->contents[0] + 128, value); + return Faset (char_table, + make_number (XINT (XVECTOR (range)->contents[0]) + 128), + value); else { int size = XVECTOR (range)->size;