From 7c28d5f8a4b906b67229f2fe3ee01cf7fcf54a78 Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Thu, 6 Mar 2008 15:28:25 +0100 Subject: SUPER: Capture method arguments before executing the method body. darcs-hash:73a448dbf57d0847e1bc3e749a2494c2810e6472 --- Lisp/method-definition.lisp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'Lisp') diff --git a/Lisp/method-definition.lisp b/Lisp/method-definition.lisp index b83570e..0579299 100644 --- a/Lisp/method-definition.lisp +++ b/Lisp/method-definition.lisp @@ -198,18 +198,17 @@ __super__" collect :id into type-specifiers and collect arg into arg-names finally (let ((super-args-sym (gensym)) - (super-real-args-sym (gensym))) + (captured-args-sym (gensym))) (return `(defmethod ,(intern (symbol-name name) '#:objective-c-methods) argtypes-start ,@type-specifiers argtypes-end ,@qualifiers ,lambda-list - (flet ((super (&rest ,super-args-sym) - (let ((,super-real-args-sym - (or ,super-args-sym - (list ,@(rest arg-names))))) + (let ((,captured-args-sym + (list ,@(rest arg-names)))) + (flet ((super (&rest ,super-args-sym) (invoke-by-name-super-v - ,(first arg-names) + (first ,captured-args-sym) ,(generic-function-name->method-name name) (find-objc-class ',(cadar lambda-list)) -- cgit v1.2.3