delete malloc-file-contents 'cause it sucks and nobody likes it
parent
dd691a61e8
commit
3a1bb22618
|
@ -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
|
||||
|
|
|
@ -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 ] ;
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue