Kevin Ryde <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] (Ludovic Courtès) writes: >> >> $ ./pre-inst-guile # i.e., 1.7 >> guile> (define a (make-uniform-array #\nul 10)) >> ERROR: Wrong type (expecting exact integer): #\nul >> ABORT: (wrong-type-arg) > > That's a bug. In 1.6 you could pass chars to array-set! (and fill) > with a #\nul (ie. byte) uniform array, that should still be possible.
Yes and no. It's a bug that (make-uniform-array #\nul 10) fails, but it is was a conscious incompatible change that uniform numeric arrays can no longer store characters. The bug was actually in scm_dimensions_to_uniform_array: when the 'fill' parameter was unspecified, the prototype should have been used for filling, but was not. Thus, I made the following changes: * deprecated.scm (make-uniform-array): Don't pass the prototype as the fill value, dimensions->uniform-array will do the right thing now. See scm_dimensions_to_uniform_array why we need to be tricky about the fill value. * unif.c (scm_dimensions_to_uniform_array): Use the prototype for filling when the fill parameter is omitted, as documented, but turn #\nul into 0 since s8 arrays (signified by a #\nul prototype) can not store characters. -- GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405 _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel