summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tclCmdAH.c2
-rw-r--r--generic/tclLiteral.c3
-rw-r--r--generic/tclTest.c13
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) {