diff options
author | Andy Wingo <wingo@pobox.com> | 2017-09-23 15:16:04 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2017-09-23 15:33:02 +0200 |
commit | 5870188eb4b6c4246569a1aaaf358bc8a9e6a65d (patch) | |
tree | 239d2b31275520a409576073b67a8cd952a87fc8 /module/srfi/srfi-35.scm | |
parent | 0f14a9e59826c1c304d1f50c741e91d99760ff43 (diff) | |
download | guile-5870188eb4b6c4246569a1aaaf358bc8a9e6a65d.tar.gz |
Replace "pr" struct fields with "pw" fields
* libguile/struct.h (SCM_VTABLE_BASE_LAYOUT): Layout is a "pr" field.
* module/ice-9/boot-9.scm (record-type-vtable): Record vtable fields are
writable.
(<parameter>): "pw" fields.
* module/oop/goops.scm (<class>, %compute-layout): <read-only> fields
are "pw" underneath.
* module/rnrs/records/procedural.scm (record-type-vtable)
(record-constructor-vtable, make-record-type-descriptor): Use "pw"
fields in vtables.
* module/srfi/srfi-35.scm (%condition-type-vtable)
(struct-layout-for-condition): "pw" fields in vtables.
* test-suite/tests/goops.test:
* test-suite/tests/structs.test: Use "pw" fields only.
* benchmark-suite/benchmarks/structs.bm: Update for make-struct/no-tail,
to use pw fields, and also to remove useless tests that the compiler
would optimize away.
* doc/ref/api-data.texi (Vtables): Add a note about the now-vestigial
permissions character and update documentation.
(Structure Basics, Meta-Vtables): Update examples.
* libguile/hash.c (scm_i_struct_hash): Remove code that would handle
opaque/self fields.
* libguile/print.h (SCM_PRINT_STATE_LAYOUT): Use "pw" fields.
* libguile/struct.c (scm_struct_init): Simplify check for hidden
fields.
* libguile/values.c (scm_init_values): Field is "pw".
Diffstat (limited to 'module/srfi/srfi-35.scm')
-rw-r--r-- | module/srfi/srfi-35.scm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/module/srfi/srfi-35.scm b/module/srfi/srfi-35.scm index 433032031..626026d74 100644 --- a/module/srfi/srfi-35.scm +++ b/module/srfi/srfi-35.scm @@ -47,7 +47,7 @@ (define %condition-type-vtable ;; The vtable of all condition types. ;; user fields: id, parent, all-field-names - (let ((s (make-vtable (string-append standard-vtable-fields "prprpr") + (let ((s (make-vtable (string-append standard-vtable-fields "pwpwpw") (lambda (ct port) (format port "#<condition-type ~a ~a>" (condition-type-id ct) @@ -92,11 +92,11 @@ ;; Return a string denoting the layout required to hold the fields listed ;; in FIELD-NAMES. (let loop ((field-names field-names) - (layout '("pr"))) + (layout '("pw"))) (if (null? field-names) (string-concatenate/shared layout) (loop (cdr field-names) - (cons "pr" layout))))) + (cons "pw" layout))))) (define (print-condition c port) ;; Print condition C to PORT in a way similar to how records print: |