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

Fix up make-struct-layout and make-struct/no-tail docstrings

* libguile/struct.c (scm_make_struct_layout, scm_make_struct_no_tail):
  Fix up docstrings for self and tail deprecation.
This commit is contained in:
Andy Wingo 2017-09-22 11:38:41 +02:00
parent 04f48e94b5
commit c7c7588f24

View file

@ -69,16 +69,14 @@ SCM_DEFINE (scm_make_struct_layout, "make-struct-layout", 1, 0, 0,
"@var{fields} must be a string made up of pairs of characters\n" "@var{fields} must be a string made up of pairs of characters\n"
"strung together. The first character of each pair describes a field\n" "strung together. The first character of each pair describes a field\n"
"type, the second a field protection. Allowed types are 'p' for\n" "type, the second a field protection. Allowed types are 'p' for\n"
"GC-protected Scheme data, 'u' for unprotected binary data, and 's' for\n" "GC-protected Scheme data, 'u' for unprotected binary data. \n"
"a field that points to the structure itself. Allowed protections\n" "Allowed protections\n"
"are 'w' for mutable fields, 'h' for hidden fields, 'r' for read-only\n" "are 'w' for mutable fields, 'h' for hidden fields, 'r' for read-only\n"
"fields, and 'o' for opaque fields.\n\n" "fields, and 'o' for opaque fields.\n\n"
"Hidden fields are writable, but they will not consume an initializer arg\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" "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" "in a way that preserves backward-compatibility with existing calls to\n"
"@code{make-struct}, especially for derived vtables.\n\n" "@code{make-struct}, especially for derived vtables.")
"The last field protection specification may be capitalized to indicate\n"
"that the field is a tail-array.")
#define FUNC_NAME s_scm_make_struct_layout #define FUNC_NAME s_scm_make_struct_layout
{ {
SCM new_sym; SCM new_sym;
@ -564,11 +562,10 @@ SCM_DEFINE (scm_make_struct_no_tail, "make-struct/no-tail", 1, 0, 1,
"Create a new structure.\n\n" "Create a new structure.\n\n"
"@var{vtable} must be a vtable structure (@pxref{Vtables}).\n\n" "@var{vtable} must be a vtable structure (@pxref{Vtables}).\n\n"
"The @var{init1}, @dots{} are optional arguments describing how\n" "The @var{init1}, @dots{} are optional arguments describing how\n"
"successive fields of the structure should be initialized. Only fields\n" "successive fields of the structure should be initialized.\n"
"with protection 'r' or 'w' can be initialized, except for fields of\n" "Only fields with protection 'r' or 'w' can be initialized.\n"
"type 's', which are automatically initialized to point to the new\n" "Fields with protection 'o' can not be initialized by Scheme\n"
"structure itself. Fields with protection 'o' can not be initialized by\n" "programs.\n\n"
"Scheme programs.\n\n"
"If fewer optional arguments than initializable fields are supplied,\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" "fields of type 'p' get default value #f while fields of type 'u' are\n"
"initialized to 0.") "initialized to 0.")