unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* list versus apply
@ 2005-04-20 22:22 Kevin Ryde
  2005-04-22 23:45 ` Kevin Ryde
  2005-06-05 17:30 ` Marius Vollmer
  0 siblings, 2 replies; 6+ messages in thread
From: Kevin Ryde @ 2005-04-20 22:22 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 267 bytes --]

Looks like list doesn't produce a new list when called through apply,

	(define x '(1 2 3))
	(define y (apply list x))
	(eq? x y)
	=> #t

I'm looking at the fix below.  This removes the C level scm_list, but
that should be ok, it's not documented and does nothing.



[-- Attachment #2: list.c.list.diff --]
[-- Type: text/plain, Size: 791 bytes --]

--- list.c.~1.58.2.7.~	2004-05-02 07:19:23.000000000 +1000
+++ list.c	2005-04-20 16:31:40.725063792 +1000
@@ -117,17 +117,6 @@
 }
 
 
-SCM_DEFINE (scm_list, "list", 0, 0, 1, 
-           (SCM objs),
-	    "Return a list containing @var{objs}, the arguments to\n"
-	    "@code{list}.")
-#define FUNC_NAME s_scm_list
-{
-  return objs;
-}
-#undef FUNC_NAME
-
-
 #if (SCM_DEBUG_DEPRECATED == 0)
 
 SCM_REGISTER_PROC (s_list_star, "list*", 1, 0, 1, scm_cons_star);
@@ -547,6 +536,13 @@
 }
 #undef FUNC_NAME
 
+
+SCM_PROC (s_list, "list", 0, 0, 1, scm_list_copy);
+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}.")
+
+
 \f
 /* membership tests (memq, memv, etc.) */ 
 

[-- Attachment #3: Type: text/plain, Size: 143 bytes --]

_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-06-05 21:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-20 22:22 list versus apply Kevin Ryde
2005-04-22 23:45 ` Kevin Ryde
2005-06-05 17:30 ` Marius Vollmer
2005-06-05 20:37   ` Kevin Ryde
2005-06-05 21:11     ` Marius Vollmer
2005-06-05 21:21       ` Kevin Ryde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).