summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-01-23 16:17:51 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-01-23 16:17:51 (GMT)
commitd3229c55f88044426b1a46681acc3bc9eb0301f3 (patch)
tree2e5edf505a3cb16ba1ac9cf96790a4c56769c3ae /generic
parent133b3139d9c61a6c78f5dcd0e704f110cb269b1b (diff)
downloadtk-d3229c55f88044426b1a46681acc3bc9eb0301f3.zip
tk-d3229c55f88044426b1a46681acc3bc9eb0301f3.tar.gz
tk-d3229c55f88044426b1a46681acc3bc9eb0301f3.tar.bz2
Eliminate use of deprecated Tcl_VarEval function from ttk.
Diffstat (limited to 'generic')
-rw-r--r--generic/ttk/ttkScroll.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/generic/ttk/ttkScroll.c b/generic/ttk/ttkScroll.c
index defe05a..b670540 100644
--- a/generic/ttk/ttkScroll.c
+++ b/generic/ttk/ttkScroll.c
@@ -78,6 +78,7 @@ static int UpdateScrollbar(Tcl_Interp *interp, ScrollHandle h)
char arg1[TCL_DOUBLE_SPACE + 2];
char arg2[TCL_DOUBLE_SPACE + 2];
int code;
+ Tcl_DString buf;
h->flags &= ~SCROLL_UPDATE_REQUIRED;
@@ -88,9 +89,14 @@ static int UpdateScrollbar(Tcl_Interp *interp, ScrollHandle h)
arg1[0] = arg2[0] = ' ';
Tcl_PrintDouble(interp, (double)s->first / s->total, arg1+1);
Tcl_PrintDouble(interp, (double)s->last / s->total, arg2+1);
+ Tcl_DStringInit(&buf);
+ Tcl_DStringAppend(&buf, s->scrollCmd, -1);
+ Tcl_DStringAppend(&buf, arg1, -1);
+ Tcl_DStringAppend(&buf, arg2, -1);
Tcl_Preserve(corePtr);
- code = Tcl_VarEval(interp, s->scrollCmd, arg1, arg2, NULL);
+ code = Tcl_EvalEx(interp, Tcl_DStringValue(&buf), -1, TCL_EVAL_GLOBAL);
+ Tcl_DStringFree(&buf);
if (WidgetDestroyed(corePtr)) {
Tcl_Release(corePtr);
return TCL_ERROR;