summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXScale.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-03-07 14:49:40 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-03-07 14:49:40 (GMT)
commit0e5747eb2704c1b05cd30ccdf45fdc070851d8e8 (patch)
tree57401f7210c6e05cfdc7c3b9fa8101309ed119e4 /macosx/tkMacOSXScale.c
parent0aa90e499f40fc68f53c0e7e488a4bb2ee1de2c7 (diff)
downloadtk-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 'macosx/tkMacOSXScale.c')
-rw-r--r--macosx/tkMacOSXScale.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/macosx/tkMacOSXScale.c b/macosx/tkMacOSXScale.c
index e6d93b4..0bca521 100644
--- a/macosx/tkMacOSXScale.c
+++ b/macosx/tkMacOSXScale.c
@@ -154,6 +154,7 @@ TkpDisplayScale(
MacDrawable *macDraw;
SInt32 initialValue, minValue, maxValue;
UInt16 numTicks;
+ Tcl_DString buf;
#ifdef TK_MAC_DEBUG_SCALE
TkMacOSXDbgMsg("TkpDisplayScale");
@@ -171,7 +172,12 @@ TkpDisplayScale(
if ((scalePtr->flags & INVOKE_COMMAND) && (scalePtr->command != NULL)) {
Tcl_Preserve((ClientData) interp);
sprintf(string, scalePtr->format, scalePtr->value);
- result = Tcl_VarEval(interp, scalePtr->command, " ", string, NULL);
+ Tcl_DStringInit(&buf);
+ Tcl_DStringAppend(&buf, scalePtr->command, -1);
+ Tcl_DStringAppend(&buf, " ", -1);
+ Tcl_DStringAppend(&buf, string, -1);
+ result = Tcl_EvalEx(interp, Tcl_DStringValue(&buf), -1, 0);
+ Tcl_DStringFree(&buf);
if (result != TCL_OK) {
Tcl_AddErrorInfo(interp, "\n (command executed by scale)");
Tcl_BackgroundException(interp, result);