[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug involving uniform vectors
From: |
Christopher Cramer |
Subject: |
Re: bug involving uniform vectors |
Date: |
Tue, 12 Mar 2002 19:09:42 -0600 |
User-agent: |
Mutt/1.2.5i |
On Tue, Mar 12, 2002 at 12:10:25AM +0100, Marius Vollmer wrote:
> Also, what about
>
> guile> (array? car)
> #t
>
> I'm baffled. How could this happen?
Here's a patch that fixes it.
BTW the change from SCM_BOOL(nprot) to SCM_BOOL_T doesn't actually change
anything, I just thought it was clearer.
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/>
Quoi que vous fassiez, écrasez l'infâme, et aimez qui vous aime.
-- Voltaire