From: Eli Zaretskii Date: Fri, 18 Nov 2011 12:41:36 +0000 (+0200) Subject: Add assertion for hash values of rows. X-Git-Tag: emacs-pretest-24.0.92~149 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=68c95424afadc486ac61ca60a2b0277ab36ae184;p=emacs.git Add assertion for hash values of rows. src/dispnew.c (add_row_entry): Add xassert to verify that ROW's hash code is valid. --- diff --git a/src/ChangeLog b/src/ChangeLog index b394c37354f..9af953b08b1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -4,6 +4,7 @@ hash values of the two rows. (copy_row_except_pointers): Preserve the used[] arrays and the hash values of the two rows. (Bug#10035) + (add_row_entry): Add xassert to verify that ROW's hash code is valid. * xdisp.c (row_hash): New function, body extracted from compute_line_metrics. diff --git a/src/dispnew.c b/src/dispnew.c index 07843d3e214..d6bf6666ee2 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -4240,6 +4240,7 @@ add_row_entry (struct glyph_row *row) ptrdiff_t i = row->hash % row_table_size; entry = row_table[i]; + xassert (entry || verify_row_hash (row)); while (entry && !row_equal_p (entry->row, row, 1)) entry = entry->next;