2 * Implementation of array copy support routines.
4 * Copyright: Copyright Digital Mars 2004 - 2016.
5 * License: Distributed under the
6 * $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0).
7 * Authors: Walter Bright, Sean Kelly
8 * Source: $(DRUNTIMESRC rt/_arraycat.d)
15 import core
.stdc
.string
;
16 import core
.internal
.util
.array
;
17 debug(PRINTF
) import core
.stdc
.stdio
;
20 extern (C
) @trusted nothrow:
22 void[] _d_arraycopy(size_t size
, void[] from
, void[] to
)
24 debug(PRINTF
) printf("f = %p,%d, t = %p,%d, size = %d\n",
25 from
.ptr
, from
.length
, to
.ptr
, to
.length
, size
);
27 enforceRawArraysConformable("copy", size
, from
, to
);
28 memcpy(to
.ptr
, from
.ptr
, to
.length
* size
);