diff options
author | Andy Wingo <wingo@pobox.com> | 2009-12-29 12:35:13 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2009-12-29 13:29:02 +0100 |
commit | c5f171027d9b237630a71dc43d4b1b3dc391c591 (patch) | |
tree | 9724129d2456c288271eac7df2624289faf62ff3 /libguile/strings.c | |
parent | a1dcb961a6d819c154cfa5767ce4193f31cf29b3 (diff) | |
download | guile-c5f171027d9b237630a71dc43d4b1b3dc391c591.tar.gz |
fix bug in string array implementation type mask
* libguile/strings.c (SCM_ARRAY_IMPLEMENTATION): The mask for the string
array implementation should be 0x7f, without masking out 0x2.
Otherwise numbers were being thought to be vectors!
* test-suite/tests/unif.test: Add test.
* libguile/vectors.c (SCM_ARRAY_IMPLEMENTATION): Only register one
implementation, because weak vectors can be checked with the mask &
~2, and the functions are the same.
Diffstat (limited to 'libguile/strings.c')
-rw-r--r-- | libguile/strings.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libguile/strings.c b/libguile/strings.c index 711da9c7e..3151bbeb1 100644 --- a/libguile/strings.c +++ b/libguile/strings.c @@ -1891,7 +1891,7 @@ string_get_handle (SCM v, scm_t_array_handle *h) h->elements = h->writable_elements = NULL; } -SCM_ARRAY_IMPLEMENTATION (scm_tc7_string, 0x7f & ~2, +SCM_ARRAY_IMPLEMENTATION (scm_tc7_string, 0x7f, string_handle_ref, string_handle_set, string_get_handle) SCM_VECTOR_IMPLEMENTATION (SCM_ARRAY_ELEMENT_TYPE_CHAR, scm_make_string) |