]> code.delx.au - gnu-emacs/blobdiff - src/charset.c
Simplify stack-allocated Lisp objects, and make them more portable.
[gnu-emacs] / src / charset.c
index a7bae9d7b017a6ebb67ea32a484ef3159d08f507..dee67a30c2ef047db63c069454b0ba0efe7847bf 100644 (file)
@@ -490,7 +490,7 @@ load_charset_map_from_file (struct charset *charset, Lisp_Object mapfile,
   int n_entries;
   ptrdiff_t count;
 
-  suffixes = list2 (build_string (".map"), build_string (".TXT"));
+  suffixes = scoped_list2 (SCOPED_STRING (".map"), SCOPED_STRING (".TXT"));
 
   count = SPECPDL_INDEX ();
   record_unwind_protect_nothing ();
@@ -1569,7 +1569,7 @@ only `ascii', `eight-bit-control', and `eight-bit-graphic'.  */)
 
   from_byte = CHAR_TO_BYTE (from);
 
-  charsets = make_local_vector (charset_table_used, Qnil);
+  charsets = Fmake_vector (make_number (charset_table_used), Qnil);
   while (1)
     {
       find_charsets_in_text (BYTE_POS_ADDR (from_byte), stop - from,
@@ -1606,7 +1606,7 @@ only `ascii', `eight-bit-control', and `eight-bit-graphic'. */)
 
   CHECK_STRING (str);
 
-  charsets = make_local_vector (charset_table_used, Qnil);
+  charsets = Fmake_vector (make_number (charset_table_used), Qnil);
   find_charsets_in_text (SDATA (str), SCHARS (str), SBYTES (str),
                         charsets, table,
                         STRING_MULTIBYTE (str));