6
struct roll_value *new_roll_single(int num) {
7
struct roll_value *ret = (struct roll_value*)malloc(
8
sizeof(struct roll_value));
10
ret->values = (int*)malloc(sizeof(int));
15
struct roll_value *new_roll_multi(int count) {
16
struct roll_value *ret = (struct roll_value*)malloc(
17
sizeof(struct roll_value));
19
ret->values = (int*)malloc(sizeof(int)*count);
20
memset(ret->values, 0, sizeof(int)*count);
24
void free_roll(struct roll_value *v) {