diff options
Diffstat (limited to 'rand.c')
-rw-r--r-- | rand.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -69,11 +69,17 @@ val random_state_s, random_state_var_s, random_warmup_s; struct cobj_class *random_state_cls; +static val random_state_clone(val rand_state) +{ + return make_random_state(rand_state, nil); +} + static struct cobj_ops random_state_ops = cobj_ops_init(eq, cobj_print_op, cobj_destroy_free_op, cobj_mark_op, - cobj_eq_hash_op); + cobj_eq_hash_op, + random_state_clone); /* Source: bits from /dev/random on a Linux server */ static rand32_t rand_tab[16] = { |