Skip to content
Tcl Source Code Artifact [0c48a72c06]
Login

Artifact [0c48a72c06]

Artifact 0c48a72c06316dd4e1dd85b832b65f1aa36d13e3:

Ticket change [0c48a72c06] - Ticket [941042ffffffffff|941042ffff] <i>Remove TCL_STORAGE_CLASS monkey business</i> status still Open with 4 other changes by nobody on 2005-02-02 09:54:32.
D 2005-02-02T09:54:32
J icomment Logged\sIn:\sNO\s\n\nThe\susual\sconvention\son\sWindows\sis\sto\sdefine\sa\spreprocessor\nsymbol\slike\s"XXXAPI",\sand\suse\sdeclarations\slike\s"extern\nXXXAPI\sXXX_Foo(void);",\swhere\sXXXAPI\sexpands\sto\s\n"__declspec(dllexport)"\sin\ssource\smodules\sthat\sare\spart\sof\nthe\slibrary\sand\s"__declspec(dllimport)"\sin\ssource\smodules\nthat\suse\sthe\slibrary.\n\nThis\sis\sbasically\show\s<tcl.h>\sdefines\sthe\sEXTERN\smacro\n(which\sprobably\sshould\shave\sbeen\scalled\s"TCLAPI"\sinstead\sof\n"EXTERN",\sbut\sthat's\san\shistorical\saccident.)\n\nThe\spreprocessor\sgyrations\sthat\sTk\sand\sthe\ssampleextension\ngo\sthrough\saren't\snecessarily\sincorrect,\sbut\sthey\sare\nconfusing,\serror-prone,\sand\sunnecessarily\scomplicated.\s\sThe\n#ifdef\s/\s#undef\s/\s#define\s/\s#include\s/\s#undef\s/\s#define\ncycle\sis\sbasically\shijacking\sTcl's\sstorage\sclass\smacro\n"EXTERN"\sand\stemporarily\srepurposing\sit\sto\smean\s"My\npackage's\spublic\ssymbols"\sinstead\sof\s"Tcl's\spublic\ssymbols".\n\sThe\sconventional\sidiom\swould\sbe\sfor\seach\sextension\sto\ndefine\sits\sown\sstorage\sclass\smacro\sinstead;\sthat's\swhat\sthe\npatch\sdoes.\n\nAlso,\sfor\ssimple\sextensions\sthat\sare\sonly\sdynamically\sloaded\nand\sdon't\sexport\sa\spublic,\snon-stubbed\sAPI\sto\sdependent\nextensions,\syou\sdon't\seven\sneed\sto\sdo\sthat:\sjust\sdeclare\sthe\n_Init()\sroutine\sas\sDLLEXPORT\sand\sit\swill\sdo\sthe\sright\sthing\non\sall\splatforms.\n
J login nobody
J mimetype text/plain
J username nobody
K 941042ffffffffffffffffffffffffffffffffff
U nobody
Z 36b7d6bd7d42091dd13731d6c7d720f7