Changeset 122


Ignore:
Timestamp:
Dec 13, 2003, 1:53:54 PM (21 years ago)
Author:
Gary Byers
Message:

Revive efforts to get this working.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/examples/gnu-objc.lisp

    r6 r122  
    2626  (use-interface-dir :gnustep))
    2727
    28 (defparameter *gnustep-system-root* "/usr/lib/GNUstep")
     28(defparameter *gnustep-system-root* "/usr/GNUstep/")
     29
     30(defparameter *pending-loaded-classes* ())
     31
     32(defcallback register-class-callback (:address class :address category :void)
     33  (let* ((class (%inc-ptr class 0))    ; make a heap-allocated copy
     34         (cell (or (assoc class *pending-loaded-classes*)
     35                   (let* ((c (list class)))
     36                     (push c *pending-loaded-classes*)
     37                     c))))
     38;    (format t "~&~s: " (%get-cstring (pref class :objc_class.name)))
     39    (unless (%null-ptr-p category)
     40      (push (%inc-ptr category 0) (cdr cell))
     41      ;(format t "~&    ~s" (%get-cstring (pref category :objc_category.category_name)))
     42      )))
     43
     44   
    2945
    3046(def-ccl-pointers gnustep-framework ()
    3147  (or (getenv "GNUSTEP_SYSTEM_ROOT")
    32       (with-cstrs ((root (format nil "GNUSTEP_SYSTEM_ROOT=~a"
    33                                  *gnustep-system-root*)))
    34         (#_putenv root)))
     48      (setenv "GNUSTEP_SYSTEM_ROOT" *gnustep-system-root*))
    3549  (open-shared-library "libobjc.so.1")
    36   (open-shared-library "libcallback.so")
    37   (open-shared-library "libavcall.so")
    38   (open-shared-library "libxml2.so")
    39   (open-shared-library "/usr/lib/GNUstep/System/Libraries/powerpc/linux-gnu/gnu-gnu-gnu/libgnustep-base.so")
    40   (open-shared-library "/usr/lib/GNUstep/System/Libraries/powerpc/linux-gnu/gnu-gnu-gnu/libgnustep-gui.so")
     50  (setf (%get-ptr (foreign-symbol-address "_objc_load_callback"))
     51        register-class-callback)
     52  (open-shared-library "/usr/GNUstep/System/Library/Libraries/libgnustep-base.so")
     53  (open-shared-library "/usr/GNUstep/System/Library/Libraries/libgnustep-gui.so")
    4154  )
    4255
Note: See TracChangeset for help on using the changeset viewer.