summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-11-18 11:35:07 +0100
committerAndy Wingo <wingo@pobox.com>2012-07-06 18:32:14 +0200
commit5f8d67ad09d21263d1ea2d537afcc5464d922dc5 (patch)
treec0aed2a592789c8a2d797494c60e64fe89edb949
parent581bd72a7d8346d32d02379d64b3012fdd6eef31 (diff)
downloadguile-5f8d67ad09d21263d1ea2d537afcc5464d922dc5.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