[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
array-set! svect value range check
From: |
Kevin Ryde |
Subject: |
array-set! svect value range check |
Date: |
Sat, 24 Jul 2004 09:56:52 +1000 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux) |
This would be for 1.6, scm_to_short has fixed it in the head. Though
num2short in the head would get the function name into the error, like
the other ivect, uvect etc types get.
* unif.c (scm_array_set_x): For svect, use scm_num2short to get range
check, previously silently truncated inum to short.
Eg. on i386 where short is 16 bits,
(define a (make-uniform-array 's 2))
(array-set! a 65536 1)
(array-ref a 1)
=> 0
where I think array-set! should throw an error since 65536 is too big.
array-fill! does that.
unif.c.svect-set.diff
Description: Text document
unif.test.svect-set.diff
Description: Text document
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- array-set! svect value range check,
Kevin Ryde <=