Paste: simple functor

Author: slava
Mode: factor
Date: Fri, 14 Nov 2008 12:48:55
Plain Text |
SLOT: address
SLOT: length

: mapped-file>direct ( mapped-file type -- alien length )
    [ [ address>> ] [ length>> ] bi ] dip
    heap-size [ 1- + ] keep /i ;

FUNCTOR: mapped-array-functor ( T -- )

C   DEFINES <mapped-${T}-array>
<A> IS      <direct-${T}-array>

WHERE

: C mapped-file>direct <A> execute ; inline

;FUNCTOR

New Annotation

Summary:
Author:
Mode:
Body: