summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-11-18 11:35:07 +0100
committerAndy Wingo <wingo@pobox.com>2011-11-24 11:47:36 +0100
commit5139b7b928fe1ddcdae1107470090a275eba9f19 (patch)
tree259a54d7fa7d01eff905471fe9793498f297b964
parentf7bbc75d0474a36d8ec5d72df8f938c0dff5395e (diff)
downloadguile-5139b7b928fe1ddcdae1107470090a275eba9f19.tar.gz
simplify %condition-type-vtable
* module/srfi/srfi-35.scm (%condition-type-vtable): Use make-vtable instead of make-vtable-vtable.
-rw-r--r--module/srfi/srfi-35.scm16
1 files changed, 8 insertions, 8 deletions
diff --git a/module/srfi/srfi-35.scm b/module/srfi/srfi-35.scm
index d2b9c9420..8f86bce57 100644
--- a/module/srfi/srfi-35.scm
+++ b/module/srfi/srfi-35.scm
@@ -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
- (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))))))
+ (let ((s (make-vtable (string-append standard-vtable-fields "prprpr")
+ (lambda (ct port)
+ (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