Changeset 11620
- Timestamp:
- Jan 16, 2009, 4:44:12 AM (12 years ago)
- Location:
- trunk/source/objc-bridge
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/objc-bridge/objc-runtime.lisp
r11589 r11620 3029 3029 (release-autorelease-pool ,pool-temp))))) 3030 3030 3031 3032 (defun %make-nsstring (string)3033 (with-encoded-cstrs :utf-8 ((s string))3034 (%make-nsstring-from-utf8-c-string s)))3035 3036 3037 3038 3031 #+apple-objc-2.0 3039 3032 ;;; New!!! Improved!!! At best, half-right!!! 3040 3033 (defmacro with-ns-exceptions-as-errors (&body body) 3041 3034 `(progn ,@body)) 3042 3043 3044 3035 3045 3036 #-apple-objc-2.0 3046 3037 (defmacro with-ns-exceptions-as-errors (&body body) -
trunk/source/objc-bridge/objc-support.lisp
r11588 r11620 183 183 (pushnew 'recognize-objc-exception *foreign-error-condition-recognizers*) 184 184 185 (defun %make-nsstring-from-utf8-c-string (s) 186 (#/initWithUTF8String: (#/alloc ns:ns-string) s)) 187 185 (defun %make-nsstring (string) 186 (with-encoded-cstrs :utf-8 ((s string)) 187 (#/initWithUTF8String: (#/alloc ns:ns-string) s))) 188 189 (defmacro with-autoreleased-nsstring ((nsstring lisp-string) &body body) 190 `(let* ((,nsstring (%make-nsstring ,lisp-string))) 191 (#/autorelease ,nsstring) 192 ,@body)) 193 194 (defmacro with-autoreleased-nsstrings (speclist &body body) 195 (with-specs-aux 'with-autoreleased-nsstring speclist body)) 188 196 189 197 (defun retain-objc-instance (instance) … … 230 238 (with-slots (condition) self 231 239 (if condition 232 ( %make-nsstring (format nil "~A" condition))240 (#/autorelease (%make-nsstring (format nil "~A" condition))) 233 241 (call-next-method)))) 234 242
Note: See TracChangeset
for help on using the changeset viewer.