* intervals.c (temp_set_point_both): Move test into 'eassert',
for speed.
This commit is contained in:
parent
0d5d30295a
commit
ab7ce97832
2 changed files with 4 additions and 2 deletions
|
@ -1,5 +1,8 @@
|
|||
2013-10-09 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* intervals.c (temp_set_point_both): Move test into 'eassert',
|
||||
for speed.
|
||||
|
||||
* lisp.h (eassert): Don't use 'assume'.
|
||||
Sometimes 'assume' wins in performance, and sometimes it loses,
|
||||
so it shouldn't be used all the time. Perhaps we need two
|
||||
|
|
|
@ -1792,8 +1792,7 @@ temp_set_point_both (struct buffer *buffer,
|
|||
ptrdiff_t charpos, ptrdiff_t bytepos)
|
||||
{
|
||||
/* In a single-byte buffer, the two positions must be equal. */
|
||||
if (BUF_ZV (buffer) == BUF_ZV_BYTE (buffer))
|
||||
eassert (charpos == bytepos);
|
||||
eassert (BUF_ZV (buffer) != BUF_ZV_BYTE (buffer) || charpos == bytepos);
|
||||
|
||||
eassert (charpos <= bytepos);
|
||||
eassert (charpos <= BUF_ZV (buffer) || BUF_BEGV (buffer) <= charpos);
|
||||
|
|
Loading…
Add table
Reference in a new issue