From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: anonymous Newsgroups: gmane.lisp.guile.bugs Subject: [bug #12994] Bug in guile's array-map! transforming single array Date: Thu, 5 May 2005 20:40:33 +0000 Message-ID: <20050505-164033.sv0.19870@savannah.gnu.org> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1115325844 7923 80.91.229.2 (5 May 2005 20:44:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 5 May 2005 20:44:04 +0000 (UTC) Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu May 05 22:44:01 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DTnAq-0005HZ-F1 for guile-bugs@m.gmane.org; Thu, 05 May 2005 22:42:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DTnIO-0000hQ-6W for guile-bugs@m.gmane.org; Thu, 05 May 2005 16:50:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DTnDh-0006wq-5t for bug-guile@gnu.org; Thu, 05 May 2005 16:45:17 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DTnDU-0006u2-2F for bug-guile@gnu.org; Thu, 05 May 2005 16:45:04 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DTnDS-0006me-JN for bug-guile@gnu.org; Thu, 05 May 2005 16:45:02 -0400 Original-Received: from [199.232.41.3] (helo=savannah.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DTnEF-0000Cw-Hx for bug-guile@gnu.org; Thu, 05 May 2005 16:45:51 -0400 Original-Received: from savannah.gnu.org ([127.0.0.1]) by savannah.gnu.org with smtp (Exim 3.35 #1 (Debian)) id 1DTn97-0006Mh-00 for ; Thu, 05 May 2005 16:40:33 -0400 Original-Received: by savannah.gnu.org (sSMTP sendmail emulation); Thu, 5 May 2005 20:40:33 +0000 Original-To: bug-guile@gnu.org X-Savane-Server: savannah.gnu.org:80 [199.232.41.3] X-Savane-Project: guile X-Savane-Tracker: bugs X-Savane-Item-ID: 12994 User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) X-Apparently-From: 131.155.243.133 Original-References: In-Reply-To: X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:2819 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.bugs:2819 URL: Summary: Bug in guile's array-map! transforming single array Project: Guile Submitted by: None Submitted on: Thu 05/05/2005 at 16:40 Category: None Severity: 3 - Normal Item Group: None Status: None Privacy: Public Assigned to: None Open/Closed: Open _______________________________________________________ Details: Hello, I have been using Guile with Cygwin for a while, and with pleasure; recently I tried upgrading from version 1.6.4 to 1.6.5, but with the new version some of my scripts do not work any more. The problem appears to be with array-map!. When I apply it to a single array to do a simple calculation, it complains that "At least one source array is required.", for instance, when I do (define a #(1 2 3 4 5 6)) (define (sqr x) (* x x)) (array-map! a sqr a) I used to get (in Guile 1.6.4): 1 4 9 16 25 36 but in Guile 1.6.5 it no longer works, I get the error message. The cause of this seems to be a change in ./libguile/ramap.c; The first few lines used to read: { SCM_VALIDATE_PROC (2,proc); SCM_VALIDATE_REST_ARGUMENT (lra); switch (SCM_TYP7 (proc)) But in 1.6.5, this has been changed to: { SCM_VALIDATE_PROC (2,proc); if (!(SCM_CONSP (sources) && SCM_CONSP (SCM_CDR (sources)))) { SCM_MISC_ERROR ("At least one source array is required.", SCM_EOL); } switch (SCM_TYP7 (proc)) Why is this? Surely the invocation with a single array was a useful thing to be able to do? Is there a deeper reason for the second SCM_CONSP? Or can we get rid of it? Best regards, Mischa _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ Bug-guile mailing list Bug-guile@gnu.org http://lists.gnu.org/mailman/listinfo/bug-guile