aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2013-10-09 10:56:58 -0700
committerPaul Eggert2013-10-09 10:56:58 -0700
commitab7ce9783297397bba2daaf76f93e6a1186883d0 (patch)
treef48bdf827656a8bf795de00a72c906eec741a195 /src
parent0d5d30295a43e14a63369f637233b30b48cd98ba (diff)
downloademacs-ab7ce9783297397bba2daaf76f93e6a1186883d0.tar.gz
emacs-ab7ce9783297397bba2daaf76f93e6a1186883d0.zip
* intervals.c (temp_set_point_both): Move test into 'eassert',
for speed.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog3
-rw-r--r--src/intervals.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 7800959b091..e4456b2ce2b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,8 @@
12013-10-09 Paul Eggert <eggert@cs.ucla.edu> 12013-10-09 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 * intervals.c (temp_set_point_both): Move test into 'eassert',
4 for speed.
5
3 * lisp.h (eassert): Don't use 'assume'. 6 * lisp.h (eassert): Don't use 'assume'.
4 Sometimes 'assume' wins in performance, and sometimes it loses, 7 Sometimes 'assume' wins in performance, and sometimes it loses,
5 so it shouldn't be used all the time. Perhaps we need two 8 so it shouldn't be used all the time. Perhaps we need two
diff --git a/src/intervals.c b/src/intervals.c
index 69a33867283..a9c4f5aed0b 100644
--- a/src/intervals.c
+++ b/src/intervals.c
@@ -1792,8 +1792,7 @@ temp_set_point_both (struct buffer *buffer,
1792 ptrdiff_t charpos, ptrdiff_t bytepos) 1792 ptrdiff_t charpos, ptrdiff_t bytepos)
1793{ 1793{
1794 /* In a single-byte buffer, the two positions must be equal. */ 1794 /* In a single-byte buffer, the two positions must be equal. */
1795 if (BUF_ZV (buffer) == BUF_ZV_BYTE (buffer)) 1795 eassert (BUF_ZV (buffer) != BUF_ZV_BYTE (buffer) || charpos == bytepos);
1796 eassert (charpos == bytepos);
1797 1796
1798 eassert (charpos <= bytepos); 1797 eassert (charpos <= bytepos);
1799 eassert (charpos <= BUF_ZV (buffer) || BUF_BEGV (buffer) <= charpos); 1798 eassert (charpos <= BUF_ZV (buffer) || BUF_BEGV (buffer) <= charpos);