diff options
author | Matthias Benkard <code@mail.matthias.benkard.de> | 2007-09-14 03:26:32 +0200 |
---|---|---|
committer | Matthias Benkard <code@mail.matthias.benkard.de> | 2007-09-14 03:26:32 +0200 |
commit | 9197694fe9fd4eaa6e2c11f0acc92ef60ab6110a (patch) | |
tree | 538b277e6d2e120fe47562940ead66be723f9fbb /Lisp | |
parent | a4654002da82a9eebf728f856c9d501756553eb1 (diff) |
New C function: objcl_get_method_implementation.
darcs-hash:de2f77980605c7aec911673edb0f0f29d0467fce
Diffstat (limited to 'Lisp')
-rw-r--r-- | Lisp/libobjcl.lisp | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/Lisp/libobjcl.lisp b/Lisp/libobjcl.lisp index bc84a44..176423c 100644 --- a/Lisp/libobjcl.lisp +++ b/Lisp/libobjcl.lisp @@ -86,9 +86,16 @@ objects or classes, let alone send messages to them. (defcfun ("objcl_selector_name" %objcl-selector-name) :pointer (selector obj-data)) +(defcfun ("objcl_get_method_implementation" + %objcl-get-method-implementation) + :pointer + (object obj-data) + (selector obj-data)) -(declaim (ftype (function ((or string symbol)) (or null objc-class)) - find-objc-class-by-name)) + +(declaim (ftype (function ((or string symbol) &optional t) + (or null objc-class)) + find-objc-class)) (defun find-objc-class (class-name &optional errorp) "Retrieve an Objective C class by name. @@ -177,7 +184,8 @@ conventional case for namespace identifiers in Objective C." (the selector (obj-data->lisp obj-data))))) -(declaim (ftype (function (objc-class) string) objcl-class-name)) +(declaim (ftype (function ((or objc-class id exception)) string) + objcl-class-name)) (defun objcl-class-name (class) (declare (type (or objc-class id exception) class)) (with-foreign-conversion ((obj-data class)) @@ -191,6 +199,15 @@ conventional case for namespace identifiers in Objective C." (foreign-string-to-lisp/dealloc (%objcl-selector-name obj-data)))) +(declaim (ftype (function ((or id objc-class exception) selector) *) + get-method-implementation)) +(defun get-method-implementation (object selector) + (declare (type selector selector)) + (with-foreign-conversion ((sel-obj-data selector) + (obj-obj-data object)) + (%objcl-get-method-implementation obj-obj-data sel-obj-data))) + + (declaim (ftype (function ((or selector string list)) selector) selector)) (defun selector (designator) |