diff options
author | Daniel Llorens <lloda@sarc.name> | 2021-08-16 19:02:43 +0200 |
---|---|---|
committer | Daniel Llorens <lloda@sarc.name> | 2021-08-16 19:02:43 +0200 |
commit | 3df3ba1a2c956bba122328e1fc4be614171a4f42 (patch) | |
tree | d905779c2a31f7909ded18c46462afe65a68e353 /libguile/array-map.c | |
parent | c60601332e8f328b014ac09ebd9b0e1c562f9238 (diff) | |
download | guile-3df3ba1a2c956bba122328e1fc4be614171a4f42.tar.gz |
Remove array contp flag
This flag was set, but never used in Guile, and there was no documented
API to access it.
To check if an array is contiguous, use (array-contents <> #t).
* libguile/arrays.h (scm_i_raw_array): New function.
SCM_I_ARRAY_CONTIGUOUS, SCM_SET_ARRAY_CONTIGUOUS_FLAG,
SCM_CLR_ARRAY_CONTIGUOUS_FLAG, SCM_I_ARRAY_CONTP: Remove.
scm_t_array_dim: Declare here, not in array-handle.h.
SCM_I_ARRAY_NDIM: Shift by one bit since the contp flag isn't there
anymore.
* module/syste/vm/assembler.scm: Match removal of contp flag.
* libguile/arrays.c (scm_i_make_array): Reuse scm_i_raw_array.
(scm_i_ra_set_contp): Remove.
(scm_transpose_array): Don't set or clear the contp flag.
(scm_make_shared_array): Don't set or clear the contp flag.
(scm_make_typed_array): Don't set the contp flag.
* libguile/array-map.c (scm_i_array_rebase): Reuse scm_i_raw_array.
Diffstat (limited to 'libguile/array-map.c')
-rw-r--r-- | libguile/array-map.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libguile/array-map.c b/libguile/array-map.c index 92a249bf9..ce0f7ba09 100644 --- a/libguile/array-map.c +++ b/libguile/array-map.c @@ -667,7 +667,7 @@ SCM scm_i_array_rebase (SCM a, size_t base) { size_t ndim = SCM_I_ARRAY_NDIM (a); - SCM b = scm_words (((scm_t_bits) ndim << 17) + scm_tc7_array, 3 + ndim*3); + SCM b = scm_i_raw_array (ndim); SCM_I_ARRAY_SET_V (b, SCM_I_ARRAY_V (a)); /* FIXME do check base */ SCM_I_ARRAY_SET_BASE (b, base); |