diff options
author | sebres <sebres@users.sourceforge.net> | 2017-05-10 12:28:46 (GMT) |
---|---|---|
committer | sebres <sebres@users.sourceforge.net> | 2017-05-10 12:28:46 (GMT) |
commit | fb3c424b5605a3c21de5c3ea3c72a7530a34de1d (patch) | |
tree | b2f7992afa76a26e513ab92ab8e7b65f9faf8593 /generic/tclEnv.c | |
parent | 87313fd6795a5c95c6788ed3b8d3443bdf3740a2 (diff) | |
parent | 2c44e4887289d6b17deac377da76d117c1adc051 (diff) | |
download | tcl-fb3c424b5605a3c21de5c3ea3c72a7530a34de1d.zip tcl-fb3c424b5605a3c21de5c3ea3c72a7530a34de1d.tar.gz tcl-fb3c424b5605a3c21de5c3ea3c72a7530a34de1d.tar.bz2 |
[interim-merge-commit] back-ported branch sebres-clock-speedup (from trunk to 8.6): tcl-clock functionality rewritten in C.
Diffstat (limited to 'generic/tclEnv.c')
-rw-r--r-- | generic/tclEnv.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/generic/tclEnv.c b/generic/tclEnv.c index 66ddb57..0041a40 100644 --- a/generic/tclEnv.c +++ b/generic/tclEnv.c @@ -17,6 +17,11 @@ 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 +376,7 @@ Tcl_PutEnv( value[0] = '\0'; TclSetEnv(name, value+1); } + TclEnvEpoch++; Tcl_DStringFree(&nameString); return 0; @@ -579,6 +585,7 @@ EnvTraceProc( if (flags & TCL_TRACE_ARRAY) { TclSetupEnv(interp); + TclEnvEpoch++; return NULL; } @@ -599,6 +606,7 @@ EnvTraceProc( value = Tcl_GetVar2(interp, "env", name2, TCL_GLOBAL_ONLY); TclSetEnv(name2, value); + TclEnvEpoch++; } /* @@ -622,6 +630,7 @@ EnvTraceProc( if (flags & TCL_TRACE_UNSETS) { TclUnsetEnv(name2); + TclEnvEpoch++; } return NULL; } |