1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

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.
This commit is contained in:
Andy Wingo 2010-01-12 00:20:10 +01:00
parent 136b5494d1
commit f3a1fc5a9e

View file

@ -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, \