summaryrefslogtreecommitdiffstats
path: root/generic/tclMain.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-06-29 11:39:00 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-06-29 11:39:00 (GMT)
commit88fc841203408d81942346c602bc76dd7a97fc3b (patch)
tree7ce411d2af949b4e0efb15ac084505dc3427742a /generic/tclMain.c
parent75a582f3570a03b8c517653637102c8baf987067 (diff)
downloadtcl-88fc841203408d81942346c602bc76dd7a97fc3b.zip
tcl-88fc841203408d81942346c602bc76dd7a97fc3b.tar.gz
tcl-88fc841203408d81942346c602bc76dd7a97fc3b.tar.bz2
Tcl_SetVar -> Tcl_SetVar2 and comparable replacements, eliminating functions which are deprecated.
Diffstat (limited to 'generic/tclMain.c')
-rw-r--r--generic/tclMain.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/generic/tclMain.c b/generic/tclMain.c
index 927de7e..de7e29e 100644
--- a/generic/tclMain.c
+++ b/generic/tclMain.c
@@ -246,7 +246,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;
@@ -266,14 +266,16 @@ 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) {
+ if (Tcl_FSEvalFile(interp, fullNameObj) != 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);