summaryrefslogtreecommitdiff
path: root/src/dispextern.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/dispextern.h')
-rw-r--r--src/dispextern.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/dispextern.h b/src/dispextern.h
index 84111bd9958..5ddc177bcf0 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -792,7 +792,10 @@ enum glyph_row_area
Rows in window matrices on frames having no frame matrices point to
glyphs allocated from the heap via xmalloc;
glyphs[LEFT_MARGIN_AREA] is the start address of the allocated
- glyph structure array. */
+ glyph structure array.
+
+ NOTE: layout of first four members of this structure is important,
+ see clear_glyph_row and copy_row_except_pointers to check why. */
struct glyph_row
{
@@ -812,8 +815,13 @@ struct glyph_row
removed some day, so don't use it in new code. */
struct glyph *glyphs[1 + LAST_AREA];
- /* Number of glyphs actually filled in areas. */
- short used[LAST_AREA];
+ /* Number of glyphs actually filled in areas. This could have size
+ LAST_AREA, but it's 1 + LAST_AREA to simplify offset calculations. */
+ short used[1 + LAST_AREA];
+
+ /* Hash code. This hash code is available as soon as the row
+ is constructed, i.e. after a call to display_line. */
+ unsigned hash;
/* Window-relative x and y-position of the top-left corner of this
row. If y < 0, this means that eabs (y) pixels of the row are
@@ -846,10 +854,6 @@ struct glyph_row
in last row when checking if row is fully visible. */
int extra_line_spacing;
- /* Hash code. This hash code is available as soon as the row
- is constructed, i.e. after a call to display_line. */
- unsigned hash;
-
/* First position in this row. This is the text position, including
overlay position information etc, where the display of this row
started, and can thus be less than the position of the first