summaryrefslogtreecommitdiff
path: root/libguile/uniform.c
diff options
context:
space:
mode:
Diffstat (limited to 'libguile/uniform.c')
-rw-r--r--libguile/uniform.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/libguile/uniform.c b/libguile/uniform.c
index a58242d81..f8cd2d37b 100644
--- a/libguile/uniform.c
+++ b/libguile/uniform.c
@@ -132,6 +132,25 @@ SCM_DEFINE (scm_uniform_vector_element_type, "uniform-vector-element-type", 1, 0
}
#undef FUNC_NAME
+SCM_DEFINE (scm_uniform_vector_element_type_code,
+ "uniform-vector-element-type-code", 1, 0, 0,
+ (SCM v),
+ "Return the type of the elements in the uniform vector, @var{v},\n"
+ "as an integer code.")
+#define FUNC_NAME s_scm_uniform_vector_element_type_code
+{
+ scm_t_array_handle h;
+ SCM ret;
+
+ if (!scm_is_uniform_vector (v))
+ scm_wrong_type_arg_msg (FUNC_NAME, SCM_ARG1, v, "uniform vector");
+ scm_array_get_handle (v, &h);
+ ret = scm_from_uint16 (h.element_type);
+ scm_array_handle_release (&h);
+ return ret;
+}
+#undef FUNC_NAME
+
SCM_DEFINE (scm_uniform_vector_element_size, "uniform-vector-element-size", 1, 0, 0,
(SCM v),
"Return the number of bytes allocated to each element in the\n"