1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-16 08:40:19 +02:00

Merge 'stable-2.2'

This commit is contained in:
Andy Wingo 2017-09-23 11:17:35 +02:00
commit e26652b7e1
3 changed files with 27 additions and 15 deletions

View file

@ -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.")