bug-guile
[Top][All Lists]
Advanced

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

Re: bounds of 1-dimensional empty arrays


From: SZAVAI Gyula
Subject: Re: bounds of 1-dimensional empty arrays
Date: Fri, 01 Dec 2006 13:45:56 +0100
User-agent: Mozilla/5.0 (Windows NT 5.1; hu-HU) Thunderbird/1.5 Mnenhy/0.7.4.666

Ludovic Courtès írta:
Thanks for all these bug fixes!  Note that I'm waiting for a few more
days so that I (or someone else) can review all of them in a row.  ;-)

I have these fixes, so don't hurry for me. ;-)

BTW, it would be helpful if you could provide a ChangeLog entry or a
short sentence explaining the fix you propose.

1. negative bounds of literal arrays:
* libguile/unif.c (read_decimal_integer): don't drop sign
(scm_i_read_array): check for negative length

2. generic * and 0:
* libguile/numbers.c (scm_product): don't short-circuit before correct dispatching

However generic * is associative [1]. This should be changed or documented.

3. generic-capability?:
* oop/goops.scm: export generic-capability?

4. contents of empty shared array:
* libguile/unif.c (scm_make_shared_array): empty arrays are contiguous

5. bounds of 1-dimensional empty arrays:
* libguile/unif.c (scm_make_typed_array, scm_make_shared_array): don't drop wrapper object on 1-dimensional empty array if lower bound != 0

+1. array->list has same bug as vector->list, see libguile/unif.c ra2l() [2]



[1]
(use-modules (oop goops))
(define-class <c> ())
(define-method (* a b (c <c>)))
(* 2 3 (make <c>))

Backtrace:
In current input:
  4: 0* [* 2 3 #<<c> ef85b0>]

<unnamed port>:4:1: In procedure * in expression (* 2 3 ...):
<unnamed port>:4:1: No applicable method for #<<generic> * (1)> in call (* 6 #<<
c> ef85b0>)
ABORT: (goops-error)


[2]
(let ((b (make-shared-array #(1) (lambda xs '(0)) 2 2)))
 (array->list b))
==> ((1))





reply via email to

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