alien.c-types: remove void? word
parent
1986dc49e4
commit
7578429692
|
@ -17,8 +17,9 @@ SYMBOLS:
|
||||||
long ulong
|
long ulong
|
||||||
longlong ulonglong
|
longlong ulonglong
|
||||||
float double
|
float double
|
||||||
void* bool
|
void* bool ;
|
||||||
void ;
|
|
||||||
|
SINGLETON: void
|
||||||
|
|
||||||
DEFER: <int>
|
DEFER: <int>
|
||||||
DEFER: *char
|
DEFER: *char
|
||||||
|
@ -57,9 +58,6 @@ GENERIC: resolve-pointer-type ( name -- c-type )
|
||||||
|
|
||||||
<< \ void \ void* "pointer-c-type" set-word-prop >>
|
<< \ void \ void* "pointer-c-type" set-word-prop >>
|
||||||
|
|
||||||
: void? ( c-type -- ? )
|
|
||||||
{ void "void" } member? ;
|
|
||||||
|
|
||||||
M: word resolve-pointer-type
|
M: word resolve-pointer-type
|
||||||
dup "pointer-c-type" word-prop
|
dup "pointer-c-type" word-prop
|
||||||
[ ] [ drop void* ] ?if ;
|
[ ] [ drop void* ] ?if ;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
! Copyright (C) 2008, 2009 Slava Pestov, Doug Coleman.
|
! Copyright (C) 2008, 2010 Slava Pestov, Doug Coleman.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors alien alien.c-types alien.parser
|
USING: accessors alien alien.c-types alien.parser
|
||||||
alien.libraries arrays assocs classes combinators
|
alien.libraries arrays assocs classes combinators
|
||||||
|
@ -66,7 +66,7 @@ IN: alien.parser
|
||||||
2 group [ first2 normalize-c-arg 2array ] map
|
2 group [ first2 normalize-c-arg 2array ] map
|
||||||
unzip [ "," ?tail drop ] map
|
unzip [ "," ?tail drop ] map
|
||||||
]
|
]
|
||||||
[ [ { } ] [ 1array ] if-void ]
|
[ dup "void" = [ drop { } ] [ 1array ] if ]
|
||||||
bi* <effect> ;
|
bi* <effect> ;
|
||||||
|
|
||||||
: function-quot ( return library function types -- quot )
|
: function-quot ( return library function types -- quot )
|
||||||
|
|
Loading…
Reference in New Issue