all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Checking before removing obsolete comment about memmove.
@ 2021-11-28  8:23 Karl Fogel
  2021-11-28  8:46 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Karl Fogel @ 2021-11-28  8:23 UTC (permalink / raw)
  To: Emacs Devel

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).




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-28  8:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-28  8:23 Checking before removing obsolete comment about memmove Karl Fogel
2021-11-28  8:46 ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.