diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-07-13 21:07:06 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-07-13 21:07:06 -0700 |
commit | 1667fea9832ce1101eb69e2c8a38834457144586 (patch) | |
tree | 255cada8fd6c3eaf01a2e3aab021e94559262fcc | |
parent | 753b4a6d7eac7d7f0d46eab124df0aca80431f74 (diff) | |
download | txr-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.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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); |