Paste: utilities

Author: slava
Mode: factor
Date: Sun, 19 Sep 2010 00:44:22
Plain Text |
: *value ( c-ptr c-type -- value )
    [ [ 0 ] dip heap-size <byte-array> ] keep alien-value ; inline

:: <value> ( value c-type -- c-ptr )
    c-type heap-size <byte-array> :> c-ptr
    value 0 c-ptr set-alien-value
    c-ptr ; inline

Annotation: fix

Author: slava
Mode: factor
Date: Sun, 19 Sep 2010 00:45:57
Plain Text |
: *value ( c-ptr c-type -- value )
    [ [ 0 ] dip heap-size <byte-array> ] keep alien-value ; inline

:: <value> ( value c-type -- c-ptr )
    c-type heap-size <byte-array> :> c-ptr
    value 0 c-ptr c-type set-alien-value
    c-ptr ; inline

Annotation: another fix

Author: erg
Mode: factor
Date: Sun, 19 Sep 2010 19:26:03
Plain Text |
: *value ( c-ptr c-type -- value )
    [ [ 0 ] dip heap-size <byte-array> ] keep alien-value ; inline

:: <value> ( value c-type -- c-ptr )
    c-type heap-size <byte-array> :> c-ptr
    value c-ptr 0 c-type set-alien-value
    c-ptr ; inline

Annotation: damn homie

Author: erg
Mode: factor
Date: Sun, 19 Sep 2010 23:31:28
Plain Text |
: *value ( c-ptr c-type -- value )
    [ 0 ] dip alien-value ; inline

:: <value> ( value c-type -- c-ptr )
    c-type heap-size <byte-array> :> c-ptr
    value c-ptr 0 c-type set-alien-value
    c-ptr ; inline

New Annotation

Summary:
Author:
Mode:
Body: