I've read in different posts that the implementation of struct can be hidden in C by doing the following:
test.h:
typedef struct SomeTest *SomeTest;
SomeTest make();
test.c:
#include "test.h"
typedef struct SomeTest {
int data;
}*SomeTest;
What I wonder though: Is the line:
typedef struct SomeTest *SomeTest;
really needed that way? Wouldn't it be sufficient to:
test.h:
typedef struct SomeTest SomeTest;
SomeTest *make();
test.c:
#include "test.h"
struct SomeTest {
int data;
};
It's just that the line:
typedef struct SomeTest *SomeTest;
gives me headaches sometimes,...and it hides the fact that "SomeTest" is a pointer...