diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-06-08 12:41:00 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-06-08 12:41:00 (GMT) |
commit | 50d501f90b85fcd0a3beaf485da84379975c9504 (patch) | |
tree | 4ed72822f24549fd22069c88ee1fc7d29bbdc45e /generic | |
parent | 84cfc97d7f9469cb9f4406c0f26a15941de718d6 (diff) | |
download | tk-50d501f90b85fcd0a3beaf485da84379975c9504.zip tk-50d501f90b85fcd0a3beaf485da84379975c9504.tar.gz tk-50d501f90b85fcd0a3beaf485da84379975c9504.tar.bz2 |
Fix [2790615]: "update" performs Tk callbacks in its own stack frame.
by adding TCL_EVAL_GLOBAL in a lot of places.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkCanvPs.c | 2 | ||||
-rw-r--r-- | generic/tkCanvas.c | 4 | ||||
-rw-r--r-- | generic/tkEntry.c | 2 | ||||
-rw-r--r-- | generic/tkListbox.c | 4 | ||||
-rw-r--r-- | generic/tkMenu.c | 2 | ||||
-rw-r--r-- | generic/tkText.c | 2 | ||||
-rw-r--r-- | generic/tkTextDisp.c | 4 | ||||
-rw-r--r-- | generic/tkWindow.c | 2 |
8 files changed, 11 insertions, 11 deletions
diff --git a/generic/tkCanvPs.c b/generic/tkCanvPs.c index 2cb4d27..bcd1d13 100644 --- a/generic/tkCanvPs.c +++ b/generic/tkCanvPs.c @@ -193,7 +193,7 @@ TkCanvPostscriptCmd( * such. */ - result = Tcl_EvalEx(interp, "::tk::ensure_psenc_is_loaded", -1, 0); + result = Tcl_EvalEx(interp, "::tk::ensure_psenc_is_loaded", -1, TCL_EVAL_GLOBAL); if (result != TCL_OK) { return result; } diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c index 8230122..9f661bc 100644 --- a/generic/tkCanvas.c +++ b/generic/tkCanvas.c @@ -5588,7 +5588,7 @@ CanvasUpdateScrollbars( Tcl_DStringAppend(&buf, xScrollCmd, -1); Tcl_DStringAppend(&buf, " ", -1); Tcl_DStringAppend(&buf, Tcl_GetString(fractions), -1); - result = Tcl_EvalEx(interp, Tcl_DStringValue(&buf), -1, 0); + result = Tcl_EvalEx(interp, Tcl_DStringValue(&buf), -1, TCL_EVAL_GLOBAL); Tcl_DStringFree(&buf); Tcl_DecrRefCount(fractions); if (result != TCL_OK) { @@ -5606,7 +5606,7 @@ CanvasUpdateScrollbars( Tcl_DStringAppend(&buf, yScrollCmd, -1); Tcl_DStringAppend(&buf, " ", -1); Tcl_DStringAppend(&buf, Tcl_GetString(fractions), -1); - result = Tcl_EvalEx(interp, Tcl_DStringValue(&buf), -1, 0); + result = Tcl_EvalEx(interp, Tcl_DStringValue(&buf), -1, TCL_EVAL_GLOBAL); Tcl_DStringFree(&buf); Tcl_DecrRefCount(fractions); if (result != TCL_OK) { diff --git a/generic/tkEntry.c b/generic/tkEntry.c index fc5ba63..468eabe 100644 --- a/generic/tkEntry.c +++ b/generic/tkEntry.c @@ -3007,7 +3007,7 @@ EntryUpdateScrollbar( Tcl_DStringAppend(&buf, firstStr, -1); Tcl_DStringAppend(&buf, " ", -1); Tcl_DStringAppend(&buf, lastStr, -1); - code = Tcl_EvalEx(interp, Tcl_DStringValue(&buf), -1, 0); + code = Tcl_EvalEx(interp, Tcl_DStringValue(&buf), -1, TCL_EVAL_GLOBAL); Tcl_DStringFree(&buf); if (code != TCL_OK) { Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( diff --git a/generic/tkListbox.c b/generic/tkListbox.c index b00a895..514b349 100644 --- a/generic/tkListbox.c +++ b/generic/tkListbox.c @@ -3329,7 +3329,7 @@ ListboxUpdateVScrollbar( Tcl_DStringAppend(&buf, firstStr, -1); Tcl_DStringAppend(&buf, " ", -1); Tcl_DStringAppend(&buf, lastStr, -1); - result = Tcl_EvalEx(interp, Tcl_DStringValue(&buf), -1, 0); + result = Tcl_EvalEx(interp, Tcl_DStringValue(&buf), -1, TCL_EVAL_GLOBAL); Tcl_DStringFree(&buf); if (result != TCL_OK) { Tcl_AddErrorInfo(interp, @@ -3401,7 +3401,7 @@ ListboxUpdateHScrollbar( Tcl_DStringAppend(&buf, firstStr, -1); Tcl_DStringAppend(&buf, " ", -1); Tcl_DStringAppend(&buf, lastStr, -1); - result = Tcl_EvalEx(interp, Tcl_DStringValue(&buf), -1, 0); + result = Tcl_EvalEx(interp, Tcl_DStringValue(&buf), -1, TCL_EVAL_GLOBAL); Tcl_DStringFree(&buf); if (result != TCL_OK) { Tcl_AddErrorInfo(interp, diff --git a/generic/tkMenu.c b/generic/tkMenu.c index 318930f..f43bbe0 100644 --- a/generic/tkMenu.c +++ b/generic/tkMenu.c @@ -1019,7 +1019,7 @@ TkInvokeMenu( Tcl_DStringInit(&ds); Tcl_DStringAppend(&ds, "tk::TearOffMenu ", -1); Tcl_DStringAppend(&ds, Tk_PathName(menuPtr->tkwin), -1); - result = Tcl_EvalEx(interp, Tcl_DStringValue(&ds), -1, 0); + result = Tcl_EvalEx(interp, Tcl_DStringValue(&ds), -1, TCL_EVAL_GLOBAL); Tcl_DStringFree(&ds); } else if ((mePtr->type == CHECK_BUTTON_ENTRY) && (mePtr->namePtr != NULL)) { diff --git a/generic/tkText.c b/generic/tkText.c index b696647..2ddfea1 100644 --- a/generic/tkText.c +++ b/generic/tkText.c @@ -5039,7 +5039,7 @@ DumpSegment( Tcl_DStringAppend(&buf, Tcl_GetString(command), -1); Tcl_DStringAppend(&buf, " ", -1); Tcl_DStringAppend(&buf, Tcl_GetString(tuple), -1); - code = Tcl_EvalEx(interp, Tcl_DStringValue(&buf), -1, 0); + code = Tcl_EvalEx(interp, Tcl_DStringValue(&buf), -1, TCL_EVAL_GLOBAL); Tcl_DStringFree(&buf); if (code != TCL_OK) { Tcl_AddErrorInfo(interp, diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c index 2deeaf2..93b56aa 100644 --- a/generic/tkTextDisp.c +++ b/generic/tkTextDisp.c @@ -6527,7 +6527,7 @@ GetXView( Tcl_DStringAppend(&buf, textPtr->xScrollCmd, -1); Tcl_DStringAppend(&buf, buf1, -1); Tcl_DStringAppend(&buf, buf2, -1); - code = Tcl_EvalEx(interp, Tcl_DStringValue(&buf), -1, 0); + code = Tcl_EvalEx(interp, Tcl_DStringValue(&buf), -1, TCL_EVAL_GLOBAL); Tcl_DStringFree(&buf); if (code != TCL_OK) { Tcl_AddErrorInfo(interp, @@ -6812,7 +6812,7 @@ GetYView( Tcl_DStringAppend(&buf, textPtr->yScrollCmd, -1); Tcl_DStringAppend(&buf, buf1, -1); Tcl_DStringAppend(&buf, buf2, -1); - code = Tcl_EvalEx(interp, Tcl_DStringValue(&buf), -1, 0); + code = Tcl_EvalEx(interp, Tcl_DStringValue(&buf), -1, TCL_EVAL_GLOBAL); Tcl_DStringFree(&buf); if (code != TCL_OK) { Tcl_AddErrorInfo(interp, diff --git a/generic/tkWindow.c b/generic/tkWindow.c index 121bb5a..8ec18e2 100644 --- a/generic/tkWindow.c +++ b/generic/tkWindow.c @@ -3339,7 +3339,7 @@ Initialize( tcl_findLibrary tk $tk_version $tk_patchLevel tk.tcl TK_LIBRARY tk_library\n\ }\n\ }\n\ -tkInit", -1, 0); +tkInit", -1, TCL_EVAL_GLOBAL); } if (code == TCL_OK) { /* |