1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00
Commit graph

57 commits

Author SHA1 Message Date
Marius Vollmer
28d4aef1f0 (uvec_fast_ref): Avoid a compiler warning by returning
SCM_BOOL_F if no type matches.
2004-11-02 22:46:26 +00:00
Marius Vollmer
d44ff083ea * srfi-4.h, srfi-4.c (scm_frame_uniform_vector_release): New.
* unif.c (scm_bit_set_star_x, scm_bit_count_star_x): Use it to get
more efficient access to the u32vector.
2004-11-02 20:15:32 +00:00
Marius Vollmer
90d4368c88 (coerce_to_uvec, scm_any_to_u8vector, etc): New.
(scm_uniform_element_size, scm_uniform_vector_length): Do no longer
handle old-style uniform vectors.
2004-11-02 19:34:30 +00:00
Marius Vollmer
cbdc837976 (scm_i_read_homogenous_vector,
scm_i_uniform_vector_prototype): Removed.
(scm_i_uniform_vector_creator): New.
(SCM_UVEC_C32, scm_c32vector, scm_make_c32vector, etc,
SCM_UVEC_C64, scm_c64vector, scm_make_c64vector, etc): New.
Updated all tables and generic functions to support them.
(scm_i_proc_make_u8vector, scm_i_proc_make_s8vector, etc): New.
(scm_init_srfi_4): Initialize them.
2004-10-29 14:10:49 +00:00
Marius Vollmer
faa0036593 * srfi-4.c (take_uvec): New.
(alloc_uvec): Use it.
* srfi-4.h, srfi-4.i.c (scm_take_u8vector, etc): New.
2004-10-27 19:25:14 +00:00
Marius Vollmer
e0e496707b * srfi-4.h, srfi-4.i.c (scm_u8vector_elements, etc): New.
* srfi-4.h, srfi-4.c (scm_uniform_vector_p,
scm_uniform_vector_ref, scm_uniform_vector_set_x,
scm_uniform_vector_to_list, scm_is_uniform_vector,
scm_c_uniform_vector_lengths, scm_c_uniform_vector_size,
scm_uniform_vector_elements, scm_uniform_vector_element_size,
scm_uniform_vector_release): New.
(scm_i_uniform_vector_prototype, scm_i_uniform_vector_tag): New.
(scm_uniform_element_size, scm_uniform_vector_length): Moved here
from unif.h, unif.c and extended to handle both the old and new
uniform vectors.

* unif.h, unif.c (scm_uniform_vector_ref, scm_array_ref): Renamed
the former to the latter.
(scm_uniform_vector_length, scm_uniform_element_size): Moved to
srfi-4.h, srfi-4.c.
(scm_make_uve): Call scm_make_s8vector for #\nul prototype.
(scm_array_p, scm_array_rank, scm_array_dimensions,
scm_transpose_array, scm_enclose_array, scm_array_ref, scm_cvref,
scm_array_set_x, scm_array_contents, scm_uniform_array_read_x,
scm_array_to_list, scm_array_prototype): Handle srfi-4 uniform
vectors.  Removed code for scm_tc7_byvect.
(scm_dimensions_to_uniform_array): Fill array with 0 when
prototype is #\nul.
(scm_i_print_array_dimension, scm_i_legacy_tag,
scm_i_print_array): New.
(scm_raprin1): Call scm_i_print_array for arrays.  Removed code
for scm_tc7_byvect.
2004-10-27 18:11:14 +00:00
Marius Vollmer
f857918291 New files, initially from ../srfi/ but heavily modified. 2004-10-26 16:56:02 +00:00