aboutsummaryrefslogtreecommitdiffstats
path: root/src/zset.c
blob: 9bb27782c9e069de05071371693e5dfc176bf20f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* See LICENSE file for copyright and license details. */
#include "internals.h"


void
zset(z_t a, z_t b)
{
	if (EXPECT(b->sign == 0, 0)) {
		a->sign = 0;
	} else {
		a->sign = b->sign;
		a->used = b->used;
		ENSURE_SIZE(a, b->used);
		zmemcpy(a->chars, b->chars, b->used);
	}
}