* 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`.
(cherry picked from commit
7e358aa706f9dbfce24304e8a05904538615537f)
/* 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;
else
{
dostounix_filename (beg);
- tem_fn = make_specified_string (beg, -1, p - beg, 0);
+ tem_fn = make_unibyte_string (beg, p - beg);
}
SAFE_FREE ();
return tem_fn;
emacs_gnutls_strerror (err));
}
- Lisp_Object result = make_string_from_bytes ((char *) out.data, out.size,
- out.size);
+ Lisp_Object result = make_unibyte_string ((char *) out.data, out.size);
gnutls_free (out.data);
gnutls_x509_crt_deinit (crt);
{
if (longhand)
{
- tem = intern_driver (make_specified_string (longhand, longhand_chars,
- longhand_bytes, true),
+ tem = intern_driver (make_multibyte_string (longhand, longhand_chars,
+ longhand_bytes),
obarray, tem);
xfree (longhand);
}