unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Po Lu <luangruo@yahoo.com>
Cc: emacs-devel@gnu.org
Subject: Re: master 02bca34: Utilize new string decoding feature in GTK native input
Date: Sat, 19 Feb 2022 11:35:11 +0200	[thread overview]
Message-ID: <83czjjyzao.fsf@gnu.org> (raw)

> commit 02bca34852b1f9dd2b3e5364274452d377686f6a
> Author:     Po Lu <luangruo@yahoo.com>
> AuthorDate: Sat Feb 19 09:18:27 2022 +0800
> Commit:     Po Lu <luangruo@yahoo.com>
> CommitDate: Sat Feb 19 09:18:27 2022 +0800
> 
>     Utilize new string decoding feature in GTK native input
> 
>     * src/gtkutil.c (xg_im_context_commit): Don't decode strings
>     manually using g_utf8_to_ucs4 but pass unibyte string as the
>     keystroke event arg instead.

Is this a good idea?  Consing a string when we process input increases
GC pressure, and what issues does this change solve as a
counter-weight for that disadvantage?  Is g_utf8_to_ucs4 a problematic
API or something?  If so, we could use our own implementation
instead.  But in general, decoding UTF-8 encoded C string is better
done without consing a string and then using the coding.c stuff.
After all, if the original string is 100% guaranteed to be in UTF-8,
the decoding is almost trivial.



             reply	other threads:[~2022-02-19  9:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-19  9:35 Eli Zaretskii [this message]
2022-02-19 10:09 ` master 02bca34: Utilize new string decoding feature in GTK native input Po Lu
2022-02-19 12:36   ` Eli Zaretskii
2022-02-19 12:49     ` Po Lu

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=83czjjyzao.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=luangruo@yahoo.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).