From 7e358aa706f9dbfce24304e8a05904538615537f Mon Sep 17 00:00:00 2001 From: Mattias EngdegÄrd Date: Tue, 9 Jul 2024 10:01:03 +0200 Subject: Use cheaper string constructors * src/coding.c (make_string_from_utf8): * src/fileio.c (file_name_directory): * src/lread.c (Fintern): * src/gnutls.c (Fgnutls_format_certificate): Use `make_multibyte_string` and `make_unibyte_string` instead of more expensive `make_specified_string` and `make_string_from_bytes`. --- src/coding.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/coding.c') diff --git a/src/coding.c b/src/coding.c index b48164efc69..e42b6b6e720 100644 --- a/src/coding.c +++ b/src/coding.c @@ -6365,7 +6365,7 @@ make_string_from_utf8 (const char *text, ptrdiff_t nbytes) /* If TEXT is a valid UTF-8 string, we can convert it to a Lisp string directly. Otherwise, we need to decode it. */ if (chars == nbytes || bytes == nbytes) - return make_specified_string (text, chars, nbytes, true); + return make_multibyte_string (text, chars, nbytes); else { struct coding_system coding; -- cgit v1.2.1