Handbook
Glossary
load-file-data-bytes ( fileName -- bytes/f )
Raylib memory ownership
Prev:
load-file-data ( fileName bytesRead -- uchar* )
Next:
load-file-text-raw ( fileName -- char* )
Vocabulary
raylib
Inputs
fileName
a
c-string
Outputs
bytes/f
a byte array or f
Word description
Loads exactly the reported number of bytes into an owned Factor byte array and releases the native allocation, including on an exceptional exit. Returns f when loading fails.
Definition
USING:
alien.c-types
alien.data
continuations
kernel
;
IN:
raylib
::
load-file-data-bytes
( fileName -- bytes/f )
0
int
<ref>
:>
count fileName count
load-file-data
:>
pointer
[
pointer
[
pointer count
int
deref
memory>byte-array
]
[
f
]
if
]
[
pointer
unload-file-data
]
finally
;