summaryrefslogtreecommitdiffstats
path: root/lib.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2020-05-30 07:38:12 -0700
committerKaz Kylheku <kaz@kylheku.com>2020-05-30 07:38:12 -0700
commitc5134a9ddba4fd14703d506b0cccd51d823e013e (patch)
tree1d371e0060f94ceb8fc851872d580183542d9a5d /lib.h
parent64ba99161ac55d77b09a72a0a64f2333ab7f0ffb (diff)
downloadtxr-c5134a9ddba4fd14703d506b0cccd51d823e013e.tar.gz
txr-c5134a9ddba4fd14703d506b0cccd51d823e013e.tar.bz2
txr-c5134a9ddba4fd14703d506b0cccd51d823e013e.zip
quasistrings: reduce consing.
Quasistrings compile to code that requires on the sys:fmt-join function to glue strings together. Rewriting that function to avoid converting its arguments from struct args * to a list. * eval.c (fmt_join): Static function removed. * lib.c (cat_str_measure, cat_str_append): more_p parameter changed to int type, which better matches the C style Boolean values it takes. (fmt_join): New external function. * lib.h: Declared. * args.h (args_more_nozap, args_get_nozap): New inline functions allowing multiple iterations over arguments without making a copy.
Diffstat (limited to 'lib.h')
-rw-r--r--lib.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib.h b/lib.h
index 87a5f266..3daba32b 100644
--- a/lib.h
+++ b/lib.h
@@ -852,6 +852,7 @@ val replace_str(val str_in, val items, val from, val to);
val sub_str(val str_in, val from_num, val to_num);
val cat_str(val list, val sep);
val scat(val sep, ...);
+val fmt_join(struct args *args);
val split_str(val str, val sep);
val split_str_keep(val str, val sep, val keep_sep);
val spl(val sep, val arg1, val arg2);