bugGuile - Bugs: bug #12994, Bug in guile's array-map!...

 
 

bug #12994: Bug in guile's array-map! transforming single array

Submitted by:  None
Submitted on:  Thu 05 May 2005 08:40:32 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 09 May 2005 12:03:06 AM UTC, comment #1:

The args test was too tight, fixed in 1.6.7.

Kevin Ryde <kryde>
Project Member
Thu 05 May 2005 08:40:32 PM UTC, original submission:

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

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Mon 09 May 2005 12:03:06 AM UTCkrydeStatusNone=>Fixed
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1