1
Fork 0
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:
Andy Wingo 2011-11-18 11:35:07 +01:00
parent 581bd72a7d
commit 5f8d67ad09

View file

@ -48,14 +48,14 @@
;; The vtable of all condition types.
;; vtable fields: vtable, self, printer
;; 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)
(if (eq? ct %condition-type-vtable)
(display "#<condition-type-vtable>")
(format port "#<condition-type ~a ~a>"
(condition-type-id ct)
(number->string (object-address ct)
16))))))
(set-struct-vtable-name! s 'condition-type)
s))
(define (%make-condition-type layout id parent all-fields)
(let ((struct (make-struct %condition-type-vtable 0