Ignore:
Timestamp:
Jun 28, 2009, 8:52:36 AM (10 years ago)
Author:
gb
Message:

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.

File:
1 edited

Legend:

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

    r12207 r12313  
    387387(defun %cf-instance-p (instance)
    388388  (> (objc-message-send instance "_cfTypeID" #>CFTypeID) 1))
     389 
    389390
    390391(defun initialized-nsobject-p (nsobject)
    391392  (or (objc-class-p nsobject)
    392393      (objc-metaclass-p nsobject)
     394      (has-lisp-slot-vector nsobject)
    393395      (let* ((cf-p (%cf-instance-p nsobject))
    394396             (isize (if cf-p (#_malloc_size nsobject) (%objc-class-instance-size (#/class nsobject))))
     
    413415            (ns:with-ns-range (r 0 *objc-description-max-length*)
    414416              (format nil "~a[...]"(lisp-string-from-nsstring (#/substringWithRange: desc r)))))))
    415     ""))
     417    "[uninitialized]"))
    416418
    417419
Note: See TracChangeset for help on using the changeset viewer.