diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-06-29 11:39:00 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-06-29 11:39:00 (GMT) |
commit | b2522c9c24b283a616ac38c4c987827c4fa86167 (patch) | |
tree | 7ce411d2af949b4e0efb15ac084505dc3427742a /generic/tclMain.c | |
parent | 23a0290873b671c61ba3bc112ffc158fb859667a (diff) | |
download | tcl-b2522c9c24b283a616ac38c4c987827c4fa86167.zip tcl-b2522c9c24b283a616ac38c4c987827c4fa86167.tar.gz tcl-b2522c9c24b283a616ac38c4c987827c4fa86167.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.c | 6 |
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); |