unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* CHAR_TO_BYTE in bidi_resolve_explicit_1
@ 2013-03-05  2:05 Dmitry Antipov
  2013-03-05  3:51 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Antipov @ 2013-03-05  2:05 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Emacs development discussions

[-- Attachment #1: Type: text/plain, Size: 124 bytes --]

Eli,

I suspect that this call to CHAR_TO_BYTE in bidi_resolve_explicit_1
is redundant; can you check that?

Thanks,
Dmitry

[-- Attachment #2: bidi_resolve_explicit_1.patch --]
[-- Type: text/plain, Size: 457 bytes --]

=== modified file 'src/bidi.c'
--- src/bidi.c	2013-02-20 05:18:20 +0000
+++ src/bidi.c	2013-03-05 02:01:17 +0000
@@ -1360,8 +1360,8 @@
       else
 	{
 	  if (bidi_it->charpos < BEGV)
-	    bidi_it->charpos = BEGV;
-	  bidi_it->bytepos = CHAR_TO_BYTE (bidi_it->charpos);
+	    bidi_it->charpos = BEGV, bidi_it->bytepos = BEGV_BYTE;
+	  eassert (bidi_it->bytepos == CHAR_TO_BYTE (bidi_it->charpos));
 	}
     }
   /* Don't move at end of buffer/string.  */


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-03-05 18:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-05  2:05 CHAR_TO_BYTE in bidi_resolve_explicit_1 Dmitry Antipov
2013-03-05  3:51 ` Eli Zaretskii
2013-03-05  9:30   ` Dmitry Antipov
2013-03-05 18:14     ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).