3 ms·
Not including the struct in the header defeats the ability of the user to control where the type is allocated in memory, among other things. That’s a feature th
by yoklov 9y ago
Not including the struct in the header defeats the ability of the user to control where the type is allocated in memory, among other things. That’s a feature that many c programmers are willing to give up a certain degree of api/abi compatibility for. It’s just a different tradeoff, neither is the best choice in all cases.
Of course, if you’re willing to put in a lot of extra legwork, you can do what pthreads does, and define dummy types with the same size for this.