Changeset 14657 in project


Ignore:
Timestamp:
05/15/09 23:33:00 (11 years ago)
Author:
Jim Ursetto
Message:

foreigners: also accept keywords for enums

Location:
release/4/foreigners/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/4/foreigners/trunk/foreigners.scm

    r14310 r14657  
    6565          (##sys#hash-table-set! ##compiler#foreign-type-table tname `(c-pointer ,fname))
    6666
    67           (let ((%void 'void)  ; foreign-lambda* does not recognize renamed type identifiers
    68                 (%int 'int))
     67          (let ((%void 'void)  ; foreign-lambda* recognizes renamed type identifiers now,
     68                (%int 'int))   ; but we keep this temporarily for BC
    6969            (with-renamed r
    7070                (declare foreign-declare begin define foreign-lambda*
     
    240240                               ,@(map (lambda (e)
    241241                                        (match-let ([((symbol var) n d) e])
    242                                           `((,symbol) ,var)))
     242                                          `((,symbol ,(string->keyword
     243                                                       (symbol->string symbol)))
     244                                            ,var)))
    243245                                      enums)
    244246                               (,%else (,%error "not a member of enum" val
  • release/4/foreigners/trunk/foreigners.setup

    r14310 r14657  
    44 'foreigners
    55 '("foreigners.so" "foreigners.import.so")
    6  '((version 1.2) (syntax)))
     6 '((version 1.3) (syntax)))
Note: See TracChangeset for help on using the changeset viewer.