unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Christopher Cramer <crayc@pyro.net>
Cc: guile-devel@gnu.org, guile-user@gnu.org, bug-guile@gnu.org
Subject: Re: Strange behaviour of array?
Date: Fri, 15 Nov 2002 02:12:13 -0600	[thread overview]
Message-ID: <20021115021213.B12469@kiwi.pyrotechnics.com> (raw)
In-Reply-To: <20021105115705.GA6539@www>; from tomas@fabula.de on Tue, Nov 05, 2002 at 12:57:06PM +0100

On Tue, Nov 05, 2002 at 12:57:06PM +0100, tomas@fabula.de wrote:
> It seems that many non-immediate values returns #t on array?. Looking
> at the source (libguile/unif.c, around line 280) kind of semi-confirms
> this (as far as I understand this tagging business).
> 
> This is against guile 1.6.0 as released (I haven't the time to check
> now against CVS for lack of a suitable autoconf :-(

I distinctly remember sending a patch to fix this to either bug-guile or
guile-devel a loooong time ago, but I can't find it in the archives. I'm
surprised it's not fixed in 1.6.0, but maybe it's because I never sent
the patch in...

Index: libguile/unif.c
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/libguile/unif.c,v
retrieving revision 1.120.2.5
diff -u -r1.120.2.5 unif.c
--- libguile/unif.c	22 Feb 2002 23:04:15 -0000	1.120.2.5
+++ libguile/unif.c	13 Mar 2002 00:57:19 -0000
@@ -295,7 +295,7 @@
   int enclosed;
   nprot = SCM_UNBNDP (prot);
   enclosed = 0;
-  if (SCM_IMP (v))
+  if (SCM_IMP (v) || (!SCM_ARRAYP(v) && !SCM_VECTORP(v)))
     return SCM_BOOL_F;
 
   while (SCM_TYP7 (v) == scm_tc7_smob)
@@ -309,7 +309,7 @@
       v = SCM_ARRAY_V (v);
      }
   if (nprot)
-    return SCM_BOOL(nprot);
+    return SCM_BOOL_T;
   else
     {
       int protp = 0;

-- 
Christopher Cramer <crayc@pyro.net> <http://www.pyro.net/~crayc/>
"Gore would have finished ahead by the barest of margins had he pursued
and gained a complete statewide recount." -- Associated Press, 9/6/2002


_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-guile


  reply	other threads:[~2002-11-15  8:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-05 11:57 Strange behaviour of array? tomas
2002-11-15  8:12 ` Christopher Cramer [this message]
2002-11-15  8:46   ` tomas
2002-11-17 15:29   ` Marius Vollmer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021115021213.B12469@kiwi.pyrotechnics.com \
    --to=crayc@pyro.net \
    --cc=bug-guile@gnu.org \
    --cc=guile-devel@gnu.org \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).