summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-07-16 22:06:04 (GMT)
committernijtmans <nijtmans>2010-07-16 22:06:04 (GMT)
commita5b009796383e0a829c96ed6ac24c3b035f55fde (patch)
tree1ab293900e82d01e1060a7bf524bd8ae1fd61bc7 /generic
parent914fd8473c892c8067540984d46d755984fee66a (diff)
downloadtk-a5b009796383e0a829c96ed6ac24c3b035f55fde.zip
tk-a5b009796383e0a829c96ed6ac24c3b035f55fde.tar.gz
tk-a5b009796383e0a829c96ed6ac24c3b035f55fde.tar.bz2
[Tcl Bug 3029891] Functions that don't belong in the stub table (Tk part, not really removed from the stub table, just disabled)
[Bug 3027438] Tk_Main calls Tcl_CreateInterp before Tcl_FindExecutable
Diffstat (limited to 'generic')
-rw-r--r--generic/tk.h6
-rw-r--r--generic/tkDecls.h8
-rw-r--r--generic/tkMain.c11
3 files changed, 15 insertions, 10 deletions
diff --git a/generic/tk.h b/generic/tk.h
index 10db9a7..8e3e144 100644
--- a/generic/tk.h
+++ b/generic/tk.h
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tk.h,v 1.135 2010/06/19 16:18:41 jenglish Exp $
+ * RCS: @(#) $Id: tk.h,v 1.136 2010/07/16 22:06:05 nijtmans Exp $
*/
#ifndef _TK
@@ -1478,8 +1478,8 @@ typedef struct Tk_ElementSpec {
#define Tk_Release Tcl_Release
/* Removed Tk_Main, use macro instead */
-#define Tk_Main(argc, argv, proc) \
- Tk_MainEx(argc, argv, proc, Tcl_CreateInterp())
+#define Tk_Main(argc, argv, proc) Tk_MainEx(argc, argv, proc, \
+ (Tcl_FindExecutable(argv[0]), (Tcl_CreateInterp)()))
const char * Tk_InitStubs(Tcl_Interp *interp, const char *version,
int exact);
diff --git a/generic/tkDecls.h b/generic/tkDecls.h
index dacb04c..2d5f3ab 100644
--- a/generic/tkDecls.h
+++ b/generic/tkDecls.h
@@ -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: tkDecls.h,v 1.47 2010/05/10 20:58:18 nijtmans Exp $
+ * RCS: @(#) $Id: tkDecls.h,v 1.48 2010/07/16 22:06:05 nijtmans Exp $
*/
#ifndef _TKDECLS
@@ -3098,5 +3098,11 @@ extern const TkStubs *tkStubsPtr;
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLIMPORT
+/* Functions that don't belong in the stub table */
+#undef Tk_MainEx
+#undef Tk_Init
+#undef Tk_SafeInit
+#undef Tk_CreateConsoleWindow
+
#endif /* _TKDECLS */
diff --git a/generic/tkMain.c b/generic/tkMain.c
index 5dd5f40..2566674 100644
--- a/generic/tkMain.c
+++ b/generic/tkMain.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMain.c,v 1.32 2008/12/15 16:17:18 dgp Exp $
+ * RCS: @(#) $Id: tkMain.c,v 1.33 2010/07/16 22:06:05 nijtmans Exp $
*/
#include <ctype.h>
@@ -115,7 +115,6 @@ Tk_MainEx(
tsdPtr = Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
- Tcl_FindExecutable(argv[0]);
tsdPtr->interp = interp;
Tcl_Preserve(interp);
@@ -239,7 +238,7 @@ Tk_MainEx(
* of length 0, (e.g. /dev/null, which is what Finder sets when double
* clicking Wish) then use the GUI console.
*/
-
+
if (!tsdPtr->tty) {
struct stat st;
@@ -452,7 +451,7 @@ Prompt(
*/
outChannel = Tcl_GetChannel(interp, "stdout", NULL);
- if (outChannel != (Tcl_Channel) NULL) {
+ if (outChannel != NULL) {
Tcl_WriteChars(outChannel, "% ", 2);
}
}
@@ -469,7 +468,7 @@ Prompt(
*/
errChannel = Tcl_GetChannel(interp, "stderr", NULL);
- if (errChannel != (Tcl_Channel) NULL) {
+ if (errChannel != NULL) {
Tcl_WriteObj(errChannel, Tcl_GetObjResult(interp));
Tcl_WriteChars(errChannel, "\n", 1);
}
@@ -477,7 +476,7 @@ Prompt(
}
}
outChannel = Tcl_GetChannel(interp, "stdout", NULL);
- if (outChannel != (Tcl_Channel) NULL) {
+ if (outChannel != NULL) {
Tcl_Flush(outChannel);
}
}