From 0d1ffc0968e6c82da985d876f63a92a1159a9a3b Mon Sep 17 00:00:00 2001 From: sebres Date: Fri, 10 May 2019 18:32:09 +0000 Subject: testlinkarray: fixed cast to pointer from integer (and eliminate warning) --- generic/tclTest.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/generic/tclTest.c b/generic/tclTest.c index 5fe1370..8476ecb 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -3327,10 +3327,7 @@ TestlinkarrayCmd( }; int optionIndex, typeIndex, readonly, i, size, length; char *name, *arg; - long addr; /* Wrong on Windows, but that's MS's fault for - * not supporting correctly. They - * can suffer the warnings; the rest of us - * shouldn't have to! */ + Tcl_WideInt addr; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "option args"); @@ -3388,7 +3385,7 @@ TestlinkarrayCmd( */ if (i < objc) { - if (Tcl_GetLongFromObj(interp, objv[i], &addr) == TCL_ERROR) { + if (Tcl_GetWideIntFromObj(interp, objv[i], &addr) == TCL_ERROR) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "wrong address value", -1)); return TCL_ERROR; @@ -3396,7 +3393,7 @@ TestlinkarrayCmd( } else { addr = 0; } - return Tcl_LinkArray(interp, name, (void *) addr, + return Tcl_LinkArray(interp, name, INT2PTR(addr), LinkTypes[typeIndex] | readonly, size); } return TCL_OK; -- cgit v0.12 From 95d2a7f7c08f468c9d9dbfed451dd3bad2a37129 Mon Sep 17 00:00:00 2001 From: dgp Date: Sat, 11 May 2019 12:48:53 +0000 Subject: Revised documented advice that made obsolete reference to interp->result. --- doc/TraceVar.3 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/TraceVar.3 b/doc/TraceVar.3 index 97af6d4..caafcf1 100644 --- a/doc/TraceVar.3 +++ b/doc/TraceVar.3 @@ -329,11 +329,11 @@ trace procedures will always be invoked. .SH "RESTRICTIONS" .PP A trace procedure can be called at any time, even when there -is a partially formed result in the interpreter's result area. If +are partially formed results stored in the interpreter. If the trace procedure does anything that could damage this result (such -as calling \fBTcl_Eval\fR) then it must save the original values of -the interpreter's \fBresult\fR and \fBfreeProc\fR fields and restore -them before it returns. +as calling \fBTcl_Eval\fR) then it must use the \fBTcl_SaveInterpState\fR +and related routines to save and restore the original state of +the interpreter before it returns. .SH "UNDEFINED VARIABLES" .PP It is legal to set a trace on an undefined variable. -- cgit v0.12