diff options
author | Matthias Benkard <code@mail.matthias.benkard.de> | 2008-03-04 12:36:06 +0100 |
---|---|---|
committer | Matthias Benkard <code@mail.matthias.benkard.de> | 2008-03-04 12:36:06 +0100 |
commit | 11c857700e03ec0b758f729731784d0f46a6d55e (patch) | |
tree | 28251a60e4612f0880675e19ef212b6cf2b1bcca /Lisp/lisp-value-wrapping.lisp | |
parent | 088de3d24f58c8bb8f8a2ac25c5da373a7e3a1f2 (diff) |
Use INTERN-LISP-VALUE for argument conversion.
darcs-hash:2f57dd53bfa6b2aa44474232042d9578af720c22
Diffstat (limited to 'Lisp/lisp-value-wrapping.lisp')
-rw-r--r-- | Lisp/lisp-value-wrapping.lisp | 14 |
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 |