From: Donal K. F. <don...@ma...> - 2012-07-17 19:05:57
|
On 17/07/2012 18:34, Jan Nijtmans wrote: > There's nothing wrong with defining MODULE_SCOPE in the makefile. > But only including tclThread.h should not need the MODULE_SCOPE > macro. The real problem here is that MODULE_SCOPE functions don't > belong in an external header file. Precisely. The MODULE_SCOPE macro is meant to be defined to be whatever magic is required to make a symbol local to a linked library; it purges the symbol from the DLL's export table. (Not all platforms support it; then it's just best set to plain old 'extern'.) Because of this interpretation, it's never right to set it on a symbol in a public header file; anything that uses it is being *defined* to be not accessible to the general public. > Proposed solution: move internal function definitions like Sv_Init to a new > internal header file tclThreadInt.h. That part I agree with. I consider > Joe's commit as a quick-fix, but more cleanup should be done. Partitioning the API is a good idea. The simplest way is to just move the purely-internal symbols to threadInt.h (or whatever) and have that include the public header. Then you can just go through and update all the source files inside the Thread extension to include the internal API, otherwise changing nothing. (Minimal changes keep the amount of debugging down. :-)) Donal. |