summaryrefslogtreecommitdiff
path: root/Lisp/lisp-value-wrapping.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'Lisp/lisp-value-wrapping.lisp')
-rw-r--r--Lisp/lisp-value-wrapping.lisp14
1 files changed, 14 insertions, 0 deletions
diff --git a/Lisp/lisp-value-wrapping.lisp b/Lisp/lisp-value-wrapping.lisp
index 8eda55c..85cf84a 100644
--- a/Lisp/lisp-value-wrapping.lisp
+++ b/Lisp/lisp-value-wrapping.lisp
@@ -39,6 +39,20 @@
(:metaclass ns::+ns-object))
+(defcoercion id ((x list))
+ (intern-lisp-value x))
+
+(defcoercion id ((x string))
+ ;; FIXME: Implement INTERN-LISP-VALUE.
+ (primitive-invoke (find-objc-class 'ns-string)
+ "stringWithUTF8String:"
+ 'id
+ x))
+
+(defcoercion id ((x t))
+ (intern-lisp-value x))
+
+
(defun intern-lisp-value (value)
;; We need this function in order to preserve object identity on the
;; Objective-C side. As we want [(intern-lisp-value 10) self] to