summaryrefslogtreecommitdiff
path: root/Lisp
diff options
context:
space:
mode:
Diffstat (limited to 'Lisp')
-rw-r--r--Lisp/lisp-value-wrapping.lisp20
1 files changed, 20 insertions, 0 deletions
diff --git a/Lisp/lisp-value-wrapping.lisp b/Lisp/lisp-value-wrapping.lisp
index 85cf84a..67c72e6 100644
--- a/Lisp/lisp-value-wrapping.lisp
+++ b/Lisp/lisp-value-wrapping.lisp
@@ -16,6 +16,7 @@
;;;; <http://www.gnu.org/licenses/>.
(in-package #:mulk.objective-cl)
+#.(enable-method-syntax)
(eval-when (:compile-toplevel :load-toplevel :execute)
@@ -39,6 +40,22 @@
(:metaclass ns::+ns-object))
+(define-objective-c-generic-function #/description (self))
+
+(define-objective-c-method #/description :id ((self ns::mlk-lisp-value ))
+ (#/stringWithUTF8String: (find-objc-class 'ns-string)
+ (format nil "<MLKLispValue: ~A>"
+ (write-to-string (lisp-value self)
+ :readably nil
+ :escape t
+ :circle t
+ :length 50
+ :level 5
+ :pretty nil
+ :radix nil
+ :base 10))))
+
+
(defcoercion id ((x list))
(intern-lisp-value x))
@@ -113,3 +130,6 @@
(defclass ns::mlk-lisp-list (ns::ns-array lisp-value-wrapper-mixin)
()
(:metaclass ns::+ns-object))
+
+
+#.(disable-method-syntax)