summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-12-18 08:38:37 -0800
committerKaz Kylheku <kaz@kylheku.com>2014-12-18 08:38:37 -0800
commit756d5ee30683a13d93e0009b3c99c25d939a3ef8 (patch)
tree675ae52a45a5368f31a034a74598dd7de1279215 /lib.c
parent0e696e94cdf30c3b5a14a36f2636d1cfe55d5d34 (diff)
downloadtxr-756d5ee30683a13d93e0009b3c99c25d939a3ef8.tar.gz
txr-756d5ee30683a13d93e0009b3c99c25d939a3ef8.tar.bz2
txr-756d5ee30683a13d93e0009b3c99c25d939a3ef8.zip
* lib.c (copy): Support copying random state objects
vi make_random_state. * txr.1: Updated.
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib.c b/lib.c
index 8c8fd1b2..a4ce5536 100644
--- a/lib.c
+++ b/lib.c
@@ -6093,9 +6093,12 @@ val copy(val seq)
case COBJ:
if (seq->co.cls == hash_s)
return copy_hash(seq);
+ if (seq->co.cls == random_state_s)
+ return make_random_state(seq);
/* fallthrough */
default:
- type_mismatch(lit("copy: ~s is not a sequence"), seq, nao);
+ type_mismatch(lit("copy: cannot copy object of type ~s"),
+ typeof(seq), nao);
}
}