summaryrefslogtreecommitdiffstats
path: root/generic/tclMain.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-11-26 14:29:58 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-11-26 14:29:58 (GMT)
commit3604d53d3f64cca36cb6884d708d4e6895ffdb2b (patch)
treef164794334a6f3524ad8060a06d13b40aa1231a2 /generic/tclMain.c
parent3b82cae97ddc15fca3c3b101e586256504bb91f7 (diff)
downloadtcl-3604d53d3f64cca36cb6884d708d4e6895ffdb2b.zip
tcl-3604d53d3f64cca36cb6884d708d4e6895ffdb2b.tar.gz
tcl-3604d53d3f64cca36cb6884d708d4e6895ffdb2b.tar.bz2
Removed functions marked deprecated or obsolete for a long time: Tcl_Backslash, Tcl_EvalFile, Tcl_GlobalEvalObj, Tcl_GlobalEval, Tcl_EvalTokens.
Remove Tcl_FindExecutable from stub table: It is needed by embedders, not extenders. Remove TclpGetDate, TclpGmtime, TclpLocaltime: it isn't use anywhere since the new clock implementation. Remove TclWinConvertWSAError, it's the same as TclWinConvertError.
Diffstat (limited to 'generic/tclMain.c')
-rw-r--r--generic/tclMain.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/generic/tclMain.c b/generic/tclMain.c
index f445383..73989ef 100644
--- a/generic/tclMain.c
+++ b/generic/tclMain.c
@@ -243,7 +243,7 @@ Tcl_SourceRCFile(
const char *fileName;
Tcl_Channel chan;
- fileName = Tcl_GetVar(interp, "tcl_rcFileName", TCL_GLOBAL_ONLY);
+ fileName = Tcl_GetVar2(interp, "tcl_rcFileName", NULL, TCL_GLOBAL_ONLY);
if (fileName != NULL) {
Tcl_Channel c;
const char *fullName;
@@ -263,14 +263,18 @@ Tcl_SourceRCFile(
c = Tcl_OpenFileChannel(NULL, fullName, "r", 0);
if (c != NULL) {
+ Tcl_Obj *fullNameObj = Tcl_NewStringObj(fullName, -1);
+
Tcl_Close(NULL, c);
- if (Tcl_EvalFile(interp, fullName) != TCL_OK) {
+ Tcl_IncrRefCount(fullNameObj);
+ if (Tcl_FSEvalFileEx(interp, fullNameObj, NULL) != TCL_OK) {
chan = Tcl_GetStdChannel(TCL_STDERR);
if (chan) {
Tcl_WriteObj(chan, Tcl_GetObjResult(interp));
Tcl_WriteChars(chan, "\n", 1);
}
}
+ Tcl_DecrRefCount(fullNameObj);
}
}
Tcl_DStringFree(&temp);