mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 09:10:22 +02:00
* srfi-4.h, srfi-4.c, srfi-4.i.c (scm_i_uniform_vector_ref_proc,
scm_i_uniform_vector_set_proc): New. (u8ref, u8set, s8ref, s8set, etc): New. (uvec_reffers, uvec_setters): New. (uvec_to_list): Use generic scm_array_handle_ref instead of uvec_fast_ref since scm_array_handle_ref should be faster now. More changes like this are upcoming.
This commit is contained in:
parent
9598a4060a
commit
4ea4bc4c40
3 changed files with 45 additions and 3 deletions
|
@ -180,6 +180,18 @@ F(scm_,TAG,vector_writable_elements) (SCM uvec,
|
|||
return F(scm_array_handle_,TAG,_writable_elements) (h);
|
||||
}
|
||||
|
||||
static SCM
|
||||
F(,TAG,ref) (scm_t_array_handle *handle, ssize_t pos)
|
||||
{
|
||||
return uvec_fast_ref (TYPE, handle->elements, pos);
|
||||
}
|
||||
|
||||
static void
|
||||
F(,TAG,set) (scm_t_array_handle *handle, ssize_t pos, SCM val)
|
||||
{
|
||||
uvec_fast_set_x (TYPE, handle->writable_elements, pos, val);
|
||||
}
|
||||
|
||||
#undef paste
|
||||
#undef s_paste
|
||||
#undef stringify
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue