Handbook
Glossary
callback-parameter-quot ( params -- quot )
Vocabulary
stack-checker
.
alien
Inputs
params
an
alien-node-params
Outputs
quot
a
quotation
Word description
Builds a quotation which coerces values on the stack to the required types for an alien callback. This word is essentially the opposite to
param-prep-quot
.
Examples
USING: alien.c-types prettyprint stack-checker.alien ; T{ alien-node-params { parameters { c-string } } } callback-parameter-quot .
[ { object } declare [ ] dip utf8 alien>string ]
Definition
USING:
accessors
alien.c-types
combinators
kernel
kernel.private
sequences
;
IN:
stack-checker.alien
:
callback-parameter-quot
( params -- quot )
parameters>>
[
lookup-c-type
]
map
[
[
c-type-class
]
map
[
declare
]
curry
]
[
[
c-type-boxer-quot
]
map
deep-spread>quot
]
bi
append
;