diff options
author | Andy Wingo <wingo@pobox.com> | 2017-09-23 11:17:35 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2017-09-23 11:17:35 +0200 |
commit | e26652b7e1b1283a8ed023437d8ea9d6e36fd1aa (patch) | |
tree | dbe1a14d2c25108fb5085be18ae586236ef0508a /libguile/struct.c | |
parent | 28d5e81c133904148c191e7b2368e3c4d7cad567 (diff) | |
parent | b0ecf83ef0f3dfbfce808c2cfc88ff0c8d9809f1 (diff) | |
download | guile-e26652b7e1b1283a8ed023437d8ea9d6e36fd1aa.tar.gz |
Merge 'stable-2.2'
Diffstat (limited to 'libguile/struct.c')
-rw-r--r-- | libguile/struct.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/libguile/struct.c b/libguile/struct.c index 7d5139b7b..9b1fd51ea 100644 --- a/libguile/struct.c +++ b/libguile/struct.c @@ -68,8 +68,8 @@ SCM_DEFINE (scm_make_struct_layout, "make-struct-layout", 1, 0, 0, "type, the second a field protection. Allowed types are 'p' for\n" "GC-protected Scheme data, 'u' for unprotected binary data. \n" "Allowed protections\n" - "are 'w' for mutable fields, 'h' for hidden fields, 'r' for read-only\n" - "fields, and 'o' for opaque fields.\n\n" + "are 'w' for mutable fields, 'h' for hidden fields, and\n" + "'r' for read-only fields.\n\n" "Hidden fields are writable, but they will not consume an initializer arg\n" "passed to @code{make-struct}. They are useful to add slots to a struct\n" "in a way that preserves backward-compatibility with existing calls to\n" @@ -157,6 +157,13 @@ set_vtable_layout_flags (SCM vtable) flags &= ~SCM_VTABLE_FLAG_SIMPLE_RW; break; + case 'o': + case 'O': + scm_c_issue_deprecation_warning + ("Opaque struct fields are deprecated. Struct field protection " + "should be layered on at a higher level."); + /* Fall through. */ + default: flags = 0; } @@ -472,8 +479,8 @@ SCM_DEFINE (scm_make_struct_no_tail, "make-struct/no-tail", 1, 0, 1, "The @var{init1}, @dots{} are optional arguments describing how\n" "successive fields of the structure should be initialized.\n" "Only fields with protection 'r' or 'w' can be initialized.\n" - "Fields with protection 'o' can not be initialized by Scheme\n" - "programs.\n\n" + "Hidden fields (those with protection 'h') have to be manually\n" + "set.\n\n" "If fewer optional arguments than initializable fields are supplied,\n" "fields of type 'p' get default value #f while fields of type 'u' are\n" "initialized to 0.") |