1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 12:21:25 -08:00

let intern_c_string works creating with non-pure strings

This commit is contained in:
Andrea Corallo 2019-12-07 10:24:13 +01:00
parent 60a81f44e4
commit e05253cb9b

View file

@ -4198,10 +4198,14 @@ intern_c_string_1 (const char *str, ptrdiff_t len)
if (!SYMBOLP (tem))
{
/* Creating a non-pure string from a string literal not implemented yet.
We could just use make_string here and live with the extra copy. */
eassert (!NILP (Vpurify_flag));
tem = intern_driver (make_pure_c_string (str, len), obarray, tem);
Lisp_Object string;
if (NILP (Vpurify_flag))
string = make_string (str, len);
else
string = make_pure_c_string (str, len);
tem = intern_driver (string, obarray, tem);
}
return tem;
}