From ceedcfaa0c273b466a371b9bef7c84ce27ec27fb Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Tue, 3 Nov 2009 22:27:34 +0100 Subject: [PATCH] srfi-35 properly uses vtable-offset-user * module/srfi/srfi-35.scm (condition-type-id): (condition-type-parent, condition-type-all-fields): Don't ref fixed struct indices, use vtable-offset-user instead. --- module/srfi/srfi-35.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/srfi/srfi-35.scm b/module/srfi/srfi-35.scm index 7407feb8f..5d6557d61 100644 --- a/module/srfi/srfi-35.scm +++ b/module/srfi/srfi-35.scm @@ -78,15 +78,15 @@ (define (condition-type-id ct) (and (condition-type? ct) - (struct-ref ct 3))) + (struct-ref ct (+ vtable-offset-user 0)))) (define (condition-type-parent ct) (and (condition-type? ct) - (struct-ref ct 4))) + (struct-ref ct (+ vtable-offset-user 1)))) (define (condition-type-all-fields ct) (and (condition-type? ct) - (struct-ref ct 5))) + (struct-ref ct (+ vtable-offset-user 2)))) (define (struct-layout-for-condition field-names)