summaryrefslogtreecommitdiff
path: root/libguile/vectors.c
diff options
context:
space:
mode:
authorMarius Vollmer <mvo@zagadka.de>2005-01-11 16:55:38 +0000
committerMarius Vollmer <mvo@zagadka.de>2005-01-11 16:55:38 +0000
commit04b87de561cb0fdc41098713e4141916316c1d50 (patch)
treebd9980b32edb8dd057696d5afa721a3d1b416656 /libguile/vectors.c
parent1f366ef7f04cccb99ef26489153a6e3db37cd7fa (diff)
downloadguile-04b87de561cb0fdc41098713e4141916316c1d50.tar.gz
(SCM_ARRAYP, SCM_I_ARRAYP): Renamed former to latter internal
version. Changed all uses. (scm_tc16_array, scm_i_tc16_array, scm_tc16_enclosed_array, scm_i_tc16_enclosed_array, SCM_ARRAY_FLAG_CONTIGUOUS, SCM_I_ARRAY_FLAG_CONTIGUOUS, SCM_ENCLOSE_ARRAYP, SCM_I_ENCLOSE_ARRAYP, SCM_ARRAY_NDIM, SCM_I_ARRAY_NDIM, SCM_ARRAY_CONTP, SCM_I_ARRAY_CONTP, SCM_ARRAY_MEM, SCM_I_ARRAY_MEM, SCM_ARRAY_V, SCM_I_ARRAY_V, SCM_ARRAY_BASE, SCM_I_ARRAY_BASE, SCM_ARRAY_DIMS, SCM_I_ARRAY_DIMS, scm_t_array, scm_i_t_array): Likewise. (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG): Moved from unif.h to unif.c. (scm_c_array_rank): New. (scm_array_rank): Reimplement using it.
Diffstat (limited to 'libguile/vectors.c')
-rw-r--r--libguile/vectors.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/libguile/vectors.c b/libguile/vectors.c
index f0225e6e8..79c20fd0a 100644
--- a/libguile/vectors.c
+++ b/libguile/vectors.c
@@ -43,9 +43,9 @@ scm_is_vector (SCM obj)
{
if (SCM_I_IS_VECTOR (obj))
return 1;
- if (SCM_ARRAYP (obj) && SCM_ARRAY_NDIM (obj) == 1)
+ if (SCM_I_ARRAYP (obj) && SCM_I_ARRAY_NDIM (obj) == 1)
{
- SCM v = SCM_ARRAY_V (obj);
+ SCM v = SCM_I_ARRAY_V (obj);
return SCM_I_IS_VECTOR (v);
}
return 0;
@@ -102,9 +102,9 @@ scm_vector_length (SCM v)
{
if (SCM_I_IS_VECTOR (v))
return scm_from_size_t (SCM_I_VECTOR_LENGTH (v));
- else if (SCM_ARRAYP (v) && SCM_ARRAY_NDIM (v) == 1)
+ else if (SCM_I_ARRAYP (v) && SCM_I_ARRAY_NDIM (v) == 1)
{
- scm_t_array_dim *dim = SCM_ARRAY_DIMS (v);
+ scm_t_array_dim *dim = SCM_I_ARRAY_DIMS (v);
return scm_from_size_t (dim->ubnd - dim->lbnd + 1);
}
else
@@ -196,15 +196,15 @@ scm_c_vector_ref (SCM v, size_t k)
scm_out_of_range (NULL, scm_from_size_t (k));
return (SCM_I_VECTOR_ELTS(v))[k];
}
- else if (SCM_ARRAYP (v) && SCM_ARRAY_NDIM (v) == 1)
+ else if (SCM_I_ARRAYP (v) && SCM_I_ARRAY_NDIM (v) == 1)
{
- scm_t_array_dim *dim = SCM_ARRAY_DIMS (v);
- SCM vv = SCM_ARRAY_V (v);
+ scm_t_array_dim *dim = SCM_I_ARRAY_DIMS (v);
+ SCM vv = SCM_I_ARRAY_V (v);
if (SCM_I_IS_VECTOR (vv))
{
if (k >= dim->ubnd - dim->lbnd + 1)
scm_out_of_range (NULL, scm_from_size_t (k));
- k = SCM_ARRAY_BASE (v) + k*dim->inc;
+ k = SCM_I_ARRAY_BASE (v) + k*dim->inc;
return (SCM_I_VECTOR_ELTS (vv))[k];
}
scm_wrong_type_arg_msg (NULL, 0, v, "non-uniform vector");
@@ -244,15 +244,15 @@ scm_c_vector_set_x (SCM v, size_t k, SCM obj)
scm_out_of_range (NULL, scm_from_size_t (k));
(SCM_I_VECTOR_WELTS(v))[k] = obj;
}
- else if (SCM_ARRAYP (v) && SCM_ARRAY_NDIM (v) == 1)
+ else if (SCM_I_ARRAYP (v) && SCM_I_ARRAY_NDIM (v) == 1)
{
- scm_t_array_dim *dim = SCM_ARRAY_DIMS (v);
- SCM vv = SCM_ARRAY_V (v);
+ scm_t_array_dim *dim = SCM_I_ARRAY_DIMS (v);
+ SCM vv = SCM_I_ARRAY_V (v);
if (SCM_I_IS_VECTOR (vv))
{
if (k >= dim->ubnd - dim->lbnd + 1)
scm_out_of_range (NULL, scm_from_size_t (k));
- k = SCM_ARRAY_BASE (v) + k*dim->inc;
+ k = SCM_I_ARRAY_BASE (v) + k*dim->inc;
(SCM_I_VECTOR_WELTS (vv))[k] = obj;
}
else