mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
Add struct-ref/unboxed, struct-set!/unboxed
* NEWS: Add news entry. * doc/ref/api-data.texi (Vtables, Structure Basics): Update documentation. * libguile/struct.c (scm_i_struct_equalp): Avoid using struct-ref on unboxed fields. (scm_struct_ref, scm_struct_set_x_unboxed): Issue deprecation warning when accessing unboxed fields. (scm_struct_ref_unboxed, scm_struct_set_x_unboxed): New functions. * libguile/struct.h (scm_struct_ref_unboxed, scm_struct_set_x_unboxed): New functions. * module/oop/goops.scm (class-add-flags!, class-clear-flags!): (class-has-flags?, <class>, %allocate-instance, <slot>): (compute-get-n-set, unboxed-get, unboxed-set, unboxed-slot?): (allocate-slots, %prep-layout!, make-standard-class, initialize): Adapt to access unboxed nfields and flags fields via the new accessors.
This commit is contained in:
parent
f23415589a
commit
a74d4ee4f6
5 changed files with 198 additions and 47 deletions
|
@ -185,6 +185,8 @@ SCM_API SCM scm_make_vtable (SCM fields, SCM printer);
|
|||
SCM_INTERNAL SCM scm_i_make_vtable_vtable (SCM fields);
|
||||
SCM_API SCM scm_struct_ref (SCM handle, SCM pos);
|
||||
SCM_API SCM scm_struct_set_x (SCM handle, SCM pos, SCM val);
|
||||
SCM_API SCM scm_struct_ref_unboxed (SCM handle, SCM pos);
|
||||
SCM_API SCM scm_struct_set_x_unboxed (SCM handle, SCM pos, SCM val);
|
||||
SCM_API SCM scm_struct_vtable (SCM handle);
|
||||
SCM_API SCM scm_struct_vtable_name (SCM vtable);
|
||||
SCM_API SCM scm_set_struct_vtable_name_x (SCM vtable, SCM name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue