1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-19 02:00:26 +02:00

* goops.scm (compute-getter-method): For custom getter: Check

boundness even if there is an init-thunk.  (The getter can return
#<unbound> even if the slot has been set before.)

* goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of
scm_at_assert_bound_ref.  (We don't want the unbound check.  See
oop/goops/active-slot.scm.)
This commit is contained in:
Mikael Djurfeldt 2003-04-15 01:15:06 +00:00
parent 55f8c6f1ca
commit 168629c99a
5 changed files with 32 additions and 6 deletions

View file

@ -1,3 +1,9 @@
2003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
* goops.scm (compute-getter-method): For custom getter: Check
boundness even if there is an init-thunk. (The getter can return
#<unbound> even if the slot has been set before.)
2003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
* goops.scm (compute-getters-n-setters/verify-accessors): Better

View file

@ -909,7 +909,13 @@
(define-method (remove-class-accessors! (c <class>))
(for-each (lambda (m)
(if (is-a? m <accessor-method>)
(remove-method-in-classes! m)))
(let ((gf (slot-ref m 'generic-function)))
;; remove the method from its GF
(slot-set! gf 'methods
(delq1! m (slot-ref gf 'methods)))
(%invalidate-method-cache! gf)
;; remove the method from its specializers
(remove-method-in-classes! m))))
(class-direct-methods c)))
;;;
@ -975,10 +981,7 @@
(make <accessor-method>
#:specializers (list class)
#:procedure (cond ((pair? g-n-s)
(if init-thunk
(car g-n-s)
(make-generic-bound-check-getter (car g-n-s))
))
(make-generic-bound-check-getter (car g-n-s)))
(init-thunk
(standard-get g-n-s))
(else