diff options
author | Matthias Benkard <code@mail.matthias.benkard.de> | 2007-09-16 00:42:47 +0200 |
---|---|---|
committer | Matthias Benkard <code@mail.matthias.benkard.de> | 2007-09-16 00:42:47 +0200 |
commit | 6a82b0dd5fd0f087ecda5923c6ae93fcea806141 (patch) | |
tree | fc4495093b9abe9ad2f6a96b3d080edb867df9ef /Lisp/method-invocation.lisp | |
parent | d9ac18064cf40f6fbbb09ec8ca74de212c012326 (diff) |
Remember to pass self and _cmd to methods.
darcs-hash:1f832c3dba42782993127d480d2cb73aabf2406c
Diffstat (limited to 'Lisp/method-invocation.lisp')
-rw-r--r-- | Lisp/method-invocation.lisp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Lisp/method-invocation.lisp b/Lisp/method-invocation.lisp index 43a3365..c44fb04 100644 --- a/Lisp/method-invocation.lisp +++ b/Lisp/method-invocation.lisp @@ -189,11 +189,15 @@ Returns: *result* --- the return value of the method invocation. (type-name->type-id return-type))) (selector (selector method-name))) (cffi:with-foreign-objects ((arg-types '(:pointer :char) (length args)) - (objc-args '(:pointer :void) (length args)) + (objc-args '(:pointer :void) (+ (length args) 2)) (return-value-cell return-c-type)) (flet ((ad-hoc-arglist->objc-arglist! (args) + (setf (cffi:mem-aref objc-args '(:pointer :void) 0) + (pointer-to receiver) + (cffi:mem-aref objc-args '(:pointer :void) 1) + (pointer-to selector)) (loop for arg in args - for i from 0 + for i from 2 do (let* ((type-name (lisp-value->type-name arg)) #+(or) (cffi-type (type-name->lisp-type type-name))) @@ -220,7 +224,7 @@ Returns: *result* --- the return value of the method invocation. (dealloc-ad-hoc-objc-arglist () (dotimes (i (length args)) (cffi:foreign-free - (cffi:mem-aref objc-args '(:pointer :void) i)) + (cffi:mem-aref objc-args '(:pointer :void) (+ i 2))) (cffi:foreign-string-free (cffi:mem-aref arg-types '(:pointer :char) i))))) (ad-hoc-arglist->objc-arglist! args) |