guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: guile arrays in 1.9


From: Daniel Llorens del Río
Subject: Re: guile arrays in 1.9
Date: Fri, 8 Jan 2010 18:41:45 +0100


On 7 Jan, 2010, at 17:29, Andy Wingo wrote:

Could be that the tests are running only with the interpreter, and the
bugs that you're seeing only appear when an array is attempted to be
serialized out to object code.

Mm, I don't know how to debug that…

You are :-))

Just so… :)

More. In 1.8.7:

> (array? 1.0)
#f
> (array? 1)
#f

However, in 1.9.6:

> (array? 1.0)
#t
> (array? 1)
#f

This breaks generalized-vector?, because it depends on scm_is_array():

> (generalized-vector? 1)
#f
> (generalized-vector? 1.0)
ERROR: Wrong type (expecting string): 1.0

I think this is a bug and the behavior of 1.8.7 should be kept, i.e. (array? 1.0) should be false. In fact, I have code that depends on (generalized-vector? 1.0) being false. But scm_is_array() calls scm_i_array_implementation_for_obj() and I don't understand that function.

Thanks,

        Daniel





reply via email to

[Prev in Thread] Current Thread [Next in Thread]