summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Lisp/libobjcl.lisp3
-rw-r--r--Lisp/method-invocation.lisp8
2 files changed, 9 insertions, 2 deletions
diff --git a/Lisp/libobjcl.lisp b/Lisp/libobjcl.lisp
index d633480..939f3b3 100644
--- a/Lisp/libobjcl.lisp
+++ b/Lisp/libobjcl.lisp
@@ -722,7 +722,8 @@ separating parts by hyphens works nicely in all of the `:INVERT`,
(defun pointer (thing)
(etypecase thing
(c-pointer thing)
- ((or c-pointer-wrapper exception) (pointer-to thing))))
+ ((or c-pointer-wrapper exception) (pointer-to thing))
+ (t (pointer-to (coerce-object thing :id)))))
(defun object-is-class-p (obj)
(%objcl-object-is-class (pointer obj)))
diff --git a/Lisp/method-invocation.lisp b/Lisp/method-invocation.lisp
index 4a3c209..9bb8a46 100644
--- a/Lisp/method-invocation.lisp
+++ b/Lisp/method-invocation.lisp
@@ -207,7 +207,13 @@ easier to use with __apply__.
__invoke__"
- (invoke-by-name-super-v receiver method-name nil args))
+ (invoke-by-name-super-v (typecase receiver
+ (symbol (find-objc-class receiver))
+ ((or id objective-c-class) receiver)
+ (t (pointer receiver)))
+ method-name
+ nil
+ args))
(defun invoke-by-name-super-v (receiver method-name superclass-for-send-super