Index: /branches/objc-gf/ccl/examples/objc-support.lisp
===================================================================
--- /branches/objc-gf/ccl/examples/objc-support.lisp	(revision 6057)
+++ /branches/objc-gf/ccl/examples/objc-support.lisp	(revision 6058)
@@ -9,19 +9,9 @@
   (send class 'alloc))
 
-
-#-apple-objc-2.0
-(progn
-  (def-foreign-type :<CGF>loat :float)
-  (def-foreign-type :<NSUI>nteger :unsigned)
-  (def-foreign-type :<NSI>nteger :signed)
-  )
-
-(defconstant +cgfloat-zero+
-  #+(and apple-objc-2.0 64-bit-target) 0.0d0
-  #-(and apple-objc-2.0 64-bit-target) 0.0f0)
-
-(deftype cg-float ()
-    #+(and apple-objc-2.0 64-bit-target) 'double-float
-    #-(and apple-objc-2.0 64-bit-target) 'single-float)
+(defun conforms-to-protocol (thing protocol)
+  (objc-message-send thing "conformsToProtocol:" :address (objc-protocol-address protocol) :<BOOL>))
+
+
+
 
 #+apple-objc
@@ -51,7 +41,12 @@
       (declare (dynamic-extent name))
       (%str-from-ptr cname namelen name)
-      (unless (gethash name *objc-protocols*)
-        (setf (gethash (subseq name 0) *objc-protocols*)
-              (%inc-ptr p 0))))))
+      (let* ((proto (or (gethash name *objc-protocols*)
+                        (progn
+                          (setq name (subseq name 0))
+                          (setf (gethash name *objc-protocols*)
+                                (make-objc-protocol :name name))))))
+        (unless (objc-protocol-address proto)
+          (setf (objc-protocol-address proto) (%inc-ptr p 0)))
+        proto))))
 
 (defun note-class-protocols (class)
