summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2013-12-06 08:36:12 -0800
committerKaz Kylheku <kaz@kylheku.com>2013-12-06 08:36:12 -0800
commitb26f98511a911537fef73a1925df6d91a7829b6e (patch)
tree9bc8b1f5288e8116ef1b06f43af1830a3d7ce4f9 /lib.c
parent43fa874fd295b2c765cddd14939a60a47e190148 (diff)
downloadtxr-b26f98511a911537fef73a1925df6d91a7829b6e.tar.gz
txr-b26f98511a911537fef73a1925df6d91a7829b6e.tar.bz2
txr-b26f98511a911537fef73a1925df6d91a7829b6e.zip
Fixing some old-style coding that became obsolete
around November 2009. * lib.c (lazy_str): Use the efficient lit("...") that doesn't allocate memory instead of string(L"..."). (lazy_str_get_trailing_list): Likewise. * stream.c (open_process): Likewise. * txr.c (remove_hash_bang_line): Likewise.
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib.c b/lib.c
index 48349c2e..0c60a4de 100644
--- a/lib.c
+++ b/lib.c
@@ -3896,7 +3896,7 @@ val lazy_str(val lst, val term, val limit)
/* Must init before calling something that can gc! */
obj->ls.opts = obj->ls.list = obj->ls.prefix = nil;
- term = or2(term, string(L"\n"));
+ term = or2(term, lit("\n"));
if (nullp(lst)) {
obj->ls.prefix = null_string;
@@ -4053,7 +4053,7 @@ val lazy_str_get_trailing_list(val lstr, val index)
{
uses_or2;
val split_suffix = split_str(sub_str(lstr->ls.prefix, index, nil),
- or2(car(lstr->ls.opts), string(L"\n")));
+ or2(car(lstr->ls.opts), lit("\n")));
return nappend2(split_suffix, lstr->ls.list);
}