summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdAH.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2012-06-25 14:43:36 (GMT)
committerdgp <dgp@users.sourceforge.net>2012-06-25 14:43:36 (GMT)
commitc56279aca031cd571054139f95be82bb90c7dbfa (patch)
treec871ead30ab5ffe77b435d00aead35267d1695d9 /generic/tclCmdAH.c
parent01eab1b3890706a987bfd038c2193a060660d823 (diff)
parent527a4f67fa396747502ba37514a882725f401110 (diff)
downloadtcl-bug_3024359.zip
tcl-bug_3024359.tar.gz
tcl-bug_3024359.tar.bz2
Simplify bug fix so that active claims on the FilesystemRecord list of a threadbug_3024359
prevent any overwriting of that per-thread cache. This keeps active traversals of the list valid. The possible downside is that this may result in some delay in noticing new epochs and result in somewhat greater likelihood we will cache things in a "path" value that are out of date. Since the system has to deal with out of date cached data anyway, this should have no correctness affects, measured against the status quo. In multi-threaded operation the possibility of caching and/or retrieving outdated information can never be eliminated. Checkin also includes merge of 8.5.
Diffstat (limited to 'generic/tclCmdAH.c')
-rw-r--r--generic/tclCmdAH.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c
index e1ec927..8e32389 100644
--- a/generic/tclCmdAH.c
+++ b/generic/tclCmdAH.c
@@ -505,7 +505,7 @@ Tcl_EncodingObjCmd(
break;
}
case ENC_DIRS:
- return EncodingDirsObjCmd(dummy, interp, objc-1, objv+1);
+ return EncodingDirsObjCmd(dummy, interp, objc, objv);
case ENC_NAMES:
if (objc > 2) {
Tcl_WrongNumArgs(interp, 2, objv, NULL);
@@ -552,20 +552,24 @@ EncodingDirsObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- if (objc > 2) {
- Tcl_WrongNumArgs(interp, 1, objv, "?dirList?");
+ Tcl_Obj *dirListObj;
+
+ if (objc > 3) {
+ Tcl_WrongNumArgs(interp, 2, objv, "?dirList?");
return TCL_ERROR;
}
- if (objc == 1) {
+ if (objc == 2) {
Tcl_SetObjResult(interp, Tcl_GetEncodingSearchPath());
return TCL_OK;
}
- if (Tcl_SetEncodingSearchPath(objv[1]) == TCL_ERROR) {
+
+ dirListObj = objv[2];
+ if (Tcl_SetEncodingSearchPath(dirListObj) == TCL_ERROR) {
Tcl_AppendResult(interp, "expected directory list but got \"",
- TclGetString(objv[1]), "\"", NULL);
+ TclGetString(dirListObj), "\"", NULL);
return TCL_ERROR;
}
- Tcl_SetObjResult(interp, objv[1]);
+ Tcl_SetObjResult(interp, dirListObj);
return TCL_OK;
}