diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-09-05 13:56:15 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-09-05 13:56:15 (GMT) |
commit | f64a3b8559e5f75f1e208503090cf2503a197470 (patch) | |
tree | 2736a9a0c4ef761f3a90633788330f1d7db8bc67 /generic | |
parent | 5eb346e0d25b2ae446797b610058911dc3b65a63 (diff) | |
parent | 8dac135fc9c8efae2cc3113bc975ab871ff2271f (diff) | |
download | tcl-f64a3b8559e5f75f1e208503090cf2503a197470.zip tcl-f64a3b8559e5f75f1e208503090cf2503a197470.tar.gz tcl-f64a3b8559e5f75f1e208503090cf2503a197470.tar.bz2 |
merge core-8-6-branch
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclCmdAH.c | 2 | ||||
-rw-r--r-- | generic/tclLiteral.c | 3 | ||||
-rw-r--r-- | generic/tclTest.c | 13 |
3 files changed, 13 insertions, 5 deletions
diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 88cc17d..4c299f8 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -1597,7 +1597,7 @@ FileAttrIsOwnedCmd( Tcl_Obj *const objv[]) { #ifdef __CYGWIN__ -#define geteuid() (short)(geteuid)() +#define geteuid() (short)(geteuid)() #endif #if !defined(_WIN32) Tcl_StatBuf buf; diff --git a/generic/tclLiteral.c b/generic/tclLiteral.c index e0425cf..9f01144 100644 --- a/generic/tclLiteral.c +++ b/generic/tclLiteral.c @@ -431,12 +431,13 @@ TclRegisterLiteral( * Is it in the interpreter's global literal table? If not, create it. */ + globalPtr = NULL; objPtr = TclCreateLiteral(iPtr, bytes, length, hash, &new, nsPtr, flags, &globalPtr); objIndex = AddLocalLiteralEntry(envPtr, objPtr, localHash); #ifdef TCL_COMPILE_DEBUG - if (globalPtr->refCount < 1) { + if (globalPtr != NULL && globalPtr->refCount < 1) { Tcl_Panic("%s: global literal \"%.*s\" had bad refCount %d", "TclRegisterLiteral", (length>60? 60 : length), bytes, globalPtr->refCount); diff --git a/generic/tclTest.c b/generic/tclTest.c index d3da641..e0ed374 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -7476,9 +7476,16 @@ TestInterpResolverCmd( int idx; #define RESOLVER_KEY "testInterpResolver" - if (objc != 2) { - Tcl_WrongNumArgs(interp, 1, objv, "up|down"); - return TCL_ERROR; + if ((objc < 2) || (objc > 3)) { + Tcl_WrongNumArgs(interp, 1, objv, "up|down ?interp?"); + return TCL_ERROR; + } + if (objc == 3) { + interp = Tcl_GetSlave(interp, Tcl_GetString(objv[2])); + if (interp == NULL) { + Tcl_AppendResult(interp, "provided interpreter not found", NULL); + return TCL_ERROR; + } } if (Tcl_GetIndexFromObj(interp, objv[1], table, "operation", TCL_EXACT, &idx) != TCL_OK) { |