summaryrefslogtreecommitdiff
path: root/libguile/srfi-13.c
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2013-04-01 05:31:08 -0400
committerMark H Weaver <mhw@netris.org>2013-04-01 05:31:08 -0400
commitde2bc673bba931a70e3b96336cab6512a47541fe (patch)
tree08de633b7cdf30efe90d1df19f3ffece52906b9c /libguile/srfi-13.c
parent786ab4258fbf605f46287da5e7550d3ab4b68589 (diff)
downloadguile-de2bc673bba931a70e3b96336cab6512a47541fe.tar.gz
scm_string_join: properly sequence operations in ADD_TO_APPEND_LIST
* libguile/srfi-13.c (scm_string_join): Properly sequence operations in ADD_TO_APPEND_LIST macro.
Diffstat (limited to 'libguile/srfi-13.c')
-rw-r--r--libguile/srfi-13.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libguile/srfi-13.c b/libguile/srfi-13.c
index e4268879e..4e5d5725f 100644
--- a/libguile/srfi-13.c
+++ b/libguile/srfi-13.c
@@ -439,8 +439,9 @@ SCM_DEFINE (scm_string_join, "string-join", 1, 2, 0,
{
SCM *last_cdr_p = &append_list;
-#define ADD_TO_APPEND_LIST(x) \
- (last_cdr_p = SCM_CDRLOC (*last_cdr_p = scm_list_1 (x)))
+#define ADD_TO_APPEND_LIST(x) \
+ ((*last_cdr_p = scm_list_1 (x)), \
+ (last_cdr_p = SCM_CDRLOC (*last_cdr_p)))
/* Build a list of strings to pass to 'string-append'.
Here we assume that 'ls' has at least one element. */