From e6726828cacc838edb1c6b766d310737080d4f87 Mon Sep 17 00:00:00 2001 From: Mikael Djurfeldt Date: Wed, 19 Mar 2003 14:50:20 +0000 Subject: * goops.scm (process-class-pre-define-accessor): Temporary kludge to fix a problem introduced by my previous change. --- oop/ChangeLog | 5 +++++ oop/goops.scm | 15 ++++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) (limited to 'oop') 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 + + * goops.scm (process-class-pre-define-accessor): Temporary kludge + to fix a problem introduced by my previous change. + 2003-03-17 Mikael Djurfeldt * 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) ) - (is-a? (variable-ref var) )))) - (process-define-accessor name)))) + (cond ((or (not var) + (not (variable-bound? var))) + (process-define-accessor name)) + ((or (is-a? (variable-ref var) ) + (is-a? (variable-ref var) ))) + ((is-a? (variable-ref var) ) + ;;*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. ;;; -- cgit v1.2.1