summaryrefslogtreecommitdiff
path: root/libguile/srfi-4.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2010-01-12 00:20:10 +0100
committerAndy Wingo <wingo@pobox.com>2010-01-12 00:20:10 +0100
commitf3a1fc5a9ec0cea5dcd6e505bf9a440ee3651891 (patch)
tree12b4df10223fc3deafd66ac0f6b8ecbcac5fcfa0 /libguile/srfi-4.c
parent136b5494d13fdc4a7b3b59d4bd451beb2c075e25 (diff)
downloadguile-f3a1fc5a9ec0cea5dcd6e505bf9a440ee3651891.tar.gz
fix srfi-4 shared vector access from c
* libguile/srfi-4.c (DEFINE_SRFI_4_C_FUNCS): Fix elements/writable_elements for shared vectors. Thanks to Daniel Llorens del Río for the info.
Diffstat (limited to 'libguile/srfi-4.c')
-rw-r--r--libguile/srfi-4.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libguile/srfi-4.c b/libguile/srfi-4.c
index b807046eb..f9572d04d 100644
--- a/libguile/srfi-4.c
+++ b/libguile/srfi-4.c
@@ -119,13 +119,13 @@
{ \
if (h->element_type != ETYPE (TAG)) \
scm_wrong_type_arg_msg (NULL, 0, h->array, #tag "vector"); \
- return h->elements; \
+ return ((const ctype*) h->elements) + h->base; \
} \
ctype* scm_array_handle_##tag##_writable_elements (scm_t_array_handle *h) \
{ \
if (h->element_type != ETYPE (TAG)) \
scm_wrong_type_arg_msg (NULL, 0, h->array, #tag "vector"); \
- return h->writable_elements; \
+ return ((ctype*) h->writable_elements) + h->base; \
} \
const ctype *scm_##tag##vector_elements (SCM uvec, \
scm_t_array_handle *h, \