Changeset 6058
- Timestamp:
- Mar 17, 2007, 7:14:17 PM (18 years ago)
- File:
-
- 1 edited
-
branches/objc-gf/ccl/examples/objc-support.lisp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/objc-gf/ccl/examples/objc-support.lisp
r5937 r6058 9 9 (send class 'alloc)) 10 10 11 12 #-apple-objc-2.0 13 (progn 14 (def-foreign-type :<CGF>loat :float) 15 (def-foreign-type :<NSUI>nteger :unsigned) 16 (def-foreign-type :<NSI>nteger :signed) 17 ) 18 19 (defconstant +cgfloat-zero+ 20 #+(and apple-objc-2.0 64-bit-target) 0.0d0 21 #-(and apple-objc-2.0 64-bit-target) 0.0f0) 22 23 (deftype cg-float () 24 #+(and apple-objc-2.0 64-bit-target) 'double-float 25 #-(and apple-objc-2.0 64-bit-target) 'single-float) 11 (defun conforms-to-protocol (thing protocol) 12 (objc-message-send thing "conformsToProtocol:" :address (objc-protocol-address protocol) :<BOOL>)) 13 14 15 26 16 27 17 #+apple-objc … … 51 41 (declare (dynamic-extent name)) 52 42 (%str-from-ptr cname namelen name) 53 (unless (gethash name *objc-protocols*) 54 (setf (gethash (subseq name 0) *objc-protocols*) 55 (%inc-ptr p 0)))))) 43 (let* ((proto (or (gethash name *objc-protocols*) 44 (progn 45 (setq name (subseq name 0)) 46 (setf (gethash name *objc-protocols*) 47 (make-objc-protocol :name name)))))) 48 (unless (objc-protocol-address proto) 49 (setf (objc-protocol-address proto) (%inc-ptr p 0))) 50 proto)))) 56 51 57 52 (defun note-class-protocols (class)
Note:
See TracChangeset
for help on using the changeset viewer.
