emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r114594: * intervals.c (temp_set_point_both): Move t


From: Paul Eggert
Subject: [Emacs-diffs] trunk r114594: * intervals.c (temp_set_point_both): Move test into 'eassert',
Date: Wed, 09 Oct 2013 17:57:02 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 114594
revision-id: address@hidden
parent: address@hidden
author: Paul Eggert  <address@hidden>
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Wed 2013-10-09 10:56:58 -0700
message:
  * intervals.c (temp_set_point_both): Move test into 'eassert',
  
  for speed.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/intervals.c                intervals.c-20091113204419-o5vbwnq5f7feedwu-519
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-10-09 17:52:38 +0000
+++ b/src/ChangeLog     2013-10-09 17:56:58 +0000
@@ -1,5 +1,8 @@
 2013-10-09  Paul Eggert  <address@hidden>
 
+       * 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

=== modified file 'src/intervals.c'
--- a/src/intervals.c   2013-09-22 09:31:55 +0000
+++ b/src/intervals.c   2013-10-09 17:56:58 +0000
@@ -1792,8 +1792,7 @@
                     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);


reply via email to

[Prev in Thread] Current Thread [Next in Thread]