unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: master 02bca34: Utilize new string decoding feature in GTK native input
@ 2022-02-19  9:35 Eli Zaretskii
  2022-02-19 10:09 ` Po Lu
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2022-02-19  9:35 UTC (permalink / raw)
  To: Po Lu; +Cc: emacs-devel

> 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.



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

end of thread, other threads:[~2022-02-19 12:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-19  9:35 master 02bca34: Utilize new string decoding feature in GTK native input Eli Zaretskii
2022-02-19 10:09 ` Po Lu
2022-02-19 12:36   ` Eli Zaretskii
2022-02-19 12:49     ` Po Lu

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).