diff options
author | Andrea Corallo <akrl@sdf.org> | 2019-12-07 10:24:13 +0100 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2020-01-01 11:38:11 +0100 |
commit | e05253cb9bc4a35c7dedc3cbb2830e37d385a339 (patch) | |
tree | 75594e331c74fa00b17f87751e791835fc61a311 /src/lread.c | |
parent | 60a81f44e49c77ef9143a665f94f89109002133d (diff) | |
download | emacs-e05253cb9bc4a35c7dedc3cbb2830e37d385a339.tar.gz emacs-e05253cb9bc4a35c7dedc3cbb2830e37d385a339.tar.bz2 emacs-e05253cb9bc4a35c7dedc3cbb2830e37d385a339.zip |
let intern_c_string works creating with non-pure strings
Diffstat (limited to 'src/lread.c')
-rw-r--r-- | src/lread.c | 12 |
1 files changed, 8 insertions, 4 deletions
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; } |