[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Checking before removing obsolete comment about memmove.
From: |
Karl Fogel |
Subject: |
Checking before removing obsolete comment about memmove. |
Date: |
Sun, 28 Nov 2021 02:23:11 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
In src/editfns.c, in Ftranspose_regions, I'd like to remove this
obsolete comment:
/* Working without memmove, for portability (sigh), so must be
careful of overlapping subsections of the array... */
We now use memmove() in that function since [1], just as we now
use memmove() in many other places in Emacs.
(These days memmove() is assumed because C89 is assumed. This
wasn't always the case. Searching backward for "memmove" from the
bottom of src/ChangeLog.4 appears to show some temporary confusion
at the time about whether memmove() was allowed, and if so how it
would be provided; fortunately, that's all settled now.)
The reason I'm posting to ask before removing that comment is that
I'm not sure if we have an anti-churn policy against making
commits that just fix comments. My preference is to fix it now,
and not wait until the next time the actual code of
Ftranspose_regions() needs to be changed, because it's an outright
inaccuracy that might confuse the next reader. But if we've
already decided to leave such things be until the next time
someone is actually working in the code, that's fine and I'll
abide by it (and would be happy to document it in CONTRIBUTE if
people would like that).
Best regards,
-Karl
[1] Namely, since this commit:
commit 354f9f0fc6cc05ed98883447f9b2f37943d79160
Author: Fredrik Bergroth <fbergroth@gmail.com>
AuthorDate: Tue Feb 23 22:41:16 2016 +1100
Commit: Lars Ingebrigtsen <larsi@gnus.org>
CommitDate: Wed Feb 24 11:58:50 2016 +1100
Use memmove instead of memcpy on overlapping regions
* src/editfns.c (Ftranspose_regions): Regions may overlap,
so
use memmove instead of memcpy (bug#19213).
- Checking before removing obsolete comment about memmove.,
Karl Fogel <=