From: Andrea Corallo Date: Sat, 7 Dec 2019 09:24:13 +0000 (+0100) Subject: let intern_c_string works creating with non-pure strings X-Git-Tag: emacs-28.0.90~2727^2~930 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e05253cb9bc4a35c7dedc3cbb2830e37d385a339;p=emacs.git let intern_c_string works creating with non-pure strings --- diff --git a/src/lread.c b/src/lread.c index bd7182c398f..f280dad97c0 100644 --- a/src/lread.c +++ b/src/lread.c @@ -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; }