alien.c-types: remove void? word

db4
Slava Pestov 2010-02-22 21:31:41 +13:00
parent 1986dc49e4
commit 7578429692
2 changed files with 5 additions and 7 deletions
basis/alien

View File

@ -17,8 +17,9 @@ SYMBOLS:
long ulong
longlong ulonglong
float double
void* bool
void ;
void* bool ;
SINGLETON: void
DEFER: <int>
DEFER: *char
@ -57,9 +58,6 @@ GENERIC: resolve-pointer-type ( name -- c-type )
<< \ void \ void* "pointer-c-type" set-word-prop >>
: void? ( c-type -- ? )
{ void "void" } member? ;
M: word resolve-pointer-type
dup "pointer-c-type" word-prop
[ ] [ drop void* ] ?if ;

View File

@ -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.
USING: accessors alien alien.c-types alien.parser
alien.libraries arrays assocs classes combinators
@ -66,7 +66,7 @@ IN: alien.parser
2 group [ first2 normalize-c-arg 2array ] map
unzip [ "," ?tail drop ] map
]
[ [ { } ] [ 1array ] if-void ]
[ dup "void" = [ drop { } ] [ 1array ] if ]
bi* <effect> ;
: function-quot ( return library function types -- quot )