summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/composite.c4
-rw-r--r--src/font.c9
-rw-r--r--src/xselect.c2
4 files changed, 16 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 08fd647074f..b511550624f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
+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).
diff --git a/src/composite.c b/src/composite.c
index 2da98cfc36c..8b1f0171a60 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -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);
diff --git a/src/font.c b/src/font.c
index c6707cf31a8..db7bf352c94 100644
--- a/src/font.c
+++ b/src/font.c
@@ -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++);
diff --git a/src/xselect.c b/src/xselect.c
index decea696bfd..5b90d7def22 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -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;