1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

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.
This commit is contained in:
Mark H Weaver 2013-04-01 05:31:08 -04:00
parent 786ab4258f
commit de2bc673bb

View file

@ -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. */