Changeset 133


Ignore:
Timestamp:
Dec 19, 2003, 1:36:02 PM (21 years ago)
Author:
Gary Byers
Message:

Require (new) OBJC-RUNTIME. Conditionalize a little for runtime differences
(needs more work.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/examples/bridge.lisp

    r124 r133  
    2525(in-package "CCL")
    2626
    27 #+darwinppc-target
    28 (require "APPLE-OBJC")
    29 #+linuxppc-target
    30 (require "GNU-OBJC")
     27(require "OBJC-RUNTIME")
    3128(require "NAME-TRANSLATION")
    3229
    3330
    34 ;;; Define the #@"XXX" dispatch macro for constant NSStrings from APPLE-OBJ.LISP
    35 ;;; in the current readtable
    36 
    37 (set-dispatch-macro-character
    38  #\#
    39  #\@
    40  (nfunction
    41   |objc-#@-reader|
    42   (lambda (stream subchar numarg)
    43     (declare (ignore subchar numarg))
    44     (let* ((string (read stream)))
    45       (check-type string string)
    46       `(@ ,string)))))
    4731
    4832
     
    190174
    191175(defun get-method (class sel)
    192   (let ((m (#_class_getInstanceMethod class sel)))
     176  (let ((m (class-get-instance-method class sel)))
    193177    (if (%null-ptr-p m)
    194178      (error "Instances of ObjC class ~S cannot respond to the message ~S"
     
    201185
    202186(defun get-class-method (class sel)
    203   (let ((m (#_class_getClassMethod class sel)))
     187  (let ((m (class-get-class-method class sel)))
    204188    (if (%null-ptr-p m)
    205189      (error "ObjC class ~S cannot respond to the message ~S"
     
    385369   (objc-foreign-arg-type (method-typestring m))
    386370   (%stack-block ((type 4) (offset 4))
    387      (loop for i from 2 below (#_method_getNumberOfArguments m)
     371     (loop for i from 2 below (method-get-number-of-arguments m)
    388372           do (#_method_getArgumentInfo m i type offset)
    389373           collect
Note: See TracChangeset for help on using the changeset viewer.