summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog14
-rw-r--r--generic/tkStubInit.c28
-rw-r--r--generic/tkWindow.c6
3 files changed, 28 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index 288b1a4..8955434 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,12 +1,18 @@
+2008-04-16 Daniel Steffen <das@users.sourceforge.net>
+
+ * generic/tkStubInit.c: make stubs tables static const
+ * generic/tkWindow.c (Initialize): and export only a module-scope
+ pointer to to the main stubs table (for package init). [Patch 1938497]
+
2008-04-14 Pat Thoyts <patthoyts@users.sourceforge.net>
- * win/tkWinDialog.c: Fix bug #1941740: tk_chooseColor -title broken
- * win/tkWinTest.c: Added parent to testgetwininfo
- * tests/winDialog.test: Created some tk_chooseColor win tests.
+ * win/tkWinDialog.c: Fix [tk_chooseColor -title]. [Bug 1941740]
+ * win/tkWinTest.c: Added parent to testgetwininfo
+ * tests/winDialog.test: Created some tk_chooseColor win tests.
2008-04-09 Jan Nijtmans <nijtmans@users.sourceforge.net>
- * generic/tkImgGIF.c: Let the GIF writer use a real LZW compressor.
+ * generic/tkImgGIF.c: Let the GIF writer use a real LZW compressor.
2008-04-08 Pat Thoyts <patthoyts@users.sourceforge.net>
diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c
index ef40e30..c7f02e7 100644
--- a/generic/tkStubInit.c
+++ b/generic/tkStubInit.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkStubInit.c,v 1.61 2008/04/02 21:32:33 das Exp $
+ * RCS: @(#) $Id: tkStubInit.c,v 1.62 2008/04/16 14:51:29 das Exp $
*/
#include "tkInt.h"
@@ -41,12 +41,6 @@
#define Tk_GetCanvasVisitor \
((VOID * (*)(Tcl_Interp * interp, CONST char * name)) NULL)
-MODULE_SCOPE TkIntStubs tkIntStubs;
-MODULE_SCOPE TkIntPlatStubs tkIntPlatStubs;
-MODULE_SCOPE TkIntXlibStubs tkIntXlibStubs;
-MODULE_SCOPE TkPlatStubs tkPlatStubs;
-MODULE_SCOPE TkStubs tkStubs;
-
/*
* WARNING: The contents of this file is automatically generated by the
* tools/genStubs.tcl script. Any modifications to the function declarations
@@ -55,7 +49,7 @@ MODULE_SCOPE TkStubs tkStubs;
/* !BEGIN!: Do not edit below this line. */
-TkIntStubs tkIntStubs = {
+static const TkIntStubs tkIntStubs = {
TCL_STUB_MAGIC,
NULL,
TkAllocWindow, /* 0 */
@@ -317,7 +311,7 @@ TkIntStubs tkIntStubs = {
TkpTesttextCmd, /* 157 */
};
-TkIntPlatStubs tkIntPlatStubs = {
+static const TkIntPlatStubs tkIntPlatStubs = {
TCL_STUB_MAGIC,
NULL,
#ifdef __WIN32__ /* WIN */
@@ -432,7 +426,7 @@ TkIntPlatStubs tkIntPlatStubs = {
#endif /* X11 */
};
-TkIntXlibStubs tkIntXlibStubs = {
+static const TkIntXlibStubs tkIntXlibStubs = {
TCL_STUB_MAGIC,
NULL,
#ifdef __WIN32__ /* WIN */
@@ -640,7 +634,7 @@ TkIntXlibStubs tkIntXlibStubs = {
#endif /* AQUA */
};
-TkPlatStubs tkPlatStubs = {
+static const TkPlatStubs tkPlatStubs = {
TCL_STUB_MAGIC,
NULL,
#ifdef __WIN32__ /* WIN */
@@ -673,7 +667,7 @@ static const TkStubHooks tkStubHooks = {
&tkIntXlibStubs
};
-TkStubs tkStubs = {
+static const TkStubs tkStubs = {
TCL_STUB_MAGIC,
&tkStubHooks,
Tk_MainLoop, /* 0 */
@@ -954,5 +948,13 @@ TkStubs tkStubs = {
/* !END!: Do not edit above this line. */
+/*
+ * Module-scope pointer to the main static stubs table, used for package
+ * initialization via Tcl_PkgProvideEx().
+ */
+
+MODULE_SCOPE const TkStubs * const tkConstStubsPtr;
+
+const TkStubs * const tkConstStubsPtr = &tkStubs;
+
#undef UNIX_TK
-#undef MAC_OSX_TK
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index 854bb82..c73b950 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWindow.c,v 1.93 2008/04/07 23:14:36 hobbs Exp $
+ * RCS: @(#) $Id: tkWindow.c,v 1.94 2008/04/16 14:51:29 das Exp $
*/
#include "tkInt.h"
@@ -2912,7 +2912,7 @@ Tk_SafeInit(
return Initialize(interp);
}
-extern TkStubs tkStubs;
+MODULE_SCOPE const TkStubs * const tkConstStubsPtr;
/*
*----------------------------------------------------------------------
@@ -3190,7 +3190,7 @@ Initialize(
*/
code = Tcl_PkgProvideEx(interp, "Tk", TK_PATCH_LEVEL,
- (ClientData) &tkStubs);
+ (ClientData) tkConstStubsPtr);
if (code != TCL_OK) {
goto done;
}