I have an opaque type in my library defined as:
typedef struct MyOpaqueType* MyType; // easier to type for client code
I can't pass a pointer-to-const struct around using the typedef, so some functions look like:
void UsePointerToConst ( const struct MyOpaqueType * )
instead of:
void UserPointerToConst( const MyType ) // can't use, is really constant pointer
So, given this, I have two questions: Is the struct keyword in the parameter list only necessary in C? Is there a better way to do this? Should I create a typedef such as:
typedef const struct MyOpaqueType* ConstantMyType; ?