summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-07-13 21:07:06 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-07-13 21:07:06 -0700
commit1667fea9832ce1101eb69e2c8a38834457144586 (patch)
tree255cada8fd6c3eaf01a2e3aab021e94559262fcc
parent753b4a6d7eac7d7f0d46eab124df0aca80431f74 (diff)
downloadtxr-1667fea9832ce1101eb69e2c8a38834457144586.tar.gz
txr-1667fea9832ce1101eb69e2c8a38834457144586.tar.bz2
txr-1667fea9832ce1101eb69e2c8a38834457144586.zip
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.
-rw-r--r--rand.c3
1 files changed, 1 insertions, 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);