typedef ( old new -- ) (original) (raw)
Inputs
old | a C type |
---|---|
new | a C type |
Outputs
None
Word description
Aliases the C type old under the name new.
Notes
Using this word in the same source file which defines C bindings can cause problems, because words are compiled before top-level forms are run. Use the TYPEDEF: word instead.
See also
TYPEDEF:
Definition
USING: combinators kernel words words.symbol ;
: typedef ( old new -- )
{ [ nip define-symbol ] [ swap "c-type" set-word-prop ] }
2cleave ;