summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhypnotoad <yoda@etoyoc.com>2014-09-01 09:36:58 (GMT)
committerhypnotoad <yoda@etoyoc.com>2014-09-01 09:36:58 (GMT)
commit57e9563dcad705ad4fb3c19ecae2673ed8c06219 (patch)
tree75b0b27c65a65e2526aedce190d461eebba242cb
parentfc286c45e809430316cb57203dbfefcf23bac783 (diff)
downloadtcl-57e9563dcad705ad4fb3c19ecae2673ed8c06219.zip
tcl-57e9563dcad705ad4fb3c19ecae2673ed8c06219.tar.gz
tcl-57e9563dcad705ad4fb3c19ecae2673ed8c06219.tar.bz2
Tweak the Windows implementation of Tcl_AppInit() to match Unix
-rw-r--r--win/tclAppInit.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/win/tclAppInit.c b/win/tclAppInit.c
index 3cfd662..7edd455 100644
--- a/win/tclAppInit.c
+++ b/win/tclAppInit.c
@@ -163,13 +163,15 @@ Tcl_AppInit(
Tcl_Obj *vfstcllib=Tcl_NewStringObj("/zvfs/tcl8.6",-1);
Tcl_IncrRefCount(vfsinitscript);
+ Tcl_IncrRefCount(vfstcllib);
+
if(Tcl_FSAccess(vfsinitscript,F_OK)==0) {
Tcl_SetStartupScript(vfsinitscript,NULL);
}
- //Tcl_DecrRefCount(vfsinitscript);
if(Tcl_FSAccess(vfstcllib,F_OK)==0) {
Tcl_SetVar2(interp, "env", "TCL_LIBRARY", Tcl_GetString(vfstcllib), TCL_GLOBAL_ONLY);
}
+ Tcl_DecrRefCount(vfsinitscript);
Tcl_DecrRefCount(vfstcllib);
}