diff options
author | Andy Wingo <wingo@pobox.com> | 2017-09-25 21:33:22 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2017-09-25 21:54:36 +0200 |
commit | a74d4ee4f6e062ff640f2532c9cfc9977bb68a49 (patch) | |
tree | f76bf42f2d76b4304cde6dc909a74c152336e4b0 /libguile/struct.h | |
parent | f23415589a0e263e34a687b5dad1b1624e949639 (diff) | |
download | guile-a74d4ee4f6e062ff640f2532c9cfc9977bb68a49.tar.gz |
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.
Diffstat (limited to 'libguile/struct.h')
-rw-r--r-- | libguile/struct.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libguile/struct.h b/libguile/struct.h index 257e40e1e..e53bf4f0d 100644 --- a/libguile/struct.h +++ b/libguile/struct.h @@ -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); |