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 | |
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')
-rw-r--r-- | generic/tkStubLib.c | 24 | ||||
-rw-r--r-- | generic/ttk/ttkStubLib.c | 6 |
2 files changed, 18 insertions, 12 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); diff --git a/generic/ttk/ttkStubLib.c b/generic/ttk/ttkStubLib.c index 15d4d28..5087a18 100644 --- a/generic/ttk/ttkStubLib.c +++ b/generic/ttk/ttkStubLib.c @@ -1,5 +1,5 @@ /* - * $Id: ttkStubLib.c,v 1.5 2008/03/27 12:04:02 das Exp $ + * $Id: ttkStubLib.c,v 1.6 2008/04/02 21:31:58 das Exp $ * SOURCE: tk/generic/tkStubLib.c, version 1.9 2004/03/17 */ @@ -8,10 +8,8 @@ * contains no references to any of the tcl stub functions. */ -#ifndef USE_TCL_STUBS +#undef USE_TCL_STUBS #define USE_TCL_STUBS -#endif -#undef USE_TCL_STUB_PROCS #include "tk.h" |