Documentation fixes and bootstrap fix

slava 2006-03-27 00:13:34 +00:00
parent ffd36265f1
commit 6662637374
2 changed files with 4 additions and 4 deletions

View File

@ -56,21 +56,21 @@ HELP: alien>string "( c-ptr -- string )"
HELP: <malloc-array> "( n type -- alien )"
{ $values { "n" "a non-negative integer" } { "type" "a string" } { "alien" "an alien address" } }
{ $description "Allocates an unmanaged memory block large enough to hold " { $snippet "n" } " values of a C type." }
{ $warning "You must free blocks with a call to " { $link free } " when they are no longer needed." }
{ $warning "Don't forget to deallocate the memory with a call to " { $link free } "." }
{ $errors "Throws an error if the type does not exist, if the requested size is negative, or if memory allocation fails." }
{ $see-also <c-array> } ;
HELP: <malloc-object> "( type -- alien )"
{ $values { "type" "a string" } { "alien" "an alien address" } }
{ $description "Allocates an unmanaged memory block large enough to hold a value of a C type." }
{ $warning "You must free blocks with a call to " { $link free } " when they are no longer needed." }
{ $warning "Don't forget to deallocate the memory with a call to " { $link free } "." }
{ $errors "Throws an error if the type does not exist or if memory allocation fails." }
{ $see-also <c-object> } ;
HELP: <malloc-string> "( string -- alien )"
{ $values { "string" "a string" } { "alien" "an alien address" } }
{ $description "Copies a string to an unmanaged memory block large enough to hold a copy of the string in 8-bit ASCII encoding, with a trailing null byte." }
{ $warning "You must free blocks with a call to " { $link free } " when they are no longer needed." }
{ $warning "Don't forget to deallocate the memory with a call to " { $link free } "." }
{ $errors "Throws an error if memory allocation fails." }
{ $see-also string>alien } ;

View File

@ -46,7 +46,7 @@ SYMBOL: crossref
: (add-crossref) crossref get [ dupd nest set-hash ] bind ;
: add-crossref ( word -- )
crossref get over interned? and [
crossref get over word-vocabulary and [
dup dup uses [ (add-crossref) ] each-with
] when drop ;