mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 19:50:24 +02:00
simplify %condition-type-vtable
* module/srfi/srfi-35.scm (%condition-type-vtable): Use make-vtable instead of make-vtable-vtable.
This commit is contained in:
parent
581bd72a7d
commit
5f8d67ad09
1 changed files with 8 additions and 8 deletions
|
@ -48,14 +48,14 @@
|
||||||
;; The vtable of all condition types.
|
;; The vtable of all condition types.
|
||||||
;; vtable fields: vtable, self, printer
|
;; vtable fields: vtable, self, printer
|
||||||
;; user fields: id, parent, all-field-names
|
;; user fields: id, parent, all-field-names
|
||||||
(make-vtable-vtable "prprpr" 0
|
(let ((s (make-vtable (string-append standard-vtable-fields "prprpr")
|
||||||
(lambda (ct port)
|
(lambda (ct port)
|
||||||
(if (eq? ct %condition-type-vtable)
|
(format port "#<condition-type ~a ~a>"
|
||||||
(display "#<condition-type-vtable>")
|
(condition-type-id ct)
|
||||||
(format port "#<condition-type ~a ~a>"
|
(number->string (object-address ct)
|
||||||
(condition-type-id ct)
|
16))))))
|
||||||
(number->string (object-address ct)
|
(set-struct-vtable-name! s 'condition-type)
|
||||||
16))))))
|
s))
|
||||||
|
|
||||||
(define (%make-condition-type layout id parent all-fields)
|
(define (%make-condition-type layout id parent all-fields)
|
||||||
(let ((struct (make-struct %condition-type-vtable 0
|
(let ((struct (make-struct %condition-type-vtable 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue