Ignore:
Timestamp:
Jun 12, 2011, 4:38:20 AM (9 years ago)
Author:
gb
Message:

Move along. Nothing to see here.

File:
1 edited

Legend:

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

    r14698 r14821  
    88(defun allocate-objc-object (class)
    99  (#/alloc class))
     10
     11
    1012
    1113(defun conforms-to-protocol (thing protocol)
     
    665667  (objc-message-send instance "release"))
    666668
     669(defloadvar *tagged-instance-class-indices*
     670  (let* ((alist ()))
     671    ;; There should be a better way of doing this.  (A much better way.)
     672      (let* ((instance (#/initWithInt: (#/alloc ns:ns-number) 0))
     673             (tag (tagged-objc-instance-p instance)))
     674        (if tag
     675          (let* ((class (objc-message-send instance "class")))
     676            (unless (%null-ptr-p class)
     677              (install-foreign-objc-class class nil)
     678              (push (cons tag (objc-class-or-private-class-id class)) alist)))
     679          (#/release instance)))
     680      alist))
     681
     682(defun objc-tagged-instance-class-index (tag)
     683  (cdr (assoc tag *tagged-instance-class-indices* :test #'eq)))
     684
    667685
    668686(provide "OBJC-SUPPORT")
Note: See TracChangeset for help on using the changeset viewer.