diff options
author | Matthias Benkard <code@mail.matthias.benkard.de> | 2008-02-03 00:18:04 +0100 |
---|---|---|
committer | Matthias Benkard <code@mail.matthias.benkard.de> | 2008-02-03 00:18:04 +0100 |
commit | bbf46f625cb69a3f99659222bd34f116e0c3ac76 (patch) | |
tree | 139e6e7bed3d783f8d57ed7dfd4943e6348c8676 | |
parent | e3c9ac147bcd0e3516326a306a24f73ef0a6d4c4 (diff) |
Automatically export newly defined wrapper classes.
darcs-hash:94ee737ab79b1cca1de896b9d6cdbcca06db1071
-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))))) |