summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorjan.nijtmans <jan.nijtmans@noemail.net>2013-03-07 14:49:40 (GMT)
committerjan.nijtmans <jan.nijtmans@noemail.net>2013-03-07 14:49:40 (GMT)
commite9cfcf8246b9fc5f421c106f9d25d0bd6ccc55bc (patch)
tree57401f7210c6e05cfdc7c3b9fa8101309ed119e4 /macosx
parent53669af33863a2a138aae59c6a11638a8b963043 (diff)
downloadtk-e9cfcf8246b9fc5f421c106f9d25d0bd6ccc55bc.zip
tk-e9cfcf8246b9fc5f421c106f9d25d0bd6ccc55bc.tar.gz
tk-e9cfcf8246b9fc5f421c106f9d25d0bd6ccc55bc.tar.bz2
Eliminate all usage of (deprecated) functions Tcl_VarEval and Tcl_Eval.
FossilOrigin-Name: 0deef053f656e065cb0bb8410a0584bc8d5c8e54
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXHLEvents.c2
-rw-r--r--macosx/tkMacOSXMenus.c4
-rw-r--r--macosx/tkMacOSXScale.c8
3 files changed, 10 insertions, 4 deletions
diff --git a/macosx/tkMacOSXHLEvents.c b/macosx/tkMacOSXHLEvents.c
index b5e8f43..ffbb06d 100644
--- a/macosx/tkMacOSXHLEvents.c
+++ b/macosx/tkMacOSXHLEvents.c
@@ -545,7 +545,7 @@ ScriptHandler(
theErr = FSRefToDString(&file, &scriptName);
if (theErr == noErr) {
- tclErr = Tcl_EvalFile(interp, Tcl_DStringValue(&scriptName));
+ tclErr = Tcl_FSEvalFileEx(interp, Tcl_DStringValue(&scriptName), NULL);
Tcl_DStringFree(&scriptName);
} else {
sprintf(errString, "AEDoScriptHandler: file not found");
diff --git a/macosx/tkMacOSXMenus.c b/macosx/tkMacOSXMenus.c
index 3b79169..881bf75 100644
--- a/macosx/tkMacOSXMenus.c
+++ b/macosx/tkMacOSXMenus.c
@@ -216,7 +216,7 @@ static Tcl_Obj * GetWidgetDemoPath(Tcl_Interp *interp);
if (len) {
Tcl_IncrRefCount(path);
- int code = Tcl_FSEvalFile(_eventInterp, path);
+ int code = Tcl_FSEvalFileEx(_eventInterp, path, NULL);
if (code != TCL_OK) {
Tcl_BackgroundException(_eventInterp, code);
@@ -236,7 +236,7 @@ static Tcl_Obj * GetWidgetDemoPath(Tcl_Interp *interp);
if (path) {
Tcl_IncrRefCount(path);
- int code = Tcl_FSEvalFile(_eventInterp, path);
+ int code = Tcl_FSEvalFileEx(_eventInterp, path, NULL);
if (code != TCL_OK) {
Tcl_BackgroundException(_eventInterp, code);
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);