diff options
| author | Mattias EngdegÄrd | 2024-07-09 10:01:03 +0200 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2024-07-09 18:31:46 +0200 |
| commit | 7e358aa706f9dbfce24304e8a05904538615537f (patch) | |
| tree | 60263694e626332211914fcbca8048bbbd23072b /src/coding.c | |
| parent | acfc3884bf58f7b407c42c8751affbcb365eb105 (diff) | |
| download | emacs-7e358aa706f9dbfce24304e8a05904538615537f.tar.gz emacs-7e358aa706f9dbfce24304e8a05904538615537f.zip | |
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`.
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
| 6365 | /* If TEXT is a valid UTF-8 string, we can convert it to a Lisp | 6365 | /* If TEXT is a valid UTF-8 string, we can convert it to a Lisp |
| 6366 | string directly. Otherwise, we need to decode it. */ | 6366 | string directly. Otherwise, we need to decode it. */ |
| 6367 | if (chars == nbytes || bytes == nbytes) | 6367 | if (chars == nbytes || bytes == nbytes) |
| 6368 | return make_specified_string (text, chars, nbytes, true); | 6368 | return make_multibyte_string (text, chars, nbytes); |
| 6369 | else | 6369 | else |
| 6370 | { | 6370 | { |
| 6371 | struct coding_system coding; | 6371 | struct coding_system coding; |