aboutsummaryrefslogtreecommitdiffstats
path: root/src/zset.c
blob: b67fe4afae9301c4ecc30e07915c4d21dd83a08f (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 (zzero(b)) {
		SET_SIGNUM(a, 0);
	} else {
		ENSURE_SIZE(a, b->alloced);
		a->sign = b->sign;
		a->used = b->used;
		zmemcpy(a->chars, b->chars, b->used);
	}
}