diff options
Diffstat (limited to 'libguile/unif.c')
-rw-r--r-- | libguile/unif.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libguile/unif.c b/libguile/unif.c index 14438b5f6..7f01f62dd 100644 --- a/libguile/unif.c +++ b/libguile/unif.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,2000,2001,2002,2003,2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,2000,2001,2002,2003,2004, 2005, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -368,9 +368,9 @@ string_set (scm_t_array_handle *h, ssize_t pos, SCM val) { pos += h->base; if (SCM_I_ARRAYP (h->array)) - return scm_c_string_set_x (SCM_I_ARRAY_V (h->array), pos, val); + scm_c_string_set_x (SCM_I_ARRAY_V (h->array), pos, val); else - return scm_c_string_set_x (h->array, pos, val); + scm_c_string_set_x (h->array, pos, val); } static void @@ -380,9 +380,9 @@ bitvector_set (scm_t_array_handle *h, ssize_t pos, SCM val) pos += scm_array_handle_bit_elements_offset (h); mask = 1l << (pos % 32); if (scm_to_bool (val)) - ((scm_t_uint32 *)h->elements)[pos/32] |= mask; + ((scm_t_uint32 *)h->writable_elements)[pos/32] |= mask; else - ((scm_t_uint32 *)h->elements)[pos/32] &= ~mask; + ((scm_t_uint32 *)h->writable_elements)[pos/32] &= ~mask; } static void @@ -861,7 +861,7 @@ SCM_DEFINE (scm_make_shared_array, "make-shared-array", 2, 0, 1, SCM imap; size_t k; ssize_t i; - long old_min, new_min, old_max, new_max; + long old_base, old_min, new_min, old_max, new_max; scm_t_array_dim *s; SCM_VALIDATE_REST_ARGUMENT (dims); @@ -873,7 +873,7 @@ SCM_DEFINE (scm_make_shared_array, "make-shared-array", 2, 0, 1, if (SCM_I_ARRAYP (oldra)) { SCM_I_ARRAY_V (ra) = SCM_I_ARRAY_V (oldra); - old_min = old_max = SCM_I_ARRAY_BASE (oldra); + old_base = old_min = old_max = SCM_I_ARRAY_BASE (oldra); s = scm_array_handle_dims (&old_handle); k = scm_array_handle_rank (&old_handle); while (k--) @@ -887,7 +887,7 @@ SCM_DEFINE (scm_make_shared_array, "make-shared-array", 2, 0, 1, else { SCM_I_ARRAY_V (ra) = oldra; - old_min = 0; + old_base = old_min = 0; old_max = scm_c_generalized_vector_length (oldra) - 1; } @@ -909,7 +909,7 @@ SCM_DEFINE (scm_make_shared_array, "make-shared-array", 2, 0, 1, imap = scm_apply_0 (mapfunc, scm_reverse (inds)); i = scm_array_handle_pos (&old_handle, imap); - SCM_I_ARRAY_BASE (ra) = new_min = new_max = i + SCM_I_ARRAY_BASE (oldra); + SCM_I_ARRAY_BASE (ra) = new_min = new_max = i + old_base; indptr = inds; k = SCM_I_ARRAY_NDIM (ra); while (k--) |