From b26f98511a911537fef73a1925df6d91a7829b6e Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 6 Dec 2013 08:36:12 -0800 Subject: 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. --- lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib.c') 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); } -- cgit v1.2.3