delete malloc-file-contents 'cause it sucks and nobody likes it

db4
Joe Groff 2009-10-07 19:30:06 -05:00
parent dd691a61e8
commit 3a1bb22618
2 changed files with 1 additions and 4 deletions

View File

@ -56,7 +56,6 @@ $nl
{ $subsections
malloc-object
malloc-byte-array
malloc-file-contents
}
"The " { $vocab-link "libc" } " vocabulary defines several words which directly call C standard library memory management functions:"
{ $subsections

View File

@ -56,9 +56,6 @@ M: word <c-direct-array>
: malloc-string ( string encoding -- alien )
string>alien malloc-byte-array ;
: malloc-file-contents ( path -- alien len )
binary file-contents [ malloc-byte-array ] [ length ] bi ;
M: memory-stream stream-read
[
[ index>> ] [ alien>> ] bi <displaced-alien>
@ -81,3 +78,4 @@ M: value-type c-type-setter ( type -- quot )
[ c-type-getter ] [ c-type-unboxer-quot ] [ heap-size ] tri
'[ @ swap @ _ memcpy ] ;