[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bounds of 1-dimensional empty arrays
From: |
SZAVAI Gyula |
Subject: |
bounds of 1-dimensional empty arrays |
Date: |
Thu, 30 Nov 2006 14:21:08 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 5.1; hu-HU) Thunderbird/1.5 Mnenhy/0.7.4.666 |
guile-1.8-20061126
address@hidden()
==> #()
(array-shape (make-array #t '(10 9)))
==> ((0 -1))
(make-shared-array #() (lambda x #f) '(10 9))
==> #()
--- orig/libguile/unif.c 2006-11-29 23:05:46.526091200 +0100
+++ mod/libguile/unif.c 2006-11-30 01:08:03.876683200 +0100
@@ -764,7 +764,7 @@
SCM_I_ARRAY_V (ra) = creator (scm_from_size_t (rlen), fill);
if (1 == SCM_I_ARRAY_NDIM (ra) && 0 == SCM_I_ARRAY_BASE (ra))
- if (s->ubnd < s->lbnd || (0 == s->lbnd && 1 == s->inc))
+ if (0 == s->lbnd && 1 == s->inc)
return SCM_I_ARRAY_V (ra);
return ra;
}
@@ -898,10 +898,7 @@
inds = scm_cons (scm_from_long (s[k].lbnd), inds);
if (s[k].ubnd < s[k].lbnd)
{
- if (1 == SCM_I_ARRAY_NDIM (ra))
- ra = make_typed_vector (scm_array_type (ra), 0);
- else
- SCM_I_ARRAY_V (ra) = make_typed_vector (scm_array_type (ra), 0);
+ SCM_I_ARRAY_V (ra) = make_typed_vector (scm_array_type (ra), 0);
scm_array_handle_release (&old_handle);
return ra;
}
- bounds of 1-dimensional empty arrays,
SZAVAI Gyula <=