diff options
author | René Scharfe <l.s.r@web.de> | 2017-07-15 21:36:20 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-07-17 14:54:53 -0700 |
commit | 578398071e45d296c3dc1de10acdbc15365e763f (patch) | |
tree | d49c040e24d00c7d1c706e4146e4de2bdae1fa5f /sha1_name.c | |
parent | Git 2.14-rc0 (diff) | |
download | tgif-578398071e45d296c3dc1de10acdbc15365e763f.tar.xz |
add MOVE_ARRAY
Similar to COPY_ARRAY (introduced in 60566cbb58), add a safe and
convenient helper for moving potentially overlapping ranges of array
entries. It infers the element size, multiplies automatically and
safely to get the size in bytes, does a basic type safety check by
comparing element sizes and unlike memmove(3) it supports NULL
pointers iff 0 elements are to be moved.
Also add a semantic patch to demonstrate the helper's intended usage.
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sha1_name.c')
0 files changed, 0 insertions, 0 deletions