summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2008-03-06 15:28:25 +0100
committerMatthias Benkard <code@mail.matthias.benkard.de>2008-03-06 15:28:25 +0100
commit7c28d5f8a4b906b67229f2fe3ee01cf7fcf54a78 (patch)
treeaf4cfe2aa4d81a3725842e095b2e2c2c4557b6ee
parent586a8505ecb5d95a9595ba67658c35898c038331 (diff)
SUPER: Capture method arguments before executing the method body.
darcs-hash:73a448dbf57d0847e1bc3e749a2494c2810e6472
-rw-r--r--Lisp/method-definition.lisp11
1 files changed, 5 insertions, 6 deletions
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))