if any typedef in the chain has a pointer-c-type, use it
parent
3d97bd2ae0
commit
75e2a5098e
basis/alien/c-types
|
@ -44,6 +44,14 @@ TYPEDEF: char MyFunkyChar
|
||||||
[ f ] [ pointer: char c-type pointer: MyFunkyChar c-type = ] unit-test
|
[ f ] [ pointer: char c-type pointer: MyFunkyChar c-type = ] unit-test
|
||||||
[ { char* ascii } ] [ 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
|
TYPEDEF: char* MyString
|
||||||
|
|
||||||
[ t ] [ char* c-type MyString c-type = ] unit-test
|
[ t ] [ char* c-type MyString c-type = ] unit-test
|
||||||
|
|
|
@ -301,7 +301,7 @@ CONSTANT: primitive-types
|
||||||
: special-pointer-type ( type -- special-type )
|
: special-pointer-type ( type -- special-type )
|
||||||
dup c-type-word? [
|
dup c-type-word? [
|
||||||
dup "pointer-c-type" word-prop
|
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 ;
|
] [ drop f ] if ;
|
||||||
|
|
||||||
: primitive-pointer-type? ( type -- ? )
|
: primitive-pointer-type? ( type -- ? )
|
||||||
|
|
Loading…
Reference in New Issue