Fixed bug where primitive-type? could not handle "Class*" types
parent
519277a0a0
commit
c32d7c5c97
|
@ -1,7 +1,7 @@
|
|||
! Copyright (C) 2009 Jeremy Hughes.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: alien.c-types assocs combinators.short-circuit fry
|
||||
kernel memoize sequences splitting ;
|
||||
USING: alien.c-types assocs combinators.short-circuit
|
||||
continuations fry kernel memoize sequences splitting ;
|
||||
IN: alien.inline.types
|
||||
|
||||
: factorize-type ( str -- str' )
|
||||
|
@ -19,8 +19,10 @@ MEMO: resolved-primitives ( -- seq )
|
|||
primitive-types [ resolve-typedef ] map ;
|
||||
|
||||
: primitive-type? ( type -- ? )
|
||||
factorize-type resolve-typedef [ resolved-primitives ] dip
|
||||
'[ _ = ] any? ;
|
||||
[
|
||||
factorize-type resolve-typedef [ resolved-primitives ] dip
|
||||
'[ _ = ] any?
|
||||
] [ 2drop f ] recover ;
|
||||
|
||||
: pointer? ( type -- ? )
|
||||
[ "*" tail? ] [ "&" tail? ] bi or ;
|
||||
|
|
Loading…
Reference in New Issue