diff options
author | Andy Wingo <wingo@pobox.com> | 2017-09-22 11:23:00 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2017-09-22 11:35:36 +0200 |
commit | 04f48e94b573eaede0751110c583293cc34cd8f9 (patch) | |
tree | b4062d8108445ccd0ef0adcb14c6cdc96ea41fcf /libguile/print.c | |
parent | 9ac0544efff1ce5c9e5a4dcf6477cf2794d11ef0 (diff) | |
download | guile-04f48e94b573eaede0751110c583293cc34cd8f9.tar.gz |
Deprecate struct "self" slots
* libguile/print.h (SCM_PRINT_STATE_LAYOUT): Use a normal slot instead
of a self slot.
* libguile/print.c (make_print_state): Initialize "handle" slot
manually.
* libguile/struct.c (issue_deprecation_warning_for_self_slots): New
helper, called when making vtables to issue deprecation warnings for
"self" slots. Avoids warning for the "self" slot that's part of the
fixed vtable slots.
(scm_i_struct_inherit_vtable_magic): Call
issue_deprecation_warning_for_self_slots.
* doc/ref/api-data.texi (Vtables, Structure Basics): Remove references
to self slots.
* NEWS: Add entry.
Diffstat (limited to 'libguile/print.c')
-rw-r--r-- | libguile/print.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libguile/print.c b/libguile/print.c index 4d57a877d..24c532f29 100644 --- a/libguile/print.c +++ b/libguile/print.c @@ -196,6 +196,7 @@ make_print_state (void) { SCM print_state = scm_make_struct_no_tail (scm_print_state_vtable, SCM_EOL); scm_print_state *pstate = SCM_PRINT_STATE (print_state); + pstate->handle = print_state; pstate->ref_vect = scm_c_make_vector (PSTATE_SIZE, SCM_UNDEFINED); pstate->ceiling = SCM_SIMPLE_VECTOR_LENGTH (pstate->ref_vect); pstate->highlight_objects = SCM_EOL; |