summaryrefslogtreecommitdiff
path: root/Lisp/libobjcl.lisp
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2008-03-19 03:07:42 +0100
committerMatthias Benkard <code@mail.matthias.benkard.de>2008-03-19 03:07:42 +0100
commite63bff30be008c4dfe1ee225c1879baecbeb0ab3 (patch)
treea6b036e915bfa2b2922f0751874d16442054440a /Lisp/libobjcl.lisp
parent65f8d8bf8e9a709e549917837f7c01a31aad3928 (diff)
Add a NAME slot to class SELECTOR.
darcs-hash:c51f1608afb05ec84f8f615114cb7f9f65abf8fe
Diffstat (limited to 'Lisp/libobjcl.lisp')
-rw-r--r--Lisp/libobjcl.lisp42
1 files changed, 2 insertions, 40 deletions
diff --git a/Lisp/libobjcl.lisp b/Lisp/libobjcl.lisp
index dd0b3b0..39b1e2d 100644
--- a/Lisp/libobjcl.lisp
+++ b/Lisp/libobjcl.lisp
@@ -525,46 +525,6 @@ If *name* is the name of an existing class:
(%objcl-class-name (pointer-to class)))
-#? selector -> string
-(defun selector-name (selector)
- "Find the name of a selector.
-
-## Arguments and Values:
-
-*selector* --- an **object** of **type** __selector__.
-
-Returns: *name* --- a **string**.
-
-
-## Description:
-
-__selector-name__ returns the name of *selector*.
-
-
-## Examples:
-
- (selector-name (selector '(:string-with-c-string :encoding)))
- ;=> \"stringWithCString:encoding:\"
-
-
-## Note:
-
-If *x* is an **object** of **type** __selector__:
-
- (objc-equal x (find-selector (selector-name x))) ;=> T
-
-If *name* is the name of an existing selector:
-
- (equal name (selector-name (find-selector name))) ;=> T
-
-
-## See Also:
-
- __find-selector__, __selector__"
- (declare (type selector selector))
- (%objcl-selector-name (pointer-to selector)))
-
-
#? (or id objective-c-class exception) selector -> t
(defun get-method-implementation (object selector)
(declare (type selector selector))
@@ -771,6 +731,8 @@ separating parts by hyphens works nicely in all of the `:INVERT`,
(%objcl-object-is-meta-class (pointer obj)))
(defun object-get-class (obj)
+ ;; OPTIMISE: Both find-objc-class-by-name and %objcl-class-name are
+ ;; slow and mostly unneeded.
(find-objc-class-by-name
(%objcl-class-name (%objcl-object-get-class (pointer obj)))))