summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2017-09-22 11:23:00 +0200
committerAndy Wingo <wingo@pobox.com>2017-09-22 11:35:36 +0200
commit04f48e94b573eaede0751110c583293cc34cd8f9 (patch)
treeb4062d8108445ccd0ef0adcb14c6cdc96ea41fcf /doc
parent9ac0544efff1ce5c9e5a4dcf6477cf2794d11ef0 (diff)
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 'doc')
-rw-r--r--doc/ref/api-data.texi16
1 files changed, 4 insertions, 12 deletions
diff --git a/doc/ref/api-data.texi b/doc/ref/api-data.texi
index 7e36f7446..faddc3f65 100644
--- a/doc/ref/api-data.texi
+++ b/doc/ref/api-data.texi
@@ -8785,13 +8785,6 @@ Scheme level it's read and written as an unsigned integer. ``u''
stands for ``uninterpreted'' (it's not treated as a Scheme value), or
``unprotected'' (it's not marked during GC), or ``unsigned long'' (its
size), or all of these things.
-
-@item
-@code{s} -- a self-reference. Such a field holds the @code{SCM} value
-of the structure itself (a circular reference). This can be useful in
-C code where you might have a pointer to the data array, and want to
-get the Scheme @code{SCM} handle for the structure. In Scheme code it
-has no use.
@end itemize
The second letter for each field is a permission code,
@@ -8857,11 +8850,10 @@ used to have a @code{make-struct} that took an additional argument;
while we deprecate that old interface, @code{make-struct/no-tail} is the
new name for this functionality.
-Type @code{s} self-reference fields and permission @code{o} opaque
-fields are ignored for the @var{init} arguments, ie.@: an argument is
-not consumed by such a field. An @code{s} is always set to the
-structure itself and an @code{o} is always set to @code{#f} or 0 (with
-the intention that C code will do something to it later).
+Fields with permission @code{o} opaque fields are ignored for the
+@var{init} arguments, ie.@: an argument is not consumed by such a field.
+An @code{o} slot is always set to @code{#f} or 0 (with the intention
+that C code will do something to it later).
For example,