Handbook
Glossary
memory>struct ( ptr class -- struct )
Factor handbook
»
C library interface
»
Struct classes
»
Creating instances of structs
Prev:
malloc-struct ( class -- struct )
Next:
(struct) ( class -- struct )
Vocabulary
classes
.
struct
Inputs
ptr
a
c-ptr
class
a
class
Outputs
struct
a
struct
Word description
Constructs a new
struct
of the specified
class
at the memory location referenced by
ptr
. The referenced memory is unchanged.
See also
<struct>
,
<struct-boa>
,
malloc-struct
Definition
USING:
classes
classes.tuple
combinators
kernel
;
IN:
classes.struct
:
memory>struct
( ptr class -- struct )
struct-class
check-instance
M\
tuple-class
boa
( ptr class -- struct )
execute-effect
;