diff options
author | das <das@noemail.net> | 2008-04-02 21:31:58 (GMT) |
---|---|---|
committer | das <das@noemail.net> | 2008-04-02 21:31:58 (GMT) |
commit | 26330c54898e671ab711fb0a23fead782fd27822 (patch) | |
tree | 02bed3c59ded5372de92c52c00ba9c7146e37a70 /generic/tkStubLib.c | |
parent | ba04e712cb72939258824c01df5d07e1d5f0613e (diff) | |
download | tk-26330c54898e671ab711fb0a23fead782fd27822.zip tk-26330c54898e671ab711fb0a23fead782fd27822.tar.gz tk-26330c54898e671ab711fb0a23fead782fd27822.tar.bz2 |
* generic/tkStubLib.c: make symbols in libtkstub.a MODULE_SCOPE to
avoid exporting them from libraries that link
with -ltkstub; constify tk*StubsPtr and stub
table hook pointers. [Bug 1819422]
* generic/tkStubLib.c: undef USE_TCL_STUBS before defining it
* generic/ttk/ttkStubLib.c: unconditionally; remove needless #ifdef
FossilOrigin-Name: 7419adaea545b7086cb08e7a4b048d7381d9931e
Diffstat (limited to 'generic/tkStubLib.c')
-rw-r--r-- | generic/tkStubLib.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/generic/tkStubLib.c b/generic/tkStubLib.c index 45fc9ef..ddfd986 100644 --- a/generic/tkStubLib.c +++ b/generic/tkStubLib.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkStubLib.c,v 1.23 2008/04/02 04:06:38 dgp Exp $ + * RCS: @(#) $Id: tkStubLib.c,v 1.24 2008/04/02 21:31:58 das Exp $ */ /* @@ -20,7 +20,9 @@ * including the rest of the stub functions. */ +#undef USE_TCL_STUBS #define USE_TCL_STUBS + #define USE_TK_STUBS #include "tkInt.h" @@ -41,11 +43,17 @@ #include "tkPlatDecls.h" #include "tkIntXlibDecls.h" -TkStubs *tkStubsPtr = NULL; -TkPlatStubs *tkPlatStubsPtr = NULL; -TkIntStubs *tkIntStubsPtr = NULL; -TkIntPlatStubs *tkIntPlatStubsPtr = NULL; -TkIntXlibStubs *tkIntXlibStubsPtr = NULL; +MODULE_SCOPE const TkStubs *tkStubsPtr; +MODULE_SCOPE const TkPlatStubs *tkPlatStubsPtr; +MODULE_SCOPE const TkIntStubs *tkIntStubsPtr; +MODULE_SCOPE const TkIntPlatStubs *tkIntPlatStubsPtr; +MODULE_SCOPE const TkIntXlibStubs *tkIntXlibStubsPtr; + +const TkStubs *tkStubsPtr = NULL; +const TkPlatStubs *tkPlatStubsPtr = NULL; +const TkIntStubs *tkIntStubsPtr = NULL; +const TkIntPlatStubs *tkIntPlatStubsPtr = NULL; +const TkIntXlibStubs *tkIntXlibStubsPtr = NULL; /* * Use our own isdigit to avoid linking to libc on windows @@ -74,14 +82,14 @@ static int isDigit(const int c) *---------------------------------------------------------------------- */ -CONST char * +MODULE_SCOPE CONST char * Tk_InitStubs( Tcl_Interp *interp, CONST char *version, int exact) { CONST char *actualVersion; - TkStubs **stubsPtrPtr = &tkStubsPtr; /* squelch warning */ + const TkStubs **stubsPtrPtr = &tkStubsPtr; /* squelch warning */ actualVersion = Tcl_PkgRequireEx(interp, "Tk", version, 0, (ClientData *) stubsPtrPtr); |