Changeset 13700


Ignore:
Timestamp:
May 15, 2010, 1:28:55 AM (10 years ago)
Author:
gz
Message:

As an interim measure, add compile-time parameter *objc-error-return-condition* to control which conditions gets caught by objc:defmethod. See ticket:682

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/objc-bridge/objc-runtime.lisp

    r13551 r13700  
    29622962    (#_memmove return-temp value size)))
    29632963
     2964
     2965(defvar *objc-error-return-condition* 'condition
     2966  "Type of conditions to be caught by objc:defmethod and resignalled as objc exceptions,
     2967   allowing handlers for them to safely take a non-local exit despite possible intervening ObjC
     2968   frames.   The resignalling unwinds the stack before the handler is invoked, which can be
     2969   a problem for some handlers.")
     2970
     2971
    29642972(defmacro objc:defmethod (name (self-arg &rest other-args) &body body &environment env)
    29652973  (collect ((arglist)
     
    30603068                 ',result-type
    30613069                 ',(cddr arg-types))
    3062                 (defcallback ,impname ( :error-return (condition objc-callback-error-return) ,@(arglist))
     3070                (defcallback ,impname ( :error-return (,*objc-error-return-condition* objc-callback-error-return) ,@(arglist))
    30633071                  (declare (ignorable ,self-name)
    30643072                           (unsettable ,self-name)
Note: See TracChangeset for help on using the changeset viewer.