unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Philipp Stephani <p.stephani2@gmail.com>
Cc: phst@google.com, alan@idiocy.org, emacs-devel@gnu.org
Subject: Re: [PATCH] Allow inserting non-BMP characters
Date: Fri, 29 Dec 2017 22:27:09 +0200	[thread overview]
Message-ID: <83incpfffm.fsf@gnu.org> (raw)
In-Reply-To: <CAArVCkTqGP-=3VQem3LtyTFjsv=cVrPFOiQY91fxSp3AJLBEtw@mail.gmail.com> (message from Philipp Stephani on Fri, 29 Dec 2017 20:14:41 +0000)

> From: Philipp Stephani <p.stephani2@gmail.com>
> Date: Fri, 29 Dec 2017 20:14:41 +0000
> Cc: alan@idiocy.org, phst@google.com, emacs-devel@gnu.org
> 
> diff --git a/src/coding.c b/src/coding.c
> index 1705838ffa..9903d87b92 100644
> --- a/src/coding.c
> +++ b/src/coding.c
> @@ -1515,13 +1515,6 @@ encode_coding_utf_8 (struct coding_system *coding)
>  /* See the above "GENERAL NOTES on `detect_coding_XXX ()' functions".
>     Return true if a text is encoded in one of UTF-16 based coding systems.  */
>  
> -#define UTF_16_HIGH_SURROGATE_P(val) \
> -  (((val) & 0xFC00) == 0xD800)
> -
> -#define UTF_16_LOW_SURROGATE_P(val) \
> -  (((val) & 0xFC00) == 0xDC00)
> -
> -
>  static bool
>  detect_coding_utf_16 (struct coding_system *coding,
>  		      struct coding_detection_info *detect_info)
> @@ -1686,7 +1679,7 @@ decode_coding_utf_16 (struct coding_system *coding)
>  
>        if (surrogate)
>  	{
> -	  if (! UTF_16_LOW_SURROGATE_P (c))
> +	  if (! char_low_surrogate_p (c))

Please don't.  This makes decoding UTF-16 a tad slower for no good
reason (more than a tad in unoptimized builds).

(Why can't you just accept what I'm saying?  Don't my position and my
experience mean anything to you?)



  reply	other threads:[~2017-12-29 20:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAArVCkRx8p_vaFKJ_kXRuoZCKVBSYr=94RJANGpU0NXvkEZv6A@mail.gmail.com>
2017-12-25 21:01 ` [PATCH] Allow inserting non-BMP characters Philipp Stephani
2017-12-26  1:26   ` Alan Third
2017-12-26  4:46   ` Eli Zaretskii
2017-12-26 10:35     ` Philipp Stephani
2017-12-26 16:11       ` Eli Zaretskii
2017-12-26 18:50         ` Philipp Stephani
2017-12-26 20:22           ` Eli Zaretskii
2017-12-26 21:36             ` Alan Third
2017-12-27  3:41               ` Eli Zaretskii
2017-12-28 11:38                 ` Alan Third
2017-12-28 12:31                   ` Philipp Stephani
2017-12-28 16:29                     ` Eli Zaretskii
2017-12-29 20:14                       ` Philipp Stephani
2017-12-29 20:27                         ` Eli Zaretskii [this message]
2018-01-07 15:51                           ` Philipp Stephani
2018-01-07 17:40                             ` Eli Zaretskii
2018-01-07 18:44                               ` Philipp Stephani

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=83incpfffm.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=alan@idiocy.org \
    --cc=emacs-devel@gnu.org \
    --cc=p.stephani2@gmail.com \
    --cc=phst@google.com \
    /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).