diff options
author | Mark H Weaver <mhw@netris.org> | 2013-04-01 05:31:08 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2013-04-01 05:31:08 -0400 |
commit | de2bc673bba931a70e3b96336cab6512a47541fe (patch) | |
tree | 08de633b7cdf30efe90d1df19f3ffece52906b9c | |
parent | 786ab4258fbf605f46287da5e7550d3ab4b68589 (diff) | |
download | guile-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.
-rw-r--r-- | libguile/srfi-13.c | 5 |
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. */ |