Changeset 122
- Timestamp:
- Dec 13, 2003, 1:53:54 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/ccl/examples/gnu-objc.lisp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/examples/gnu-objc.lisp
r6 r122 26 26 (use-interface-dir :gnustep)) 27 27 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 29 45 30 46 (def-ccl-pointers gnustep-framework () 31 47 (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*)) 35 49 (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") 41 54 ) 42 55
Note:
See TracChangeset
for help on using the changeset viewer.
