Commit 3bfc46eb authored by Dmitry Antipov's avatar Dmitry Antipov

* composite.c (get_composition_id, fill_gstring_header):

Use make_uninit_vector where appropriate.
* font.c (Ffont_get_glyphs, build_style_table): Likewise.
* xselect.c (clean_local_selection_data): Likewise.
parent e0bc0f33
2013-03-05 Dmitry Antipov <dmantipov@yandex.ru>
* composite.c (get_composition_id, fill_gstring_header):
Use make_uninit_vector where appropriate.
* font.c (Ffont_get_glyphs, build_style_table): Likewise.
* xselect.c (clean_local_selection_data): Likewise.
2013-03-04 Paul Eggert <eggert@cs.ucla.edu>
Fix misuse of ImageMagick that caused core dump (Bug#13846).
......
......@@ -234,7 +234,7 @@ get_composition_id (ptrdiff_t charpos, ptrdiff_t bytepos, ptrdiff_t nchars,
key = components;
else if (NILP (components))
{
key = Fmake_vector (make_number (nchars), Qnil);
key = make_uninit_vector (nchars);
if (STRINGP (string))
for (i = 0; i < nchars; i++)
{
......@@ -828,7 +828,7 @@ fill_gstring_header (Lisp_Object header, Lisp_Object start, Lisp_Object end,
if (len <= 8)
header = AREF (gstring_work_headers, len - 1);
else
header = Fmake_vector (make_number (len + 1), Qnil);
header = make_uninit_vector (len + 1);
}
ASET (header, 0, font_object);
......
......@@ -4705,7 +4705,7 @@ the corresponding element is nil. */)
chars = aref_addr (object, XFASTINT (from));
}
vec = Fmake_vector (make_number (len), Qnil);
vec = make_uninit_vector (len);
for (i = 0; i < len; i++)
{
Lisp_Object g;
......@@ -4715,7 +4715,10 @@ the corresponding element is nil. */)
code = font->driver->encode_char (font, c);
if (code == FONT_INVALID_CODE)
continue;
{
ASET (vec, i, Qnil);
continue;
}
g = LGLYPH_NEW ();
LGLYPH_SET_FROM (g, i);
LGLYPH_SET_TO (g, i);
......@@ -4898,7 +4901,7 @@ build_style_table (const struct table_entry *entry, int nelement)
int i, j;
Lisp_Object table, elt;
table = Fmake_vector (make_number (nelement), Qnil);
table = make_uninit_vector (nelement);
for (i = 0; i < nelement; i++)
{
for (j = 0; entry[i].names[j]; j++);
......
......@@ -1903,7 +1903,7 @@ clean_local_selection_data (Lisp_Object obj)
Lisp_Object copy;
if (size == 1)
return clean_local_selection_data (AREF (obj, 0));
copy = Fmake_vector (make_number (size), Qnil);
copy = make_uninit_vector (size);
for (i = 0; i < size; i++)
ASET (copy, i, clean_local_selection_data (AREF (obj, i)));
return copy;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment