alien.inline: types->effect>params-return: fix for stack order and void return type

db4
Jeremy Hughes 2009-07-05 21:40:08 +12:00
parent f7ddd899c3
commit d2f6f99954
1 changed files with 3 additions and 1 deletions
basis/alien/inline

View File

@ -18,7 +18,9 @@ SYMBOL: c-strings
[ "(" subseq? not ] filter swap parse-arglist ;
: types-effect>params-return ( types effect -- params return )
[ nip out>> first ] [ in>> zip ] 2bi ;
[ in>> zip ]
[ nip out>> dup length 0 > [ first ] [ drop "void" ] if ]
2bi ;
: arg-list ( types -- params )
CHAR: a swap length CHAR: a + [a,b]