alien.marshall.types: added pointer-to-non-const-primitive?

db4
Jeremy Hughes 2009-07-15 16:41:06 +12:00
parent 30698cc534
commit e4fbb978a3
1 changed files with 6 additions and 0 deletions

View File

@ -40,6 +40,12 @@ MEMO: resolved-primitives ( -- seq )
factorize-type
{ [ pointer? ] [ type-sans-pointer primitive-type? ] } 1&& ;
: pointer-to-non-const-primitive? ( str -- ? )
{
[ pointer-to-const? not ]
[ factorize-type pointer-to-primitive? ]
} 1&& ;
: types-effect>params-return ( types effect -- params return )
[ in>> zip ]
[ nip out>> dup length 0 > [ first ] [ drop "void" ] if ]