Changeset 11907


Ignore:
Timestamp:
Apr 8, 2009, 5:36:15 PM (10 years ago)
Author:
gb
Message:

When updating ObjC 2.x exception globals, if any global has a non-NULL
value, treat that value as a pointer to be updaed with the value of
the foreign symbol.

File:
1 edited

Legend:

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

    r11620 r11907  
    143143(defun setup-objc-exception-globals ()
    144144  (flet ((set-global (offset name)
    145            (setf (%get-ptr (%int-to-ptr (+ (target-nil-value) (%kernel-global-offset offset))))
    146                  (foreign-symbol-address name))))
     145           (with-macptrs (p (%int-to-ptr (+ (target-nil-value) (%kernel-global-offset offset))))
     146            (unless (%null-ptr-p (%get-ptr p))
     147              (%setf-macptr p (%get-ptr p)))
     148            (setf (%get-ptr p)
     149                  (foreign-symbol-address name)))))
    147150    (set-global 'objc-2-personality "___objc_personality_v0")
    148151    (set-global 'objc-2-begin-catch "_objc_begin_catch")
Note: See TracChangeset for help on using the changeset viewer.