GNU bug report logs -
#42296
27.0.91; Correct manual entry for 'concat' w.r.t. allocation [PATCH]
Previous Next
Reported by: Mattias Engdegård <mattiase <at> acm.org>
Date: Thu, 9 Jul 2020 15:55:01 UTC
Severity: normal
Tags: patch
Found in version 27.0.91
Done: Mattias Engdegård <mattiase <at> acm.org>
Bug is archived. No further changes may be made.
Full log
Message #32 received at 42296 <at> debbugs.gnu.org (full text, mbox):
10 juli 2020 kl. 20.08 skrev Eli Zaretskii <eliz <at> gnu.org>:
> Fine with me, except that "should not be altered": I object to that,
> unless we explain why. My proposed text included such an explanation;
> without it, this looks like another dogma that someone sooner or later
> will come up and challenge.
Let's try again then, elaborating the second paragraph:
This function does not always allocate a new string. Callers should
not rely on the result being a new string nor on it being @code{eq}
to an existing string.
In particular, the returned value should not be altered, because doing
so may inadvertently change another string, alter a constant string in
the program, or even raise an error. To obtain a string that can be
mutated, use @code{copy-sequence} on the result.
This bug report was last modified 4 years and 312 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.