mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 09:10:22 +02:00
add scm_c_make_struct[v]
* libguile/struct.h (scm_c_make_struct, scm_c_make_structv): New functions with which you can make a struct without consing a rest list. * libguile/struct.c (scm_struct_init): Refactor to take an array of init values, not a list. (scm_make_struct, scm_make_vtable_vtable): Pull the rest arg out into a list and pass it down to the new array-taking functions. * libguile/memoize.c: Remove a neeless #include <alloca>.
This commit is contained in:
parent
ea68d342f1
commit
66e78727d6
3 changed files with 123 additions and 79 deletions
|
@ -147,6 +147,10 @@ SCM_API SCM scm_make_struct_layout (SCM fields);
|
|||
SCM_API SCM scm_struct_p (SCM x);
|
||||
SCM_API SCM scm_struct_vtable_p (SCM x);
|
||||
SCM_API SCM scm_make_struct (SCM vtable, SCM tail_array_size, SCM init);
|
||||
SCM_API SCM scm_c_make_struct (SCM vtable, size_t n_tail, size_t n_inits,
|
||||
scm_t_bits init, ...);
|
||||
SCM_API SCM scm_c_make_structv (SCM vtable, size_t n_tail, size_t n_inits,
|
||||
scm_t_bits init[]);
|
||||
SCM_API SCM scm_make_vtable (SCM fields, SCM printer);
|
||||
SCM_API SCM scm_make_vtable_vtable (SCM extra_fields, SCM tail_array_size, SCM init);
|
||||
SCM_API SCM scm_struct_ref (SCM handle, SCM pos);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue