[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Strange behaviour of array?
From: |
Christopher Cramer |
Subject: |
Re: Strange behaviour of array? |
Date: |
Fri, 15 Nov 2002 02:12:13 -0600 |
User-agent: |
Mutt/1.2.5i |
On Tue, Nov 05, 2002 at 12:57:06PM +0100, address@hidden 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 <address@hidden> <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