summaryrefslogtreecommitdiffstats
path: root/struct.c
diff options
context:
space:
mode:
Diffstat (limited to 'struct.c')
-rw-r--r--struct.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/struct.c b/struct.c
index 71a2984c..cfa3c3b8 100644
--- a/struct.c
+++ b/struct.c
@@ -1251,11 +1251,15 @@ static void struct_inst_print(val obj, val out, val pretty,
val save_mode = test_set_indent_mode(out, num_fast(indent_off),
num_fast(indent_data));
val save_indent, iter, once;
+ int compat = opt_compat && opt_compat <= 154;
- if (pretty) {
+ if (!compat || pretty) {
loc ptr = lookup_static_slot_load(st->self, st, print_s);
if (!nullocp(ptr)) {
- funcall2(deref(ptr), obj, out);
+ if (compat)
+ funcall2(deref(ptr), obj, out);
+ else
+ funcall3(deref(ptr), obj, out, pretty);
return;
}
}