From fdbf623bd4a2d4a64a3b472f6cc09514b0755abf Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Wed, 3 Dec 2008 09:45:42 -0600 Subject: [PATCH] Document struct arrays --- basis/struct-arrays/struct-arrays-docs.factor | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 basis/struct-arrays/struct-arrays-docs.factor diff --git a/basis/struct-arrays/struct-arrays-docs.factor b/basis/struct-arrays/struct-arrays-docs.factor new file mode 100644 index 0000000000..4a198e723c --- /dev/null +++ b/basis/struct-arrays/struct-arrays-docs.factor @@ -0,0 +1,23 @@ +IN: struct-arrays +USING: help.markup help.syntax alien strings math ; + +HELP: struct-array +{ $class-description "The class of C struct and union arrays." +$nl +"The " { $slot "underlying" } " slot holds a " { $link c-ptr } " with the raw data. This pointer can be passed to C functions." } ; + +HELP: +{ $values { "length" integer } { "c-type" string } } +{ $description "Creates a new array for holding values of the specified C type." } ; + +HELP: +{ $values { "alien" c-ptr } { "length" integer } { "c-type" string } } +{ $description "Creates a new array for holding values of the specified C type, backed by the memory at " { $snippet "alien" } "." } ; + +ARTICLE: "struct-arrays" "C struct and union arrays" +"The " { $vocab-link "struct-arrays" } " vocabulary implements arrays specialized for holding C struct and union values." +{ $subsection struct-array } +{ $subsection } +{ $subsection } ; + +ABOUT: "struct-arrays"