if any typedef in the chain has a pointer-c-type, use it

db4
Joe Groff 2010-02-23 08:09:33 -08:00
parent 3d97bd2ae0
commit 75e2a5098e
2 changed files with 9 additions and 1 deletions

View File

@ -44,6 +44,14 @@ TYPEDEF: char MyFunkyChar
[ f ] [ pointer: char c-type pointer: MyFunkyChar c-type = ] unit-test
[ { char* ascii } ] [ pointer: MyFunkyChar c-type ] unit-test
TYPEDEF: MyFunkyChar MyFunkyTypedef
[ { char* ascii } ] [ pointer: MyFunkyTypedef c-type ] unit-test
TYPEDEF: MyFunkyChar* MyFunkyString
[ { char* ascii } ] [ MyFunkyString c-type ] unit-test
TYPEDEF: char* MyString
[ t ] [ char* c-type MyString c-type = ] unit-test

View File

@ -301,7 +301,7 @@ CONSTANT: primitive-types
: special-pointer-type ( type -- special-type )
dup c-type-word? [
dup "pointer-c-type" word-prop
[ ] [ resolve-pointer-typedef "pointer-c-type" word-prop ] ?if
[ ] [ "c-type" word-prop special-pointer-type ] ?if
] [ drop f ] if ;
: primitive-pointer-type? ( type -- ? )