Artifacts Associated With Ticket 941042ffffffffff
Ticket change [757ca373a5] (rid 105395) by jenglish on 2004-04-23 22:52:35:
- assignee initialized to: "mdejong"
- cmimetype initialized to: "text/plain"
- comment initialized to:
The attached patch replaces the (confusing, and incorrect) preprocessor gyrations: #ifdef BUILD_sample #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLEXPORT #endif with the usual Windows idiom, defining a distinct SAMPLE_STORAGE_CLASS macro instead of hijacking Tcl's EXTERN macro.
- foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "jenglish"
- subsystem initialized to: "70. Sample Extension"
- title initialized to: "Remove TCL_STORAGE_CLASS monkey business"
- type initialized to: "Patch"
Add attachment "sampleextension-monkey-business.patch" [6f335be33c] (rid 100273) by jenglish on 2004-04-24 05:52:35.
Ticket change [f21afb0af5] (rid 109485) by jenglish on 2004-04-24 05:52:35:
- icomment:
File Added - 84863: sampleextension-monkey-business.patch
- login: "jenglish"
- mimetype: "text/plain"
- username: "jenglish"
- icomment:
Ticket change [95f654e6ee] (rid 106237) by jenglish on 2004-04-24 05:53:42:
- assignee changed to: "hobbs"
Ticket change [e3a0ce41b9] (rid 87827) by hobbs on 2005-02-02 07:43:25:
- icomment:
Logged In: YES user_id=72656 What is incorrect about the current incantations?
- login: "hobbs"
- mimetype: "text/plain"
- username: "hobbs"
- icomment:
Ticket change [0c48a72c06] (rid 114146) by nobody on 2005-02-02 09:54:32:
- icomment:
Logged In: NO The usual convention on Windows is to define a preprocessor symbol like "XXXAPI", and use declarations like "extern XXXAPI XXX_Foo(void);", where XXXAPI expands to "__declspec(dllexport)" in source modules that are part of the library and "__declspec(dllimport)" in source modules that use the library. This is basically how <tcl.h> defines the EXTERN macro (which probably should have been called "TCLAPI" instead of "EXTERN", but that's an historical accident.) The preprocessor gyrations that Tk and the sampleextension go through aren't necessarily incorrect, but they are confusing, error-prone, and unnecessarily complicated. The #ifdef / #undef / #define / #include / #undef / #define cycle is basically hijacking Tcl's storage class macro "EXTERN" and temporarily repurposing it to mean "My package's public symbols" instead of "Tcl's public symbols". The conventional idiom would be for each extension to define its own storage class macro instead; that's what the patch does. Also, for simple extensions that are only dynamically loaded and don't export a public, non-stubbed API to dependent extensions, you don't even need to do that: just declare the _Init() routine as DLLEXPORT and it will do the right thing on all platforms.
- login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Ticket change [b3ae782f87] (rid 124896) by hobbs on 2010-08-14 03:27:59:
- closedate changed to: "2010-08-13T20:27:59"
- closer changed to: "hobbs"
- icomment:
See also 2025889. We do need to separate the BUILD_$pkg variants in case one TEA extension depends on another (includes it's .h), which also means we'd need the $pkg_STORAGE_CLASS. The problem I have with this proposal is that it requires changes on several lines, rather than the single BUILD_$pkg in a .h file that is currently needed. Can someone convince me this is a better approach?
- login: "hobbs"
- mimetype: "text/plain"
- resolution changed to: "Wont Fix"
- status changed to: "Pending"
- username: "hobbs"
Ticket change [f8528cf58b] (rid 91518) by sf-robot on 2010-09-30 02:23:04:
- closedate changed to: "2010-09-29T19:23:04"
- closer changed to: "sf-robot"
- icomment:
This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker).
- login: "sf-robot"
- mimetype: "text/plain"
- status changed to: "Closed"
- username: "sf-robot"