Allow overlapping regions to be passed to `bytevector-copy!'.
authorLudovic Courtès <ludo@gnu.org>
Sun, 20 Nov 2011 00:10:58 +0000 (01:10 +0100)
committerLudovic Courtès <ludo@gnu.org>
Sun, 20 Nov 2011 00:10:58 +0000 (01:10 +0100)
commit8071964943e23700cfe1095ba0f5e3c99f590dee
tree3ed067e04e620eb013fb26f9f7de5863bb6c9eeb
parent7f622b82a2ada4af1f78e27d1ef9ad1498305287
Allow overlapping regions to be passed to `bytevector-copy!'.

Reported by Dmitry Chestnykh <dmitry@codingrobots.com>.
Fixes <http://debbugs.gnu.org/10070>.

* libguile/bytevectors.c (scm_bytevector_copy_x): Use `memmove', not
  `memcpy'.

* test-suite/tests/bytevectors.test ("2.2 General
  Operations")["bytevector-copy! overlapping"]: New test.

* doc/ref/api-data.texi (Bytevector Manipulation): Mention possible
  overlapping.
doc/ref/api-data.texi
libguile/bytevectors.c
test-suite/tests/bytevectors.test