diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-03-07 14:49:40 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-03-07 14:49:40 (GMT) |
commit | 0e5747eb2704c1b05cd30ccdf45fdc070851d8e8 (patch) | |
tree | 57401f7210c6e05cfdc7c3b9fa8101309ed119e4 /generic/tkCanvas.c | |
parent | 0aa90e499f40fc68f53c0e7e488a4bb2ee1de2c7 (diff) | |
download | tk-0e5747eb2704c1b05cd30ccdf45fdc070851d8e8.zip tk-0e5747eb2704c1b05cd30ccdf45fdc070851d8e8.tar.gz tk-0e5747eb2704c1b05cd30ccdf45fdc070851d8e8.tar.bz2 |
Eliminate all usage of functions Tcl_VarEval (deprecated) and Tcl_Eval (to the prefered Tcl_EvalEx).
Diffstat (limited to 'generic/tkCanvas.c')
-rw-r--r-- | generic/tkCanvas.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c index 23d8e04..8e14852 100644 --- a/generic/tkCanvas.c +++ b/generic/tkCanvas.c @@ -5540,6 +5540,7 @@ CanvasUpdateScrollbars( int xOrigin, yOrigin, inset, width, height; int scrollX1, scrollX2, scrollY1, scrollY2; char *xScrollCmd, *yScrollCmd; + Tcl_DString buf; /* * Save all the relevant values from the canvasPtr, because it might be @@ -5570,8 +5571,12 @@ CanvasUpdateScrollbars( Tcl_Obj *fractions = ScrollFractions(xOrigin + inset, xOrigin + width - inset, scrollX1, scrollX2); - result = Tcl_VarEval(interp, xScrollCmd," ",Tcl_GetString(fractions), - NULL); + Tcl_DStringInit(&buf); + 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); + Tcl_DStringFree(&buf); Tcl_DecrRefCount(fractions); if (result != TCL_OK) { Tcl_BackgroundException(interp, result); @@ -5584,8 +5589,12 @@ CanvasUpdateScrollbars( Tcl_Obj *fractions = ScrollFractions(yOrigin + inset, yOrigin + height - inset, scrollY1, scrollY2); - result = Tcl_VarEval(interp, yScrollCmd," ",Tcl_GetString(fractions), - NULL); + Tcl_DStringInit(&buf); + 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); + Tcl_DStringFree(&buf); Tcl_DecrRefCount(fractions); if (result != TCL_OK) { Tcl_BackgroundException(interp, result); |