Bump actions/upload-artifacts version
[libtommath.git] / s_mp_copy_digs.c
blob4079c33a62fe8d3d3de807b5c05d1fbf4c63a718
1 #include "tommath_private.h"
2 #ifdef S_MP_COPY_DIGS_C
3 /* LibTomMath, multiple-precision integer library -- Tom St Denis */
4 /* SPDX-License-Identifier: Unlicense */
6 #ifdef MP_USE_MEMOPS
7 # include <string.h>
8 #endif
10 void s_mp_copy_digs(mp_digit *d, const mp_digit *s, int digits)
12 #ifdef MP_USE_MEMOPS
13 if (digits > 0) {
14 memcpy(d, s, (size_t)digits * sizeof(mp_digit));
16 #else
17 while (digits-- > 0) {
18 *d++ = *s++;
20 #endif
23 #endif