Made factorize-type and cify-type public
parent
3cd4bd8106
commit
284ef4f048
|
@ -7,6 +7,14 @@ math.order math.ranges multiline namespaces sequences splitting
|
||||||
strings system vocabs.loader vocabs.parser words ;
|
strings system vocabs.loader vocabs.parser words ;
|
||||||
IN: alien.inline
|
IN: alien.inline
|
||||||
|
|
||||||
|
: factorize-type ( str -- str' )
|
||||||
|
"const-" ?head drop
|
||||||
|
"unsigned-" ?head [ "u" prepend ] when
|
||||||
|
"long-" ?head [ "long" prepend ] when ;
|
||||||
|
|
||||||
|
: cify-type ( str -- str' )
|
||||||
|
{ { CHAR: ~ CHAR: space } } substitute ;
|
||||||
|
|
||||||
<PRIVATE
|
<PRIVATE
|
||||||
SYMBOL: c-library
|
SYMBOL: c-library
|
||||||
SYMBOL: library-is-c++
|
SYMBOL: library-is-c++
|
||||||
|
@ -34,14 +42,6 @@ SYMBOL: c-strings
|
||||||
CHAR: a swap length CHAR: a + [a,b]
|
CHAR: a swap length CHAR: a + [a,b]
|
||||||
[ 1string ] map ;
|
[ 1string ] map ;
|
||||||
|
|
||||||
: factorize-type ( str -- str' )
|
|
||||||
"const-" ?head drop
|
|
||||||
"unsigned-" ?head [ "u" prepend ] when
|
|
||||||
"long-" ?head [ "long" prepend ] when ;
|
|
||||||
|
|
||||||
: cify-type ( str -- str' )
|
|
||||||
{ { CHAR: - CHAR: space } } substitute ;
|
|
||||||
|
|
||||||
: factor-function ( function types effect -- word quot effect )
|
: factor-function ( function types effect -- word quot effect )
|
||||||
annotate-effect [ c-library get ] 3dip
|
annotate-effect [ c-library get ] 3dip
|
||||||
[ [ factorize-type ] map ] dip
|
[ [ factorize-type ] map ] dip
|
||||||
|
|
Loading…
Reference in New Issue