alien.marshall.syntax: fix: return value unmarshaller
parent
09aea6d8e6
commit
ca740fcb03
|
@ -1,7 +1,7 @@
|
||||||
! Copyright (C) 2009 Jeremy Hughes.
|
! Copyright (C) 2009 Jeremy Hughes.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors alien.inline alien.inline.types alien.marshall
|
USING: accessors alien.inline alien.inline.types alien.marshall
|
||||||
combinators effects generalizations kernel locals namespaces
|
combinators effects generalizations kernel locals make namespaces
|
||||||
quotations sequences words ;
|
quotations sequences words ;
|
||||||
IN: alien.marshall.syntax
|
IN: alien.marshall.syntax
|
||||||
|
|
||||||
|
@ -11,10 +11,14 @@ IN: alien.marshall.syntax
|
||||||
[ out>> types [ pointer-to-primitive? ] filter append ]
|
[ out>> types [ pointer-to-primitive? ] filter append ]
|
||||||
bi <effect>
|
bi <effect>
|
||||||
[
|
[
|
||||||
types [ marshaller ] map \ spread rot
|
[
|
||||||
types length \ nkeep
|
types [ marshaller ] map , \ spread , ,
|
||||||
types [ out-arg-unmarshaller ] map \ spread
|
types length , \ nkeep ,
|
||||||
7 narray >quotation
|
types [ out-arg-unmarshaller ] map
|
||||||
|
effect out>> dup empty?
|
||||||
|
[ drop ] [ first unmarshaller prefix ] if
|
||||||
|
, \ spread ,
|
||||||
|
] [ ] make
|
||||||
] dip ;
|
] dip ;
|
||||||
|
|
||||||
: define-c-marshalled ( function types effect -- )
|
: define-c-marshalled ( function types effect -- )
|
||||||
|
|
Loading…
Reference in New Issue