summaryrefslogtreecommitdiffstats
path: root/generic/tclEnv.c
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2017-01-10 22:04:49 (GMT)
committersebres <sebres@users.sourceforge.net>2017-01-10 22:04:49 (GMT)
commitc093e76184fc3101487abf86878fcc8e85a77cd9 (patch)
tree99b2b744d045a8c1c5eae50360e41ee74b987d2a /generic/tclEnv.c
parentf70ebac8b8c9c01999150364b4155b0d50911cbc (diff)
downloadtcl-c093e76184fc3101487abf86878fcc8e85a77cd9.zip
tcl-c093e76184fc3101487abf86878fcc8e85a77cd9.tar.gz
tcl-c093e76184fc3101487abf86878fcc8e85a77cd9.tar.bz2
[temp-commit]: ClockFreeScan back-ported (cherry picked), all tests case passed + several new test-cases for bug fixing implemented here;
environment epoch ported, several fixes for the time zone / tzdata caching ported; mem-leak fix + memory leak test cases passed
Diffstat (limited to 'generic/tclEnv.c')
-rw-r--r--generic/tclEnv.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/generic/tclEnv.c b/generic/tclEnv.c
index 66ddb57..fd0a8ce 100644
--- a/generic/tclEnv.c
+++ b/generic/tclEnv.c
@@ -17,6 +17,10 @@
TCL_DECLARE_MUTEX(envMutex) /* To serialize access to environ. */
+
+MODULE_SCOPE unsigned long TclEnvEpoch = 0; /* Epoch of the tcl environment
+ * (if changed with tcl-env). */
+
static struct {
int cacheSize; /* Number of env strings in cache. */
char **cache; /* Array containing all of the environment
@@ -371,6 +375,7 @@ Tcl_PutEnv(
value[0] = '\0';
TclSetEnv(name, value+1);
}
+ TclEnvEpoch++;
Tcl_DStringFree(&nameString);
return 0;
@@ -579,6 +584,7 @@ EnvTraceProc(
if (flags & TCL_TRACE_ARRAY) {
TclSetupEnv(interp);
+ TclEnvEpoch++;
return NULL;
}
@@ -599,6 +605,7 @@ EnvTraceProc(
value = Tcl_GetVar2(interp, "env", name2, TCL_GLOBAL_ONLY);
TclSetEnv(name2, value);
+ TclEnvEpoch++;
}
/*
@@ -622,6 +629,7 @@ EnvTraceProc(
if (flags & TCL_TRACE_UNSETS) {
TclUnsetEnv(name2);
+ TclEnvEpoch++;
}
return NULL;
}