Changeset 451
- Timestamp:
- Feb 1, 2004, 5:18:41 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/ccl/examples/objc-support.lisp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/examples/objc-support.lisp
r432 r451 106 106 ;;; wind up calling THROW-TO-CATCH-FRAME with the specified catch 107 107 ;;; frame as its second argument. The C frame used here is just 108 ;; ;an empty C stack frame from which the callback will be called.108 ;; an empty C stack frame from which the callback will be called. 109 109 110 110 (defun %associate-jmp-buf-with-catch-frame (jmp-buf catch-frame c-frame) … … 129 129 130 130 (defclass ns-lisp-exception (ns::ns-exception) 131 (( lispid :foreign-type :unsigned))131 ((condition :initarg :condition :reader ns-lisp-exception-condition)) 132 132 (:metaclass ns::+ns-object)) 133 133 134 (define-objc-method ((:id :init-with-lisp-id (:unsigned lisp-id))134 (define-objc-method ((:id init) 135 135 ns-lisp-exception) 136 (setq self (send-super :init-with-name #@"lisp exception" 137 :reason #@"lisp exception" 138 :user-info (%null-ptr))) 139 (setf (slot-value self 'lispid) lisp-id) 140 self) 141 142 (define-objc-method ((:unsigned lisp-id) ns-lisp-exception) 143 (slot-value self 'lispid)) 136 (send self 137 :init-with-name #@"lisp exception" 138 :reason #@"lisp exception" 139 :user-info (%null-ptr))) 144 140 145 141 (defun ns-exception->lisp-condition (nsexception) 146 (if (send (send nsexception 'class) 147 :is-subclass-of-class (@class ns-lisp-exception)) 148 (id-map-free-object *condition-id-map* (send nsexception 'lisp-id)) 142 (if (typep nsexception 'ns-lisp-exception) 143 (ns-lisp-exception-condition nsexception) 149 144 (make-condition 'ns-exception :ns-exception nsexception))) 150 145 … … 158 153 ;;; 159 154 160 #|(dbg (format nil "~a" c))|# 161 (make-objc-instance 'ns-lisp-exception 162 :with-lisp-id (assign-id-map-id *condition-id-map* c))) 155 (dbg (format nil "~a" c)) 156 (make-instance 'ns-lisp-exception :condition c)) 163 157 164 158 165 159 166 (defun ns-exception->lisp-condition (nsexception) 167 (if (typep nsexception 'ns-lisp-exception) 168 (id-map-free-object *condition-id-map* (slot-value nsexception 'lispid)) 169 (make-condition 'ns-exception :ns-exception nsexception))) 160 170 161 171 162 #+apple-objc
Note:
See TracChangeset
for help on using the changeset viewer.
