1 USING: help.markup help.syntax byte-arrays alien ;
2 IN: specialized-arrays.direct
4 ARTICLE: "specialized-arrays.direct" "Direct-mapped specialized arrays"
5 "The " { $vocab-link "specialized-arrays.direct" } " vocabulary implements fixed-length sequence types for storing machine values in unmanaged C memory."
7 "For each primitive C type " { $snippet "T" } ", a set of words are defined:"
9 { { $snippet "direct-T-array" } { "The class of direct arrays with elements of type " { $snippet "T" } } }
10 { { $snippet "<direct-T-array>" } { "Constructor for arrays with elements of type " { $snippet "T" } "; stack effect " { $snippet "( alien len -- array )" } } }
12 "Each direct array has a " { $slot "underlying" } " slot holding an " { $link simple-alien } " pointer to the raw data. This data can be passed to C functions."
14 "The primitive C types for which direct arrays exist:"
24 { $snippet "longlong" }
25 { $snippet "ulonglong" }
31 "Direct arrays are generated with a functor in the " { $vocab-link "specialized-arrays.direct.functor" } " vocabulary." ;
33 ABOUT: "specialized-arrays.direct"