byte-string-ref should return unsigned fixnums (0 <= x <= 255).
This commit is contained in:
parent
d79eab3848
commit
d473552806
4
interp.c
4
interp.c
|
|
@ -24,7 +24,7 @@
|
|||
*/
|
||||
|
||||
static value_t vector_ref(value_t v, fixnum_t idx);
|
||||
static char byte_string_ref(value_t v, fixnum_t idx);
|
||||
static uint8_t byte_string_ref(value_t v, fixnum_t idx);
|
||||
static value_t struct_ref(value_t v, fixnum_t idx);
|
||||
|
||||
static void vector_set(value_t v, fixnum_t idx, value_t newval);
|
||||
|
|
@ -150,7 +150,7 @@ static value_t vector_ref(value_t v, fixnum_t idx)
|
|||
return vec->elements[idx];
|
||||
}
|
||||
|
||||
static char byte_string_ref(value_t v, fixnum_t idx)
|
||||
static uint8_t byte_string_ref(value_t v, fixnum_t idx)
|
||||
{
|
||||
byte_string_t *str = get_byte_string(v);
|
||||
release_assert((idx >= 0) && (idx < str->size));
|
||||
|
|
|
|||
Loading…
Reference in New Issue