# shz_memcpy2

Source: https://sh4zam.com/api/memory/shz_memcpy2/

```c
SHZ_INLINE void* shz_memcpy2( void* SHZ_RESTRICT dst, const void* SHZ_RESTRICT src, size_t bytes) SHZ_NOEXCEPT;
```

Copies from one 2-byte aligned buffer to another two bytes at a time.

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `dst` | `void *SHZ_RESTRICT` |  |
| `src` | `const void *SHZ_RESTRICT` |  |
| `bytes` | `size_t` |  |

## Returns

`void *`

## Details

The `dst` pointer is returned.

## Warnings

- `dst` and `src` must both be aligned by at least 2 bytes, and `bytes` must be a multiple of 2.
- `dst` and `src` buffers should not be overlapping.

## Availability

- **C++ equivalent:** [`shz::memcpy2`](https://sh4zam.com/api/cpp/#shzmemcpy2)
- **Type-generic form:** none
- **Back-ends:** SH4: dedicated SH4 implementation · SW: portable C · SPU: shared C implementation
- **Defined in:** [`sh4zam/shz_mem.h:129`](https://github.com/gyrovorbis/sh4zam/blob/ba1e30c88d49df0311870b229e1dd860ef26c477/include/sh4zam/shz_mem.h#L129)
- **Module:** [Memory](https://sh4zam.com/api/memory/), section "Specializations"
