1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

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.
This commit is contained in:
Andy Wingo 2017-09-22 11:23:00 +02:00
parent 9ac0544eff
commit 04f48e94b5
5 changed files with 38 additions and 15 deletions

View file

@ -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;