diff options
Diffstat (limited to 'Lisp/libobjcl.lisp')
-rw-r--r-- | Lisp/libobjcl.lisp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Lisp/libobjcl.lisp b/Lisp/libobjcl.lisp index 39b1e2d..38b244f 100644 --- a/Lisp/libobjcl.lisp +++ b/Lisp/libobjcl.lisp @@ -732,9 +732,11 @@ separating parts by hyphens works nicely in all of the `:INVERT`, (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))))) + ;; slow and mostly unneeded. We can simply retrieve classes by class + ;; pointer if they have already been registered in a hash table + ;; somewhere. + (intern-pointer-wrapper 'objective-c-class + :pointer (%objcl-object-get-class (pointer obj)))) (defun object-get-meta-class (obj) (find-objc-meta-class-by-name |