summaryrefslogtreecommitdiff
path: root/module/rnrs
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2020-01-12 21:50:08 +0100
committerAndy Wingo <wingo@pobox.com>2020-01-12 21:51:22 +0100
commit86a9f9a27176968bbae46aceed114634ca7c693e (patch)
tree7814808c64beb7dbcfa707e153a3c497f1cc7a78 /module/rnrs
parentcf53854d42d4e260459896cb0c4b071608398b96 (diff)
downloadguile-86a9f9a27176968bbae46aceed114634ca7c693e.tar.gz
Optionally allow duplicate field names in core records
* NEWS: Update. * doc/ref/api-data.texi (Records): Update docs. * module/ice-9/boot-9.scm (make-record-type): Add #:allow-duplicate-field-names? keyword argument. (record-accessor, record-modifier): Allow passing indexes to identify fields. * module/rnrs/records/procedural.scm (make-record-type-descriptor): Allow duplicate field names. Fixes #38611.
Diffstat (limited to 'module/rnrs')
-rw-r--r--module/rnrs/records/procedural.scm3
1 files changed, 2 insertions, 1 deletions
diff --git a/module/rnrs/records/procedural.scm b/module/rnrs/records/procedural.scm
index 9eb0934eb..e5a154c29 100644
--- a/module/rnrs/records/procedural.scm
+++ b/module/rnrs/records/procedural.scm
@@ -1,6 +1,6 @@
;;; procedural.scm --- Procedural interface to R6RS records
-;; Copyright (C) 2010, 2017 Free Software Foundation, Inc.
+;; Copyright (C) 2010, 2017, 2019-2020 Free Software Foundation, Inc.
;;
;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public
@@ -53,6 +53,7 @@
(define (make-record-type-descriptor name parent uid sealed? opaque? fields)
(make-record-type name (vector->list fields) #:parent parent #:uid uid
#:extensible? (not sealed?)
+ #:allow-duplicate-field-names #t
#:opaque? (or opaque?
(and parent (record-type-opaque? parent)))))