]> gitweb.factorcode.org Git - factor.git/commitdiff
docs, wrapping structs: add links to memory>struct and <direct-T-array>
authorJon Harper <jon.harper87@gmail.com>
Sat, 9 Jan 2016 17:27:46 +0000 (18:27 +0100)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sat, 9 Jan 2016 21:54:21 +0000 (13:54 -0800)
basis/classes/struct/struct-docs.factor

index 4c6b8f4ca092fd3be285e1dcc05b92b04154fc4f..331aebe22a1e77a4b399d36161e842214fcf3740 100644 (file)
@@ -170,7 +170,7 @@ ARTICLE: "classes.struct.c" "Passing structs to C functions"
 $nl
 "If a parameter is declared with a struct type, the parameter is passed by value. To pass a struct by reference, declare a parameter with a pointer to struct type."
 $nl
-"If a C function is declared as returning a struct type, the struct is returned by value, and wrapped in an instance of the correct struct class automatically. If a C function is declared as returning a pointer to a struct, it will return an " { $link alien } " instance. This is because there is no way to distinguish between a pointer to a single struct and a pointer to an array of zero or more structs. It is up to the caller to wrap it in a struct, or a specialized array of structs, respectively."
+"If a C function is declared as returning a struct type, the struct is returned by value, and wrapped in an instance of the correct struct class automatically. If a C function is declared as returning a pointer to a struct, it will return an " { $link alien } " instance. This is because there is no way to distinguish between a pointer to a single struct and a pointer to an array of zero or more structs. It is up to the caller to wrap it in a struct using " { $link memory>struct } ", or a specialized array of structs using " { $snippet "<direct-T-array>" } ", respectively."
 $nl
 "An example of a struct declaration:"
 { $code