summaryrefslogtreecommitdiffstats
path: root/generic/tkStubLib.c
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-02-05 22:45:03 (GMT)
committernijtmans <nijtmans>2010-02-05 22:45:03 (GMT)
commit454e04bbf4e61fb4a363ffcfedb08e941a17952f (patch)
tree13a98d3f366ae4c7f4dac0f3935a609ea5797c2f /generic/tkStubLib.c
parentcece90e032954ae35ffb33120b3a0a01cd226b25 (diff)
downloadtk-454e04bbf4e61fb4a363ffcfedb08e941a17952f.zip
tk-454e04bbf4e61fb4a363ffcfedb08e941a17952f.tar.gz
tk-454e04bbf4e61fb4a363ffcfedb08e941a17952f.tar.bz2
Make more internal tables "const"
tk*Decls.h (regenerated with new genStubs.tcl from Tcl)
Diffstat (limited to 'generic/tkStubLib.c')
-rw-r--r--generic/tkStubLib.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/generic/tkStubLib.c b/generic/tkStubLib.c
index ce47028..66fdb11 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.25 2008/04/27 22:38:58 dkf Exp $
+ * RCS: @(#) $Id: tkStubLib.c,v 1.26 2010/02/05 22:45:03 nijtmans Exp $
*/
/*
@@ -90,11 +90,11 @@ Tk_InitStubs(
const char *version,
int exact)
{
- const char *actualVersion;
- const TkStubs **stubsPtrPtr = &tkStubsPtr; /* squelch warning */
+ ClientData pkgClientData = NULL;
+ const char *actualVersion = Tcl_PkgRequireEx(interp, "Tk", version, 0,
+ &pkgClientData);
+ const TkStubs *stubsPtr = pkgClientData;
- actualVersion = Tcl_PkgRequireEx(interp, "Tk", version, 0,
- (ClientData *) stubsPtrPtr);
if (!actualVersion) {
return NULL;
}
@@ -125,17 +125,18 @@ Tk_InitStubs(
}
}
- if (!tkStubsPtr) {
+ if (!stubsPtr) {
Tcl_SetResult(interp,
"This implementation of Tk does not support stubs",
TCL_STATIC);
return NULL;
}
- tkPlatStubsPtr = tkStubsPtr->hooks->tkPlatStubs;
- tkIntStubsPtr = tkStubsPtr->hooks->tkIntStubs;
- tkIntPlatStubsPtr = tkStubsPtr->hooks->tkIntPlatStubs;
- tkIntXlibStubsPtr = tkStubsPtr->hooks->tkIntXlibStubs;
+ tkPlatStubsPtr = stubsPtr->hooks->tkPlatStubs;
+ tkIntStubsPtr = stubsPtr->hooks->tkIntStubs;
+ tkIntPlatStubsPtr = stubsPtr->hooks->tkIntPlatStubs;
+ tkIntXlibStubsPtr = stubsPtr->hooks->tkIntXlibStubs;
+ tkStubsPtr = stubsPtr;
return actualVersion;
}