Files
gcc/libphobos/libdruntime/rt/arraycat.d
Iain Buclaw e8c9f4ab8f d: Merge upstream dmd, druntime b7e3b3b617
D front-end changes:

	- `delete' is no longer a keyword.
	- Initializing a field with itself has been deprecated.

D runtime changes:

	- Add Windows BCrypt bindings under `core.sys.windows.bcrypt'.

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream b7e3b3b617.

libphobos/ChangeLog:

	* libdruntime/MERGE: Merge upstream b7e3b3b617.
	* libdruntime/Makefile.am (DRUNTIME_DSOURCES_WINDOWS): Add
	core/sys/windows/bcrypt.d.
	* libdruntime/Makefile.in: Regenerate.
	* libdruntime/gcc/sections/elf.d (sizeofTLS): Give function the same
	mangling as gcc.sections.sizeofTLS.
	* libdruntime/gcc/sections/package.d: Import core.internal.traits.
	(pinLoadedLibraries): Mangle as function from rt.sections_elf_shared.
	(unpinLoadedLibraries): Likewise.
	(inheritLoadedLibraries): Likewise.
	(cleanupLoadedLibraries): Likewise.
	(sizeOfTLS): Add forward declaration.
2025-03-15 16:33:00 +01:00

31 lines
821 B
D

/**
* Implementation of array copy support routines.
*
* Copyright: Copyright Digital Mars 2004 - 2016.
* License: Distributed under the
* $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0).
* Authors: Walter Bright, Sean Kelly
* Source: $(DRUNTIMESRC rt/_arraycat.d)
*/
module rt.arraycat;
// debug = PRINTF;
import core.internal.util.array;
import core.stdc.string : memcpy;
debug(PRINTF) import core.stdc.stdio : printf;
extern (C) @trusted nothrow:
void[] _d_arraycopy(size_t size, void[] from, void[] to)
{
debug(PRINTF) printf("f = %p,%zd, t = %p,%zd, size = %zd\n",
from.ptr, from.length, to.ptr, to.length, size);
enforceRawArraysConformable("copy", size, from, to);
memcpy(to.ptr, from.ptr, to.length * size);
return to;
}