set-alien-value ( c-type -- quot )


Vocabulary
alien.c-types

Inputs and outputs
valuean object
c-ptra c-ptr
offsetan integer
c-typea 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 ;