summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2007-08-07 16:33:17 +0200
committerMatthias Benkard <code@mail.matthias.benkard.de>2007-08-07 16:33:17 +0200
commit822be83141a65194dea98e44a49d69066e8a9ac7 (patch)
treee73625f7e8566454d7ae090172a78f8b7191dd8b
parent42560c3e9a5fe60083a75088e9ef672f8af7f486 (diff)
Improve type safety of method calls.
darcs-hash:261bf7d0a033d5c318d246da40356a9f28badde2
-rw-r--r--Lisp/method-invocation.lisp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lisp/method-invocation.lisp b/Lisp/method-invocation.lisp
index b446015..e7079a7 100644
--- a/Lisp/method-invocation.lisp
+++ b/Lisp/method-invocation.lisp
@@ -65,6 +65,8 @@ if as the second **argument** to __invoke-by-name__.
__invoke-by-name__"
+ (check-type receiver (or id objc-class exception)
+ "an Objective C instance (ID, OBJC-CLASS or EXCEPTION)")
(do* ((components-left (cons message-start message-components)
(cddr components-left))
(message-list (list message-start)
@@ -117,6 +119,8 @@ Returns: *result* --- the return value of the method invocation.
__invoke__"
+ (check-type receiver (or id objc-class exception)
+ "an Objective C instance (ID, OBJC-CLASS or EXCEPTION)")
(let* ((arglist (arglist-intersperse-types
(mapcar #'lisp->obj-data args)))
(return-value (apply-macro '%objcl-invoke-class-method