summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2017-09-23 11:14:27 +0200
committerAndy Wingo <wingo@pobox.com>2017-09-23 11:14:27 +0200
commitb0ecf83ef0f3dfbfce808c2cfc88ff0c8d9809f1 (patch)
treece37041419fae8b1c3815b2a2756b74986060d60 /doc
parent84aa050f927d704344a7efca6b63607254e0b5b2 (diff)
Deprecate opaque struct fields
* NEWS: Add entry. * doc/ref/api-data.texi (Vtables, Structure Basics): Remove mention of opaque field protection. * libguile/struct.c (scm_make_struct_layout, scm_make_struct_no_tail): Remove discussion of opaque fields. (set_vtable_layout_flags): Issue a deprecation warning when opaque fields are used.
Diffstat (limited to 'doc')
-rw-r--r--doc/ref/api-data.texi13
1 files changed, 2 insertions, 11 deletions
diff --git a/doc/ref/api-data.texi b/doc/ref/api-data.texi
index faddc3f65..e0f8be324 100644
--- a/doc/ref/api-data.texi
+++ b/doc/ref/api-data.texi
@@ -8795,9 +8795,6 @@ The second letter for each field is a permission code,
@item
@code{r} -- read-only, the field can be read but not written.
@item
-@code{o} -- opaque, the field can be neither read nor written at the
-Scheme level. This can be used for fields which should only be used
-from C code.
@end itemize
Here are some examples.
@@ -8850,11 +8847,6 @@ 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.
-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,
@example
@@ -8886,8 +8878,7 @@ Return @code{#t} if @var{obj} is a structure, or @code{#f} if not.
Return the contents of field number @var{n} in @var{struct}. The
first field is number 0.
-An error is thrown if @var{n} is out of range, or if the field cannot
-be read because it's @code{o} opaque.
+An error is thrown if @var{n} is out of range.
@end deffn
@deffn {Scheme Procedure} struct-set! struct n value
@@ -8896,7 +8887,7 @@ Set field number @var{n} in @var{struct} to @var{value}. The first
field is number 0.
An error is thrown if @var{n} is out of range, or if the field cannot
-be written because it's @code{r} read-only or @code{o} opaque.
+be written because it's @code{r} read-only.
@end deffn
@deffn {Scheme Procedure} struct-vtable struct