[Openmcl-cvs-notifications] r12313 - /trunk/source/objc-bridge/objc-support.lisp
gb at clozure.com
gb at clozure.com
Sun Jun 28 04:52:37 EDT 2009
Author: gb
Date: Sun Jun 28 04:52:36 2009
New Revision: 12313
Log:
NSObjects that have slot vectors are initialized, even if they're
subclasses of CF-bridged classes.
If printing an uninitialized NSObject, show that fact in the printed
representation.
Modified:
trunk/source/objc-bridge/objc-support.lisp
Modified: trunk/source/objc-bridge/objc-support.lisp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/objc-bridge/objc-support.lisp (original)
+++ trunk/source/objc-bridge/objc-support.lisp Sun Jun 28 04:52:36 2009
@@ -386,10 +386,12 @@
=
(defun %cf-instance-p (instance)
(> (objc-message-send instance "_cfTypeID" #>CFTypeID) 1))
+ =
=
(defun initialized-nsobject-p (nsobject)
(or (objc-class-p nsobject)
(objc-metaclass-p nsobject)
+ (has-lisp-slot-vector nsobject)
(let* ((cf-p (%cf-instance-p nsobject)) =
(isize (if cf-p (#_malloc_size nsobject) (%objc-class-instanc=
e-size (#/class nsobject))))
(skip (if cf-p (+ (record-length :id) 4 #+64-bit-target 4) (r=
ecord-length :id))))
@@ -412,7 +414,7 @@
(lisp-string-from-nsstring desc)
(ns:with-ns-range (r 0 *objc-description-max-length*)
(format nil "~a[...]"(lisp-string-from-nsstring (#/substring=
WithRange: desc r)))))))
- ""))
+ "[uninitialized]"))
=
=
=
More information about the Openmcl-cvs-notifications
mailing list