diff options
-rw-r--r-- | modules/language/python/compile.scm | 4 | ||||
-rw-r--r-- | modules/oop/pf-objects.scm | 7 |
2 files changed, 7 insertions, 4 deletions
diff --git a/modules/language/python/compile.scm b/modules/language/python/compile.scm index a1c6509..c5c107a 100644 --- a/modules/language/python/compile.scm +++ b/modules/language/python/compile.scm @@ -422,7 +422,7 @@ `(catch #t (lambda () ,(exp vs x)) (lambda (,tag ,o . ,l) - ,(let lp ((it (if else (exp vs else) `(apply throw ,tag ,l))) + ,(let lp ((it (if else (exp vs else) `(apply throw ,tag ,o ,l))) (exc exc)) (match exc ((((test . #f) code) . exc) @@ -432,7 +432,7 @@ exc)) ((((test . as) code) . exc) (let ((a (exp vs as))) - (lp `(if (,(O 'testex) ,o ,tag ,(exp vs test) ,l) + (lp `(if (,(O 'testex) ,tag ,o ,(exp vs test) ,l) (let ((,a ,o)) (,(O 'set) ,a '__excargs__ ,l) ,(exp vs code)) diff --git a/modules/oop/pf-objects.scm b/modules/oop/pf-objects.scm index ca9968a..29d8fc9 100644 --- a/modules/oop/pf-objects.scm +++ b/modules/oop/pf-objects.scm @@ -603,7 +603,7 @@ explicitly tell it to not update etc. (let* ((classtag (ref tag '__class__ #f)) (exid (ref ex '__goops__ #f))) (let check-class ((tag classtag)) - (if (eq? (ref tag '__goops__ #f) exid) + (if (and exid (eq? (ref tag '__goops__ #f) exid)) #t (let lp ((parents (ref tag '__parents__ '()))) (if (pair? parents) @@ -629,7 +629,10 @@ explicitly tell it to not update etc. ((pyclass? ex) => (lambda (cl) - (testex py tag cl l)))))) + (testex py tag cl l))) + (else + #f)) + #f)) |