Changeset 38573 in project for release/5/box/trunk


Ignore:
Timestamp:
04/06/20 02:59:30 (13 months ago)
Author:
Kon Lovett
Message:

srfi-111 bindings procedure

Location:
release/5/box/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/5/box/trunk/box.egg

    r38569 r38573  
    33
    44((synopsis "Boxing")
    5  (version "3.2.3")
     5 (version "3.2.4")
    66 (category data)
    77 (license "BSD")
     
    1616    ;no -strict-types ; has generic returns; ex: make-box
    1717    (csc-options
    18       "-O3" "-d1" "-local" "-no-procedure-checks-for-toplevel-bindings") )
     18      "-O3" "-d1" "-local" "-no-procedure-checks-for-toplevel-bindings"))
    1919  (extension box
    2020    (types-file)
    2121    (component-dependencies box-core srfi-111)
    2222    (csc-options
    23       "-O3" "-d1" "-local" "-strict-types" "-no-procedure-checks-for-toplevel-bindings") )
     23      "-O3" "-d1" "-local" "-strict-types" "-no-procedure-checks-for-toplevel-bindings"))
    2424  (extension srfi-111
    2525    (types-file)
    2626    (component-dependencies box-core)
    2727    (csc-options
    28       "-O3" "-d1" "-local" "-strict-types" "-no-procedure-checks-for-toplevel-bindings") ) ) )
     28      "-O3" "-d1" "-local" "-strict-types" "-no-procedure-checks-for-toplevel-bindings")) ) )
  • release/5/box/trunk/srfi-111.scm

    r38550 r38573  
    88
    99(;export
    10   box
    11   box?
    12   unbox
    13   set-box!
     10  box box? unbox set-box!
    1411  immutable-box)
    1512
     
    1916(import (chicken type))
    2017(import (only (chicken platform) register-feature!))
    21 (import box-core)
     18(import (only box-core box? make-box-mutable make-box-immutable box-ref box-set!))
    2219
    23 ;;;
     20;;
    2421
    25 (define-syntax box
    26   (syntax-rules ()
    27     ((box ?arg)
    28       (make-box-mutable ?arg) ) ) )
     22(define (box arg)           (make-box-mutable arg))
     23(define (immutable-box arg) (make-box-immutable arg))
     24(define (unbox box)         (box-ref box))
     25(define (set-box! box val)  (box-set! box val))
    2926
    30 (define-syntax immutable-box
    31   (syntax-rules ()
    32     ((immutable-box ?arg)
    33       (make-box-immutable ?arg) ) ) )
    34 
    35 (define-syntax unbox
    36   (syntax-rules ()
    37     ((unbox ?box)
    38       (box-ref ?box) ) ) )
    39 
    40 (define-syntax set-box!
    41   (syntax-rules ()
    42     ((set-box! ?box ?val)
    43       (box-set! ?box ?val) ) ) )
    44 
    45 ;;;
     27;;
    4628
    4729(register-feature! 'srfi-111)
Note: See TracChangeset for help on using the changeset viewer.