mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 11:50:28 +02:00
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.
This commit is contained in:
parent
fb0f1a40e7
commit
ceedcfaa0c
1 changed files with 3 additions and 3 deletions
|
@ -78,15 +78,15 @@
|
||||||
|
|
||||||
(define (condition-type-id ct)
|
(define (condition-type-id ct)
|
||||||
(and (condition-type? ct)
|
(and (condition-type? ct)
|
||||||
(struct-ref ct 3)))
|
(struct-ref ct (+ vtable-offset-user 0))))
|
||||||
|
|
||||||
(define (condition-type-parent ct)
|
(define (condition-type-parent ct)
|
||||||
(and (condition-type? ct)
|
(and (condition-type? ct)
|
||||||
(struct-ref ct 4)))
|
(struct-ref ct (+ vtable-offset-user 1))))
|
||||||
|
|
||||||
(define (condition-type-all-fields ct)
|
(define (condition-type-all-fields ct)
|
||||||
(and (condition-type? ct)
|
(and (condition-type? ct)
|
||||||
(struct-ref ct 5)))
|
(struct-ref ct (+ vtable-offset-user 2))))
|
||||||
|
|
||||||
|
|
||||||
(define (struct-layout-for-condition field-names)
|
(define (struct-layout-for-condition field-names)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue