summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2023-03-23 01:08:30 -0700
committerKaz Kylheku <kaz@kylheku.com>2023-03-23 01:08:30 -0700
commit5861192436b31f7377bd82cacb7acc8cc8baf4f9 (patch)
treeb17201577e1ef5aaec62da6c0d1a41dec00946bc /lib.c
parentc6a32a5aafa0b85318ef1262f464ba270e3da71c (diff)
downloadtxr-5861192436b31f7377bd82cacb7acc8cc8baf4f9.tar.gz
txr-5861192436b31f7377bd82cacb7acc8cc8baf4f9.tar.bz2
txr-5861192436b31f7377bd82cacb7acc8cc8baf4f9.zip
printer: print tree as #T(...) beyond max depth.
* lib.c (obj_print_impl): For consistenfcy with other aggregates---lists, vectors and hashes---when the maximum depth has been exceeded we should likewise print binary search tree objects as #T(...).
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib.c b/lib.c
index d17e416f..e995fcf0 100644
--- a/lib.c
+++ b/lib.c
@@ -14211,6 +14211,9 @@ val obj_print_impl(val obj, val out, val pretty, struct strm_ctx *ctx)
} else if (structp(obj)) {
put_string(lit("#S(...)"), out);
return obj;
+ } else if (treep(obj)) {
+ put_string(lit("#T(...)"), out);
+ return obj;
}
default:
break;