From 03fd82e89b41bbeafa900be8581a3eb8d78c2758 Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Thu, 4 Dec 2008 21:16:51 +0100 Subject: Minor cleanups and fixes. darcs-hash:efd8243ff1432ed15009ab5d2088f7374d67ab97 --- JOURNAL | 2 +- Lisp/lisp-value-wrapping.lisp | 3 ++- Lisp/method-definition.lisp | 7 ++++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/JOURNAL b/JOURNAL index 6b13f4c..4a3c96f 100644 --- a/JOURNAL +++ b/JOURNAL @@ -405,7 +405,7 @@ In the Objective-C 2.0 runtime, the functions =class_add{Method,Protocol,Ivar}=, =class_copyMethodList=, ={class,protocol}_copyProtocolList=, =protocol_copyMethodDescriptionList=, and =class_copyPropertyList= are probably our friends. -=class_copyMethodList= may be used to together with +=class_copyMethodList= may be used in combination with =method_setImplementation= for good effect. But... What about the GNU runtime? Is it okay to inspect a Class' diff --git a/Lisp/lisp-value-wrapping.lisp b/Lisp/lisp-value-wrapping.lisp index 1406a95..dbc5ae9 100644 --- a/Lisp/lisp-value-wrapping.lisp +++ b/Lisp/lisp-value-wrapping.lisp @@ -71,12 +71,13 @@ ;; Must override: ;; - characterAtIndex: ;; - length +;; - replaceCharactersInRange:withString: ;; ;; May usefully override, among others: ;; - substringWithRange: (maybe) ;; - getCharacters:range: (for performance reasons) ;; - description -(defclass ns::mlk-lisp-string (ns::ns-string lisp-value-wrapper-mixin) +(defclass ns::mlk-lisp-string (ns::ns-mutable-string lisp-value-wrapper-mixin) () (:metaclass ns::+ns-object)) diff --git a/Lisp/method-definition.lisp b/Lisp/method-definition.lisp index a000c49..c8ce0dd 100644 --- a/Lisp/method-definition.lisp +++ b/Lisp/method-definition.lisp @@ -463,9 +463,14 @@ __define-objective-c-generic-function__. (eval (loop for type in argument-types for typespec = (typespec type) for symbol in arg-symbols + for first-arg-p = t then nil collect (list symbol (typespec->c-type typespec)) into cffi-lambda-list if (member (typespec-primary-type typespec) '(:id :class :selector)) - collect `(intern-pointer-wrapper ',type :pointer ,symbol) + collect `(coerce-object ,symbol ',type) + #+nil + `(intern-pointer-wrapper ',type + :pointer ,symbol + :skip-wrapper-unwrapping ,first-arg-p) into arguments else collect symbol into arguments -- cgit v1.2.3