summaryrefslogtreecommitdiffstats
path: root/hash.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-09-26 07:05:07 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-09-26 07:05:07 -0700
commit3c524ae5ddf314e12351b393cc7ffc62aed78f8a (patch)
tree84f6dc66ffa8fdb2fa119b28eb445906ddd45b0c /hash.c
parent77e596fe12ffd0b74159e7b9427108d0fc21300c (diff)
downloadtxr-3c524ae5ddf314e12351b393cc7ffc62aed78f8a.tar.gz
txr-3c524ae5ddf314e12351b393cc7ffc62aed78f8a.tar.bz2
txr-3c524ae5ddf314e12351b393cc7ffc62aed78f8a.zip
Use put_char for single character output.
* hash.c (hash_print_op): Replace length 1 put_string calls with put_char. * lib.c (obj_print_impl): Likewise.
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/hash.c b/hash.c
index 40833283..35e22de2 100644
--- a/hash.c
+++ b/hash.c
@@ -491,7 +491,7 @@ static void hash_print_op(val hash, val out, val pretty, struct strm_ctx *ctx)
put_char(chr(' '), out);
obj_print_impl(h->userdata, out, pretty, ctx);
}
- put_string(lit(")"), out);
+ put_char(chr(')'), out);
{
val iter = hash_begin(hash), cell;
cnum max_len = ctx->strm->max_length;
@@ -508,18 +508,18 @@ static void hash_print_op(val hash, val out, val pretty, struct strm_ctx *ctx)
break;
}
- put_string(lit("("), out);
+ put_char(chr('('), out);
obj_print_impl(key, out, pretty, ctx);
if (value) {
- put_string(lit(" "), out);
+ put_char(chr(' '), out);
obj_print_impl(value, out, pretty, ctx);
}
- put_string(lit(")"), out);
+ put_char(chr(')'), out);
}
}
- put_string(lit(")"), out);
+ put_char(chr(')'), out);
if (force_br)
force_break(out);