summaryrefslogtreecommitdiffstats
path: root/generic/tclMain.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2002-01-25 20:40:54 (GMT)
committerdgp <dgp@users.sourceforge.net>2002-01-25 20:40:54 (GMT)
commit7bb89f954aeb2e32b07d01513217ab6930f80ccf (patch)
tree90cd60706107518bc582921a1eb262224b8dac22 /generic/tclMain.c
parente987f887ebf5997e0c4461c254ec85e39a7b0b46 (diff)
downloadtcl-7bb89f954aeb2e32b07d01513217ab6930f80ccf.zip
tcl-7bb89f954aeb2e32b07d01513217ab6930f80ccf.tar.gz
tcl-7bb89f954aeb2e32b07d01513217ab6930f80ccf.tar.bz2
* Updated interfaces of generic/tclEncoding, generic/tclFilename.c,
generic/tclIOUtil.c, generic/tclPipe.c, generic/tclResult.c, generic/tclUtil.c, generic/tclVar.c and mac/tclMacResource.c according to TIP 27. Tcl_TranslateFileName rewritten as wrapper around VFS-aware version. Updated callers. ***POTENTIAL INCOMPATIBILITY*** Includes source incompatibilities: argv arguments of Tcl_Concat, Tcl_JoinPath, Tcl_OpenCommandChannel, Tcl_Merge; argvPtr arguments of Tcl_SplitList and Tcl_SplitPath.
Diffstat (limited to 'generic/tclMain.c')
-rw-r--r--generic/tclMain.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/generic/tclMain.c b/generic/tclMain.c
index 05b8278..53dc064 100644
--- a/generic/tclMain.c
+++ b/generic/tclMain.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: tclMain.c,v 1.16 2002/01/07 17:54:52 dgp Exp $
+ * RCS: @(#) $Id: tclMain.c,v 1.17 2002/01/25 20:40:55 dgp Exp $
*/
#include "tcl.h"
@@ -242,7 +242,14 @@ Tcl_Main(argc, argv, appInitProc)
argv++;
}
}
- args = Tcl_Merge(argc-1, argv+1);
+
+ /*
+ * The CONST casting is safe, and better we do it here than force
+ * all callers of Tcl_Main to do it. (Those callers are likely
+ * in a main() that can't easily change its signature.)
+ */
+
+ args = Tcl_Merge(argc-1, (CONST char **)argv+1);
Tcl_ExternalToUtfDString(NULL, args, -1, &argString);
Tcl_SetVar(interp, "argv", Tcl_DStringValue(&argString), TCL_GLOBAL_ONLY);
Tcl_DStringFree(&argString);