diff options
author | Mikael Djurfeldt <djurfeldt@nada.kth.se> | 2003-03-19 14:50:20 +0000 |
---|---|---|
committer | Mikael Djurfeldt <djurfeldt@nada.kth.se> | 2003-03-19 14:50:20 +0000 |
commit | e6726828cacc838edb1c6b766d310737080d4f87 (patch) | |
tree | 20a0529159d0df7a22fcc1e2336cbe7c3694cdff /oop | |
parent | 74b6d6e4565199ad868af57288316deb21742da6 (diff) | |
download | guile-e6726828cacc838edb1c6b766d310737080d4f87.tar.gz |
* goops.scm (process-class-pre-define-accessor): Temporary kludge
to fix a problem introduced by my previous change.
Diffstat (limited to 'oop')
-rw-r--r-- | oop/ChangeLog | 5 | ||||
-rw-r--r-- | oop/goops.scm | 15 |
2 files changed, 15 insertions, 5 deletions
diff --git a/oop/ChangeLog b/oop/ChangeLog index e3709794a..b97a34af2 100644 --- a/oop/ChangeLog +++ b/oop/ChangeLog @@ -1,3 +1,8 @@ +2003-03-19 Mikael Djurfeldt <mdj@kvast.blakulla.net> + + * goops.scm (process-class-pre-define-accessor): Temporary kludge + to fix a problem introduced by my previous change. + 2003-03-17 Mikael Djurfeldt <djurfeldt@nada.kth.se> * goops.scm (process-class-pre-define-generic, diff --git a/oop/goops.scm b/oop/goops.scm index f3fcced77..c5e4b0812 100644 --- a/oop/goops.scm +++ b/oop/goops.scm @@ -198,11 +198,16 @@ (define (process-class-pre-define-accessor name) (let ((var (module-variable (current-module) name))) - (if (not (and var - (variable-bound? var) - (or (is-a? (variable-ref var) <accessor>) - (is-a? (variable-ref var) <extended-generic-with-setter>)))) - (process-define-accessor name)))) + (cond ((or (not var) + (not (variable-bound? var))) + (process-define-accessor name)) + ((or (is-a? (variable-ref var) <accessor>) + (is-a? (variable-ref var) <extended-generic-with-setter>))) + ((is-a? (variable-ref var) <generic>) + ;;*fixme* don't mutate an imported object! + (variable-set! var (ensure-accessor (variable-ref var) name))) + (else + (process-define-accessor name))))) ;;; This code should be implemented in C. ;;; |