summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2006-02-02 21:15:48 +0000
committerKevin Ryde <user42@zip.com.au>2006-02-02 21:15:48 +0000
commit303bddc8798d99026ebe3fb379c2e63a7edac359 (patch)
treeaecb3fe1247e34f97733a6239dc0398084426d8c
parent1443643fd84f8c595ad73cb6eb25906e8fdd2728 (diff)
downloadguile-303bddc8798d99026ebe3fb379c2e63a7edac359.tar.gz
(scm_list): Restore this function for use from C.
It's a complete no-op but in theory might used by someone.
-rw-r--r--libguile/list.c10
-rw-r--r--libguile/list.h3
2 files changed, 12 insertions, 1 deletions
diff --git a/libguile/list.c b/libguile/list.c
index 9799dabee..a1a79a43a 100644
--- a/libguile/list.c
+++ b/libguile/list.c
@@ -570,6 +570,16 @@ SCM_SNARF_DOCS (primitive, 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 16d7454a5..e48b97aa6 100644
--- a/libguile/list.h
+++ b/libguile/list.h
@@ -3,7 +3,7 @@
#ifndef SCM_LIST_H
#define SCM_LIST_H
-/* Copyright (C) 1995,1996,1997,2000,2001,2003,2004
+/* Copyright (C) 1995,1996,1997,2000,2001,2003,2004,2006
* Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
@@ -33,6 +33,7 @@ SCM_API SCM scm_list_3 (SCM e1, SCM e2, SCM e3);
SCM_API SCM scm_list_4 (SCM e1, SCM e2, SCM e3, SCM e4);
SCM_API SCM scm_list_5 (SCM e1, SCM e2, SCM e3, SCM e4, SCM e5);
SCM_API SCM scm_list_n (SCM elt, ...);
+SCM_API SCM scm_list (SCM objs);
SCM_API SCM scm_list_head (SCM lst, SCM k);
SCM_API SCM scm_make_list (SCM n, SCM init);
SCM_API SCM scm_cons_star (SCM arg, SCM objs);