Handbook
Glossary
make-struct-prototype ( class -- prototype )
Vocabulary
classes
.
struct
.
private
Inputs
class
an
object
Outputs
prototype
an
object
Definition
USING:
accessors
byte-arrays
classes.struct
combinators
kernel
sequences
words
;
IN:
classes.struct.private
:
make-struct-prototype
( class -- prototype )
dup
struct-needs-prototype?
[
[
"c-type"
word-prop
size>>
<byte-array>
]
[
memory>struct
]
[
struct-slots
]
tri
[
[
initial>>
]
[
(writer-quot)
]
bi
over
[
swapd
[
( value struct -- )
call-effect
]
keepd
]
[
2drop
]
if
]
each
]
[
drop
f
]
if
;