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 | 441dbb751b460a9c6f7e92756559dad1b4c3a169 (patch) | |
tree | 255cada8fd6c3eaf01a2e3aab021e94559262fcc | |
parent | 947421fd521934af0ba6c769ff9894d537d8b73a (diff) | |
download | txr-441dbb751b460a9c6f7e92756559dad1b4c3a169.tar.gz txr-441dbb751b460a9c6f7e92756559dad1b4c3a169.tar.bz2 txr-441dbb751b460a9c6f7e92756559dad1b4c3a169.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); |