alien.marshall.syntax: arg renaming
parent
586cf9547f
commit
cddc5a3188
|
@ -6,8 +6,8 @@ quotations sequences words alien.marshall.structs lexer parser
|
||||||
vocabs.parser multiline ;
|
vocabs.parser multiline ;
|
||||||
IN: alien.marshall.syntax
|
IN: alien.marshall.syntax
|
||||||
|
|
||||||
:: marshalled-function ( function types effect -- word quot effect )
|
:: marshalled-function ( name types effect -- word quot effect )
|
||||||
function types effect factor-function
|
name types effect factor-function
|
||||||
[ in>> ]
|
[ in>> ]
|
||||||
[ out>> types [ pointer-to-primitive? ] filter append ]
|
[ out>> types [ pointer-to-primitive? ] filter append ]
|
||||||
bi <effect>
|
bi <effect>
|
||||||
|
@ -22,13 +22,13 @@ IN: alien.marshall.syntax
|
||||||
] [ ] make
|
] [ ] make
|
||||||
] dip ;
|
] dip ;
|
||||||
|
|
||||||
: define-c-marshalled ( function types effect body -- )
|
: define-c-marshalled ( name types effect body -- )
|
||||||
[
|
[
|
||||||
[ marshalled-function define-declared ]
|
[ marshalled-function define-declared ]
|
||||||
[ prototype-string ] 3bi
|
[ prototype-string ] 3bi
|
||||||
] dip append-function-body c-strings get push ;
|
] dip append-function-body c-strings get push ;
|
||||||
|
|
||||||
: define-c-marshalled' ( function effect body -- )
|
: define-c-marshalled' ( name effect body -- )
|
||||||
[
|
[
|
||||||
[ in>> ] keep
|
[ in>> ] keep
|
||||||
[ marshalled-function define-declared ]
|
[ marshalled-function define-declared ]
|
||||||
|
|
Loading…
Reference in New Issue