summaryrefslogtreecommitdiff
path: root/libguile/arrays.h
diff options
context:
space:
mode:
authorDaniel Llorens <daniel.llorens@bluewin.ch>2015-02-09 12:11:52 +0100
committerDaniel Llorens <daniel.llorens@bluewin.ch>2016-11-23 11:49:35 +0100
commit4e766795b2412f42a9c71441e6cc0b36d8a4c5dc (patch)
treed88c43b4d11a633d4088c1df31f9892aebb3daa8 /libguile/arrays.h
parentd236d4d33fdab83127a4d72c2b561649a5c46b6c (diff)
downloadguile-4e766795b2412f42a9c71441e6cc0b36d8a4c5dc.tar.gz
Avoid unneeded internal use of array handles
* libguile/arrays.c (scm_shared_array_root): Adopt uniform check order. (scm_shared_array_offset, scm_shared_array_increments): Use the array fields directly just as scm_shared_array_root does. (scm_c_array_rank): Moved from libguile/generalized-arrays.c. Don't use array handles, but follow the same type check sequence as the other array functions (shared-array-root, etc). (scm_array_rank): Moved from libguile/generalized-arrays.h. * libguile/arrays.h: Move prototypes here. * test-suite/tests/arrays.test: Tests for shared-array-offset, shared-array-increments.
Diffstat (limited to 'libguile/arrays.h')
-rw-r--r--libguile/arrays.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/libguile/arrays.h b/libguile/arrays.h
index 5f4059792..a5cd43dc2 100644
--- a/libguile/arrays.h
+++ b/libguile/arrays.h
@@ -52,6 +52,9 @@ SCM_API SCM scm_array_contents (SCM ra, SCM strict);
SCM_API SCM scm_list_to_array (SCM ndim, SCM lst);
SCM_API SCM scm_list_to_typed_array (SCM type, SCM ndim, SCM lst);
+SCM_API size_t scm_c_array_rank (SCM ra);
+SCM_API SCM scm_array_rank (SCM ra);
+
/* internal. */
#define SCM_I_ARRAY_FLAG_CONTIGUOUS (1 << 0)