diff --git a/libguile/list.c b/libguile/list.c index 50cdc4008..006fb988b 100644 --- a/libguile/list.c +++ b/libguile/list.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,2000,2001,2002,2003,2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,2000,2001,2002,2003,2004,2006 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -544,6 +544,16 @@ SCM_SNARF_DOCS (register, scm_list_copy, "list", (SCM objs), 0, 0, 1, "Return a list containing @var{objs}, the arguments to\n" "@code{list}.") +/* This used to be the code for "list", but it's wrong when used via apply + (it should copy the list). It seems pretty unlikely anyone would have + been using this from C code, since it's a no-op, but keep it for strict + binary compatibility. */ +SCM +scm_list (SCM objs) +{ + return objs; +} + /* membership tests (memq, memv, etc.) */ diff --git a/libguile/list.h b/libguile/list.h index ce9752c27..e198d0b26 100644 --- a/libguile/list.h +++ b/libguile/list.h @@ -2,7 +2,7 @@ #ifndef LISTH #define LISTH -/* Copyright (C) 1995,1996,1997, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997, 2000, 2001, 2006 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -54,6 +54,7 @@ extern SCM scm_list_3 (SCM e1, SCM e2, SCM e3); extern SCM scm_list_4 (SCM e1, SCM e2, SCM e3, SCM e4); extern SCM scm_list_5 (SCM e1, SCM e2, SCM e3, SCM e4, SCM e5); extern SCM scm_list_n (SCM elt, ...); +extern SCM scm_list (SCM objs); extern SCM scm_list_head (SCM lst, SCM k); extern SCM scm_list (SCM objs); extern SCM scm_cons_star (SCM arg, SCM objs);