Changeset 26001 in project


Ignore:
Timestamp:
02/28/12 05:38:37 (8 years ago)
Author:
Jim Ursetto
Message:

objc 0.5.2: use make egg; s/pointer/c-pointer/; remove objc:import-classes-at-toplevel! due to removed global-set!; totally untested

Location:
release/4/objc/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • release/4/objc/trunk/array.scm

    r9966 r26001  
    1414;;;; index i.
    1515(define pointer-ptr-ref
    16   (foreign-lambda* c-pointer (((pointer "void *") p) (int i)) "return(*(p+i));"))
     16  (foreign-lambda* c-pointer (((c-pointer "void *") p) (int i)) "return(*(p+i));"))
    1717
    1818;;;; Map a ptr-array into a list via PROC.  Each value passed to PROC
  • release/4/objc/trunk/classes.scm

    r14899 r26001  
    163163(define (objc:class-ivar-list class)
    164164  (define ivar-list-ref
    165     (foreign-lambda* c-pointer (((pointer "struct objc_ivar_list") ivars) (int i))
     165    (foreign-lambda* c-pointer (((c-pointer "struct objc_ivar_list") ivars) (int i))
    166166                     "return(&ivars->ivar_list[i]);"))
    167167
  • release/4/objc/trunk/convert.scm

    r23093 r26001  
    3333      `(,(r 'define) ,name
    3434        (,(r 'foreign-lambda*) ,to
    35          (((pointer ,from) obj)) "return(*obj);")))))
     35         (((c-pointer ,from) obj)) "return(*obj);")))))
    3636
    3737(define-result-conversion ref->float  float   "float")
     
    7373;; It would be cheaper to have a C function fill the record in one shot.  These are
    7474;; only used "during the making of".
    75 (define NSRect-x (foreign-lambda* float (((pointer "NSRect") rect)) "return(rect->origin.x);"))
    76 (define NSRect-y (foreign-lambda* float (((pointer "NSRect") rect)) "return(rect->origin.y);"))
    77 (define NSRect-width  (foreign-lambda* float (((pointer "NSRect") rect)) "return(rect->size.width);"))
    78 (define NSRect-height (foreign-lambda* float (((pointer "NSRect") rect)) "return(rect->size.height);"))
    79 (define NSRect-x-set! (foreign-lambda* void (((pointer "NSRect") rect) (float val))
     75(define NSRect-x (foreign-lambda* float (((c-pointer "NSRect") rect)) "return(rect->origin.x);"))
     76(define NSRect-y (foreign-lambda* float (((c-pointer "NSRect") rect)) "return(rect->origin.y);"))
     77(define NSRect-width  (foreign-lambda* float (((c-pointer "NSRect") rect)) "return(rect->size.width);"))
     78(define NSRect-height (foreign-lambda* float (((c-pointer "NSRect") rect)) "return(rect->size.height);"))
     79(define NSRect-x-set! (foreign-lambda* void (((c-pointer "NSRect") rect) (float val))
    8080                                       "rect->origin.x = val;"))
    81 (define NSRect-y-set! (foreign-lambda* float (((pointer "NSRect") rect) (float val))
     81(define NSRect-y-set! (foreign-lambda* float (((c-pointer "NSRect") rect) (float val))
    8282                                       "rect->origin.y = val;"))
    8383(define NSRect-width-set!
    84   (foreign-lambda* float (((pointer "NSRect") rect) (float val)) "rect->size.width = val;"))
     84  (foreign-lambda* float (((c-pointer "NSRect") rect) (float val)) "rect->size.width = val;"))
    8585(define NSRect-height-set!
    86   (foreign-lambda* float (((pointer "NSRect") rect) (float val)) "rect->size.height = val;"))
     86  (foreign-lambda* float (((c-pointer "NSRect") rect) (float val)) "rect->size.height = val;"))
    8787
    8888(define-foreign-record-type (NSPoint "NSPoint")
     
    211211           (to (cadddr e)))
    212212       `(,(r 'define) ,name
    213           (,(r 'foreign-lambda*) c-pointer ((,from val) ((pointer ,to) buf))
     213          (,(r 'foreign-lambda*) c-pointer ((,from val) ((c-pointer ,to) buf))
    214214            "*buf = val; return(buf);"))))))
    215215
  • release/4/objc/trunk/objc-class-proxies-bin.scm

    r14899 r26001  
    3030
    3131(define gc-root-delete!
    32   (foreign-lambda* void (((pointer "void *") ptr))
     32  (foreign-lambda* void (((c-pointer "void *") ptr))
    3333                   "if (*ptr) CHICKEN_delete_gc_root(*ptr);"))
    3434
     
    3737;;;; For instance variables:
    3838(define scheme-object-wrapper-ref
    39   (foreign-lambda* scheme-object (((pointer "Scheme_Object_Wrapper *") ivar_ptr))
     39  (foreign-lambda* scheme-object (((c-pointer "Scheme_Object_Wrapper *") ivar_ptr))
    4040                   "return( [(*ivar_ptr) __scheme_object__] );"))
    4141
    4242(define scheme-object-wrapper-set!
    43   (foreign-lambda* void (((pointer "Scheme_Object_Wrapper *") ivar_ptr) (scheme-object obj)) #<<EOF
     43  (foreign-lambda* void (((c-pointer "Scheme_Object_Wrapper *") ivar_ptr) (scheme-object obj)) #<<EOF
    4444    if (*ivar_ptr == NULL) {
    4545      *ivar_ptr = [Scheme_Object_Wrapper alloc];
     
    5050
    5151(define scheme-object-wrapper-delete!
    52   (foreign-lambda* void (((pointer "Scheme_Object_Wrapper *") ivar_ptr))
     52  (foreign-lambda* void (((c-pointer "Scheme_Object_Wrapper *") ivar_ptr))
    5353                         "if (*ivar_ptr) [*ivar_ptr release];"))
    5454
     
    6767
    6868(define (objc:unwrap instance)
    69   (define wrapper->obj (foreign-lambda* scheme-object (((pointer "Scheme_Object_Wrapper") wrapper))
     69  (define wrapper->obj (foreign-lambda* scheme-object (((c-pointer "Scheme_Object_Wrapper") wrapper))
    7070                                        "return([wrapper __scheme_object__]);"))
    71   (define wrapper? (foreign-lambda* bool (((pointer "NSObject") o))
     71  (define wrapper? (foreign-lambda* bool (((c-pointer "NSObject") o))
    7272                                    "return([o isKindOfClass: [Scheme_Object_Wrapper class]]);"))
    7373  (let ((ptr (objc:instance->pointer instance)))
  • release/4/objc/trunk/objc-cocoa.scm

    r17870 r26001  
    3535 
    3636(define (ns:rect-fill r)
    37   (define NSRectFill (foreign-lambda* void (((pointer "NSRect") r))
     37  (define NSRectFill (foreign-lambda* void (((c-pointer "NSRect") r))
    3838                                      "NSRectFill(*r);"))
    3939  (NSRectFill (ns:rect->locative r)))
  • release/4/objc/trunk/objc-support.scm

    r17867 r26001  
    157157;; via the objc:class-ptr call, not by any other means.
    158158(define-foreign-type objc-class
    159   (pointer "struct objc_class")
     159  (c-pointer "struct objc_class")
    160160  (lambda (x) (objc:class-ptr x)))
    161161
     
    168168
    169169(define-foreign-type objc-instance
    170   (pointer "struct objc_object")
     170  (c-pointer "struct objc_object")
    171171  (lambda (x) (objc:instance-ptr x)))
    172172
     
    184184;; "Polymorphic" foreign type
    185185(define-foreign-type objc-instance-or-class
    186   (pointer "struct objc_object")
     186  (c-pointer "struct objc_object")
    187187  objc:class-or-instance-ptr)
    188188
     
    295295;; For this reason, we do not send a message to obtain the class name.
    296296;; XXX May not be safe at all now, if we use class proxies.
    297 (define (objc:import-classes-at-toplevel!)
     297;; Disabled in 0.5.2: global-set! has been removed.
     298#; (define (objc:import-classes-at-toplevel!)
    298299  (set! objc:classes (objc:get-class-list))
    299300  (for-each (lambda (x)
     
    425426(define string->selector (foreign-lambda c-pointer "sel_getUid" c-string))
    426427
    427 (define-foreign-type NSInvocation* (pointer "NSInvocation"))
     428(define-foreign-type NSInvocation* (c-pointer "NSInvocation"))
    428429(define get-return-value!
    429430  (foreign-lambda* void ((NSInvocation* inv) (scheme-pointer buf))
  • release/4/objc/trunk/objc.meta

    r23255 r26001  
    1 ;;; ajax.meta -*- Hen -*-
     1;;; objc.meta -*- Hen -*-
    22
    33((egg "objc.egg")
     
    55 (category ffi)
    66 (license "MIT")
    7  (needs easyffi foreigners)
    8  (author "Zbigniew")
     7 (needs easyffi foreigners make)
     8 (author "Jim Ursetto")
    99 (files "objc-cocoa.scm" "objc.setup" "objc.scm" "convert.scm" "doc/Makefile" "doc/eggdoc-zb.scm" "doc/eggdoc-objc.scm" "doc/impl-notes.txt" "doc/objc-04-changes.txt" "array.scm" "objc-runtime.h" "debug/locations.scm" "debug/closure.scm" "debug/foreign-types.scm" "debug/notes.txt" "debug/low.scm" "scheme-object.m" "scheme-object.h" "objc-class-proxies-bin.scm" "objc-class-proxies.scm" "classes.scm" "LICENSE" "alignment.scm" "objc.meta" "tests/proxy2.scm" "tests/type-test.h" "tests/Makefile" "tests/ffi-structs.scm" "tests/Temperature Converter.app/Contents/Info.plist" "tests/Temperature Converter.app/Contents/Resources/English.lproj/InfoPlist.strings" "tests/Temperature Converter.app/Contents/Resources/English.lproj/MainMenu.nib/info.nib" "tests/Temperature Converter.app/Contents/Resources/English.lproj/MainMenu.nib/classes.nib" "tests/Temperature Converter.app/Contents/Resources/English.lproj/MainMenu.nib/objects.nib" "tests/Temperature Converter.app/Contents/MacOS/Makefile" "tests/Temperature Converter.app/Contents/MacOS/temp-converter.scm" "tests/type-test.m" "tests/unit-test.scm" "tests/typetest.scm" "tests/proxy.scm" "tests/objc-proxy-test.scm" "objc-support.scm"))
  • release/4/objc/trunk/objc.scm

    r17872 r26001  
    207207   objc:define-method   
    208208   objc:get-class-list
    209    objc:import-classes-at-toplevel!
     209   ; objc:import-classes-at-toplevel!    ; disabled in 0.5.2
    210210   objc:instance?
    211211   objc:ivar-ref
  • release/4/objc/trunk/objc.setup

    r23093 r26001  
    11;;; objc setup file
     2(use make)
    23
    3 (define version "0.5.1")
     4(define version "0.5.2")
    45
    56(define easyffi? #t)
Note: See TracChangeset for help on using the changeset viewer.