diff options
author | das <das> | 2008-04-02 21:31:58 (GMT) |
---|---|---|
committer | das <das> | 2008-04-02 21:31:58 (GMT) |
commit | d80afd9403e34db5407b5d005f40f1b69aae8267 (patch) | |
tree | 02bed3c59ded5372de92c52c00ba9c7146e37a70 /generic/tkStubLib.c | |
parent | 3657c9cadc9e99c4a708db858e60ee5f87c68df1 (diff) | |
download | tk-d80afd9403e34db5407b5d005f40f1b69aae8267.zip tk-d80afd9403e34db5407b5d005f40f1b69aae8267.tar.gz tk-d80afd9403e34db5407b5d005f40f1b69aae8267.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
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); |