Changeset 14825 in project


Ignore:
Timestamp:
05/29/09 10:15:48 (10 years ago)
Author:
felix winkelmann
Message:

java-ref accepts string or symbol

Location:
release/4/javahack
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • release/4/javahack/doc.scm

    r14821 r14825  
    4141
    4242     (history
    43       (version "0.2" "Initial release"))
     43      (version "0.3" "Initial release"))
    4444
    4545     (usage)
  • release/4/javahack/javahack.scm

    r14821 r14825  
    137137  (java-send `((.get *id-table* ',id) ,@(map java-argument args))) )
    138138
     139(define (name->symbol x)
     140  (cond ((symbol? x) x)
     141        ((string? x) (string->symbol x))
     142        (else (error 'java-ref "invalid name" x))))
     143
    139144(define java-ref
    140145  (getter-with-setter
    141    (lambda (s) (java-send (string->symbol s)))
     146   (lambda (s) (java-send (name->symbol s)))
    142147   (lambda (s x)
    143      (java-send `(set! ,(string->symbol s) ,(java-argument x)) ) ) ) )
     148     (java-send `(set! ,(name->symbol s) ,(java-argument x)) ) ) ) )
    144149
    145150(define (java-import . xs)
  • release/4/javahack/javahack.setup

    r14821 r14825  
    88 '("javahack.so" "jscheme.jar" "javahack-wrap.scm")
    99 '((syntax)
    10    (version "0.2")
     10   (version "0.3")
    1111   (documentation "javahack.html")))
Note: See TracChangeset for help on using the changeset viewer.