From 441dbb751b460a9c6f7e92756559dad1b4c3a169 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 13 Jul 2021 21:07:06 -0700 Subject: rand: remove unnecessary type check. * rand.c (make_random_state): We dn't have to use cobj_handle here because the object isn't an argument; we just instantiated in the same scope, with the correct type. --- rand.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rand.c b/rand.c index cad1fd3e..6c73f9cf 100644 --- a/rand.c +++ b/rand.c @@ -139,8 +139,7 @@ val make_random_state(val seed, val warmup) val self = lit("make-random-state"); val rs = make_state(); int i = 0; - struct rand_state *r = coerce(struct rand_state *, - cobj_handle(self, rs, random_state_cls)); + struct rand_state *r = coerce(struct rand_state *, rs->co.handle); seed = default_null_arg(seed); warmup = default_null_arg(warmup); -- cgit v1.2.3