unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* [bug #12994] Bug in guile's array-map! transforming single array
@ 2005-05-05 20:40 anonymous
  2005-05-09  0:03 ` Kevin Ryde
  0 siblings, 1 reply; 2+ messages in thread
From: anonymous @ 2005-05-05 20:40 UTC (permalink / raw)



URL:
  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=12994>

                 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:

  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=12994>

_______________________________________________
  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


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

end of thread, other threads:[~2005-05-09  0:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-05 20:40 [bug #12994] Bug in guile's array-map! transforming single array anonymous
2005-05-09  0:03 ` 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).