diff options
Diffstat (limited to 'libguile/srfi-4.i.c')
-rw-r--r-- | libguile/srfi-4.i.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libguile/srfi-4.i.c b/libguile/srfi-4.i.c index 1df4c3651..ca181a1df 100644 --- a/libguile/srfi-4.i.c +++ b/libguile/srfi-4.i.c @@ -18,7 +18,9 @@ - CTYPE - The C type of the elements, for example scm_t_uint8. + The C type of the elements, for example scm_t_uint8. The code + below will never do sizeof (CTYPE), thus you can use just 'float' + for the c32 type, for example. */ /* The first level does not expand macros in the arguments. */ @@ -56,7 +58,7 @@ SCM_DEFINE (F(scm_make_,TAG,vector), "make-"S(TAG)"vector", 1, 1, 0, SCM F(scm_take_,TAG,vector) (const CTYPE *data, size_t n) { - scm_gc_register_collectable_memory ((void *)data, n*sizeof(CTYPE), + scm_gc_register_collectable_memory ((void *)data, n*uvec_sizes[TYPE], uvec_names[TYPE]); return take_uvec (TYPE, data, n); } |