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/tkWindow.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/tkWindow.c')
-rw-r--r-- | generic/tkWindow.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/generic/tkWindow.c b/generic/tkWindow.c index d20473f..734e7be 100644 --- a/generic/tkWindow.c +++ b/generic/tkWindow.c @@ -3142,7 +3142,7 @@ Initialize( * path of the slave. */ - code = Tcl_Eval(master, Tcl_DStringValue(&ds)); + code = Tcl_EvalEx(master, Tcl_DStringValue(&ds), -1, 0); if (code != TCL_OK) { /* * We might want to transfer the error message or not. We don't. @@ -3278,8 +3278,14 @@ Initialize( */ if (geometry != NULL) { + Tcl_DString buf; + Tcl_SetVar2(interp, "geometry", NULL, geometry, TCL_GLOBAL_ONLY); - code = Tcl_VarEval(interp, "wm geometry . ", geometry, NULL); + Tcl_DStringInit(&buf); + Tcl_DStringAppend(&buf, "wm geometry . ", -1); + Tcl_DStringAppend(&buf, geometry, -1); + code = Tcl_EvalEx(interp, Tcl_DStringValue(&buf), -1, 0); + Tcl_DStringFree(&buf); if (code != TCL_OK) { goto done; } @@ -3337,7 +3343,7 @@ Initialize( * an alternate [tkInit] command before calling Tk_Init(). */ - code = Tcl_Eval(interp, + code = Tcl_EvalEx(interp, "if {[namespace which -command tkInit] eq \"\"} {\n\ proc tkInit {} {\n\ global tk_library tk_version tk_patchLevel\n\ @@ -3345,7 +3351,7 @@ Initialize( tcl_findLibrary tk $tk_version $tk_patchLevel tk.tcl TK_LIBRARY tk_library\n\ }\n\ }\n\ -tkInit"); +tkInit", -1, 0); } if (code == TCL_OK) { /* |