diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-06-25 02:25:11 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-06-25 02:25:11 -0700 |
commit | 8d84ffa58f835367ceab1d77d07ff3a72f09378d (patch) | |
tree | 5304193226e5e41fdfe84f2b1a6016d206c0963f /lib.c | |
parent | 9bab9ac8f5634964fe106caace56315b33c06f36 (diff) | |
download | txr-8d84ffa58f835367ceab1d77d07ff3a72f09378d.tar.gz txr-8d84ffa58f835367ceab1d77d07ff3a72f09378d.tar.bz2 txr-8d84ffa58f835367ceab1d77d07ff3a72f09378d.zip |
nullify: handle carray and hashes.
* lib.c (nullify): Add carray and hash subcases into
the COBJ case.
Diffstat (limited to 'lib.c')
-rw-r--r-- | lib.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1011,6 +1011,10 @@ val nullify(val seq) case BUF: return if3(length_buf(seq) != zero, seq, nil); case COBJ: + if (seq->co.cls == carray_s) + return if3(length_carray(seq) != zero, seq, nil); + if (seq->co.cls == hash_s) + return if3(hash_count(seq) != zero, seq, nil); if (obj_struct_p(seq)) { val nullify_meth = maybe_slot(seq, nullify_s); if (nullify_meth) |