From 0880bd6ab8539d43cde12ca556ea46b2ee0f0518 Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Tue, 4 Mar 2008 15:02:43 +0100 Subject: Fix objcl_create_imp. darcs-hash:259fe285f4dde3cb5d6a964593524f7e9619faf4 --- Lisp/method-definition.lisp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Lisp/method-definition.lisp') diff --git a/Lisp/method-definition.lisp b/Lisp/method-definition.lisp index 1ed0b9c..187da3c 100644 --- a/Lisp/method-definition.lisp +++ b/Lisp/method-definition.lisp @@ -123,10 +123,11 @@ ,cffi-lambda-list (,(generic-function-name gf) ,@arguments))))) (let ((callback (get-callback callback-name))) - (with-foreign-object (arg-typestring-buffer :string (length arg-typestrings)) + (with-foreign-object (arg-typestring-buffer :string + (- (length arg-typestrings) 2)) (with-foreign-string-pool (register-temp allocate-temp) (loop for i from 0 - for typestring in arg-typestrings + for typestring in (cddr arg-typestrings) do (setf (mem-aref arg-typestring-buffer :string i) (allocate-temp typestring))) (%objcl-add-method (pointer-to class) -- cgit v1.2.3