Ignore:
Timestamp:
Jul 25, 2009, 8:15:02 AM (11 years ago)
Author:
gb
Message:

Conditionalize for Cocotron/Win32. Seems to mostly work (except for
some issue related to registering new selectors) and Cocotron issue #331.
Smoke-tested on OSX; seems to be OK, but there's a non-zero chance that
I broke something.

File:
1 edited

Legend:

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

    r11216 r12438  
    174174
    175175
    176 
     176#+darwin-target
     177(progn
    177178;;; AEDesc (Apple Event Descriptor)
    178179
     
    189190              (ns::aedesc-data-handle a)))
    190191    (describe-macptr-allocation-and-address a stream)))
     192)
    191193
    192194;;; It's not clear how useful this would be; I think that it's
     
    233235    `(if ,form 1 0)))
    234236
    235 
     237#-cocotron-objc                         ;nyi
     238(progn
    236239;;; NSDecimal
    237240(define-typed-foreign-struct-class ns::ns-decimal (:<NSD>ecimal ns::ns-decimal-p nil nil nil)
     
    284287    (describe-macptr-allocation-and-address d stream)))
    285288
    286 
     289)
    287290
    288291   
     
    418421
    419422(defun method-typestring (method)
    420   (%get-cstring #+apple-objc-2.0
     423  (%get-cstring #+(or apple-objc-2.0 cocotron-objc)
    421424                (#_method_getTypeEncoding method)
    422                 #-apple-objc-2.0
     425                #-(or apple-objc-2.0 cocotron-objc)
    423426                (pref method :objc_method.method_types)))
    424427
     
    891894(defun %call-next-objc-method (self class selector sig &rest args)
    892895  (declare (dynamic-extent args))
    893   (rlet ((s :objc_super #+apple-objc :receiver #+gnu-objc :self self
    894             #+apple-objc-2.0 :super_class #-apple-objc-2.0 :class
    895             #+apple-objc-2.0 (#_class_getSuperclass class)
    896             #-apple-objc-2.0 (pref class :objc_class.super_class)))
     896  (rlet ((s :objc_super #+(or apple-objc cocotron-objc) :receiver #+gnu-objc :self self
     897            #+(or apple-objc-2.0 cocotron-objc)  :super_class #-(or apple-objc-2.0 cocotron-objc) :class
     898            #+(or apple-objc-2.0 cocotron-objc) (#_class_getSuperclass class)
     899            #-(or apple-objc-2.0 cocotron-objc) (pref class :objc_class.super_class)))
    897900    (let* ((siginfo (objc-method-signature-info sig))
    898901           (function (or (objc-method-signature-info-super-function siginfo)
     
    904907
    905908(defun %call-next-objc-class-method (self class selector sig &rest args)
    906   (rlet ((s :objc_super #+apple-objc :receiver #+gnu-objc :self self
    907             #+apple-objc-2.0 :super_class #-apple-objc-2.0 :class
    908             #+apple-objc-2.0 (#_class_getSuperclass (pref class :objc_class.isa))
    909             #-apple-objc-2.0 (pref (pref class #+apple-objc :objc_class.isa #+gnu-objc :objc_class.class_pointer) :objc_class.super_class)))
     909  (rlet ((s :objc_super #+(or apple-objc cocotron-objc) :receiver #+gnu-objc :self self
     910            #+(or apple-objc-2.0 cocotron-objc) :super_class #-(or apple-objc-2.0 cocotron-objc) :class
     911            #+(or apple-objc-2.0 cocotron-objc) (#_class_getSuperclass (pref class :objc_class.isa))
     912            #-(or apple-objc-2.0 cocotron-objc) (pref (pref class #+apple-objc :objc_class.isa #+gnu-objc :objc_class.class_pointer) :objc_class.super_class)))
    910913    (let* ((siginfo (objc-method-signature-info sig))
    911914           (function (or (objc-method-signature-info-super-function siginfo)
Note: See TracChangeset for help on using the changeset viewer.