diff options
Diffstat (limited to 'Lisp')
-rw-r--r-- | Lisp/name-conversion.lisp | 17 | ||||
-rw-r--r-- | Lisp/utilities.lisp | 4 |
2 files changed, 14 insertions, 7 deletions
diff --git a/Lisp/name-conversion.lisp b/Lisp/name-conversion.lisp index 9b27e70..4ff637c 100644 --- a/Lisp/name-conversion.lisp +++ b/Lisp/name-conversion.lisp @@ -64,6 +64,11 @@ (subseq (first components) 1)))))) +(defun export-and-return (symbol) + (export (list symbol)) + symbol) + + (defun objc-class-name->symbol (class-name) (let ((prefix-end (1- (position-if #'lower-case-p class-name)))) (cond ((and prefix-end (> prefix-end 0)) @@ -98,12 +103,14 @@ ;; because we want this procedure to work as expected for any value ;; of (READTABLE-CASE *READTABLE*), which means that 'ns-object ;; should always mean the same thing as "NSObject". - (read-from-string class-name))) + (export-and-return + (read-from-string class-name)))) (defun objc-meta-class-name->symbol (meta-class-name) (let ((*package* (find-package '#:objective-c-classes))) - (read-from-string - (concatenate 'string - "%" - (symbol-name (objc-class-name->symbol meta-class-name)))))) + (export-and-return + (read-from-string + (concatenate 'string + "%" + (symbol-name (objc-class-name->symbol meta-class-name))))))) diff --git a/Lisp/utilities.lisp b/Lisp/utilities.lisp index ccf80cf..5310f91 100644 --- a/Lisp/utilities.lisp +++ b/Lisp/utilities.lisp @@ -251,7 +251,7 @@ invocations will return numbers.) (defmethod print-object ((class objective-c-class) stream) (print-unreadable-object (class stream) (with-slots (pointer) class - (format stream "~S ~A {~X}" + (format stream "~S ~S {~X}" (type-of class) (class-name class) (cffi:pointer-address pointer))))) @@ -260,7 +260,7 @@ invocations will return numbers.) (defmethod print-object ((meta-class objective-c-meta-class) stream) (print-unreadable-object (meta-class stream) (with-slots (pointer) meta-class - (format stream "~S ~A {~X}" + (format stream "~S ~S {~X}" (type-of meta-class) (class-name meta-class) (cffi:pointer-address pointer))))) |