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. ;; 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