Factor Documentation
|
Home
|
Glossary
|
Search
factorcode.org
set-alien-value ( c-type -- quot )
Vocabulary
alien.c-types
Inputs and outputs
value
an
object
c-ptr
a
c-ptr
offset
an
integer
c-type
a
c-type-name
Word description
Stores a value at a byte offset from a base C pointer.
Errors
Throws a
no-c-type
error if the type does not exist.
Definition
USING:
kernel
macros
sequences
;
IN:
alien.c-types
MACRO:
set-alien-value
( c-type -- quot )
[
c-type-unboxer-quot
[
[
]
]
[
[
2dip
]
curry
]
if-empty
]
[
c-type-setter
]
bi
append
;