What does it mean when there are three items in a typedef?
For example:
typedef CK_BYTE CK_PTR CK_BYTE_PTR;
I know that if you just have typedef CK_BYTE CK_PTR; then CK_BYTE would just be able to be referred to as CK_PTR.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A bit of Googling indicates that
CK_PTRis a macro defined inpkcs11.h. Follow that link to see the documentation for these definitions.It’s normally defined as:
but on some ancient systems it might be defined as
where
faris a mostly obsolete system-specific keyword that specifies a certain non-standard kind of pointer.So this:
is equivalent to this (much clearer) code:
which defined
CK_BYTE_PTRas a pointer to aCK_BYTE.The quoted definition of
CK_BYTE_PTRoccurs in the same header file.