[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 28bf387: Tweak Fdirectory_append for efficiency

From: Eli Zaretskii
Subject: Re: master 28bf387: Tweak Fdirectory_append for efficiency
Date: Sat, 24 Jul 2021 19:58:48 +0300

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: emacs-devel@gnu.org
> Date: Sat, 24 Jul 2021 18:49:43 +0200
> Eli Zaretskii <eliz@gnu.org> writes:
> > I actually don't understand the call to make_multibyte_string in that
> > loop, either.  Can you tell why you needed to convert unibyte strings?
> So that when constructing the final string all the elements have the
> same(ish) multibytedness.

Why not just require that up front?  It makes no sense to append
strings of different multibytedness to make a single file name from
them.  The only cases that make sense to me are:

  . all the strings are multibyte
  . some of the strings are multibyte, and some unibyte and pure-ASCII
  . all the strings are unibyte

The last case can happen when we call this function very early during
the startup process, before we set up the file-encoding stuff, and
thus all the file names are unibyte strings.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]