mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-29 22:40:34 +02:00
Remove vestigial code from srfi-9
* module/srfi/srfi-9.scm (%define-record-type): No need to define record-layout.
This commit is contained in:
parent
88e0933450
commit
7fef214f6e
1 changed files with 1 additions and 7 deletions
|
@ -1,6 +1,6 @@
|
||||||
;;; srfi-9.scm --- define-record-type
|
;;; srfi-9.scm --- define-record-type
|
||||||
|
|
||||||
;; Copyright (C) 2001-2002, 2006, 2008-2014, 2018-2019, 2023
|
;; Copyright (C) 2001-2002,2006,2008-2014,2018-2019,2023-2024
|
||||||
;; Free Software Foundation, Inc.
|
;; Free Software Foundation, Inc.
|
||||||
;;
|
;;
|
||||||
;; This library is free software; you can redistribute it and/or
|
;; This library is free software; you can redistribute it and/or
|
||||||
|
@ -274,11 +274,6 @@
|
||||||
field-specs
|
field-specs
|
||||||
(iota (length field-specs))))
|
(iota (length field-specs))))
|
||||||
|
|
||||||
(define (record-layout immutable? count)
|
|
||||||
;; Mutability is expressed on the record level; all structs in the
|
|
||||||
;; future will be mutable.
|
|
||||||
(string-concatenate (make-list count "pw")))
|
|
||||||
|
|
||||||
(syntax-case x ()
|
(syntax-case x ()
|
||||||
((_ immutable? form type-name constructor-spec predicate-name
|
((_ immutable? form type-name constructor-spec predicate-name
|
||||||
field-spec ...)
|
field-spec ...)
|
||||||
|
@ -308,7 +303,6 @@
|
||||||
(getter-ids (getter-identifiers #'(field-spec ...)))
|
(getter-ids (getter-identifiers #'(field-spec ...)))
|
||||||
(field-count (length field-ids))
|
(field-count (length field-ids))
|
||||||
(immutable? (syntax->datum #'immutable?))
|
(immutable? (syntax->datum #'immutable?))
|
||||||
(layout (record-layout immutable? field-count))
|
|
||||||
(ctor-name (syntax-case #'constructor-spec ()
|
(ctor-name (syntax-case #'constructor-spec ()
|
||||||
((ctor args ...) #'ctor)))
|
((ctor args ...) #'ctor)))
|
||||||
(copier-id (make-copier-id #'type-name)))
|
(copier-id (make-copier-id #'type-name)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue