diff options
| author | Eli Zaretskii | 2011-11-18 14:41:36 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2011-11-18 14:41:36 +0200 |
| commit | 68c95424afadc486ac61ca60a2b0277ab36ae184 (patch) | |
| tree | 650770b3fe0e36678f2470d64dde928d3e016bc5 /src | |
| parent | 015137db608f0678112ae9a69a1a52889d56161d (diff) | |
| download | emacs-68c95424afadc486ac61ca60a2b0277ab36ae184.tar.gz emacs-68c95424afadc486ac61ca60a2b0277ab36ae184.zip | |
Add assertion for hash values of rows.
src/dispnew.c (add_row_entry): Add xassert to verify that ROW's hash code
is valid.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 1 | ||||
| -rw-r--r-- | src/dispnew.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index b394c37354f..9af953b08b1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | hash values of the two rows. | 4 | hash values of the two rows. |
| 5 | (copy_row_except_pointers): Preserve the used[] arrays and the | 5 | (copy_row_except_pointers): Preserve the used[] arrays and the |
| 6 | hash values of the two rows. (Bug#10035) | 6 | hash values of the two rows. (Bug#10035) |
| 7 | (add_row_entry): Add xassert to verify that ROW's hash code is valid. | ||
| 7 | 8 | ||
| 8 | * xdisp.c (row_hash): New function, body extracted from | 9 | * xdisp.c (row_hash): New function, body extracted from |
| 9 | compute_line_metrics. | 10 | 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) | |||
| 4240 | ptrdiff_t i = row->hash % row_table_size; | 4240 | ptrdiff_t i = row->hash % row_table_size; |
| 4241 | 4241 | ||
| 4242 | entry = row_table[i]; | 4242 | entry = row_table[i]; |
| 4243 | xassert (entry || verify_row_hash (row)); | ||
| 4243 | while (entry && !row_equal_p (entry->row, row, 1)) | 4244 | while (entry && !row_equal_p (entry->row, row, 1)) |
| 4244 | entry = entry->next; | 4245 | entry = entry->next; |
| 4245 | 4246 | ||