unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Antipov <dmantipov@yandex.ru>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Emacs development discussions <emacs-devel@gnu.org>
Subject: CHAR_TO_BYTE in bidi_resolve_explicit_1
Date: Tue, 05 Mar 2013 06:05:44 +0400	[thread overview]
Message-ID: <513552F8.40405@yandex.ru> (raw)

[-- 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.  */


             reply	other threads:[~2013-03-05  2:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-05  2:05 Dmitry Antipov [this message]
2013-03-05  3:51 ` CHAR_TO_BYTE in bidi_resolve_explicit_1 Eli Zaretskii
2013-03-05  9:30   ` Dmitry Antipov
2013-03-05 18:14     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=513552F8.40405@yandex.ru \
    --to=dmantipov@yandex.ru \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).