+2015-01-19 Eli Zaretskii <eliz@gnu.org>
+
+ * dispnew.c (adjust_glyph_matrix, realloc_glyph_pool): Verify that
+ Qnil is represented as zero, before using that to initialize parts
+ of the glyph structure.
+
+ * xdisp.c (init_iterator): Verify that Qnil is represented as
+ zero, before using that to initialize parts of the iterator
+ structure.
+
2015-01-19 Paul Eggert <eggert@cs.ucla.edu>
Prefer memset to repeatedly assigning Qnil
new_rows = dim.height - matrix->rows_allocated;
matrix->rows = xpalloc (matrix->rows, &matrix->rows_allocated,
new_rows, INT_MAX, sizeof *matrix->rows);
+ /* As a side effect, this sets the object of each glyph in the
+ row to nil, so verify we will indeed get that. Redisplay
+ relies on the object of special glyphs (truncation and
+ continuation glyps and also blanks used to extend each line
+ on a TTY) to be nil. */
+ verify (NIL_IS_ZERO);
memset (matrix->rows + old_alloc, 0,
(matrix->rows_allocated - old_alloc) * sizeof *matrix->rows);
}
ptrdiff_t old_nglyphs = pool->nglyphs;
pool->glyphs = xpalloc (pool->glyphs, &pool->nglyphs,
needed - old_nglyphs, -1, sizeof *pool->glyphs);
+ /* As a side effect, this sets the object of each glyph to nil,
+ so verify we will indeed get that. Redisplay relies on the
+ object of special glyphs (truncation and continuation glyps
+ and also blanks used to extend each line on a TTY) to be
+ nil. */
+ verify (NIL_IS_ZERO);
memset (pool->glyphs + old_nglyphs, 0,
(pool->nglyphs - old_nglyphs) * sizeof *pool->glyphs);
}
}
/* Clear IT. */
+ /* As a side effect, this sets it->object to nil, so verify we will
+ indeed get that. */
+ verify (NIL_IS_ZERO);
memset (it, 0, sizeof *it);
it->current.overlay_string_index = -1;
it->current.dpvec_index = -1;