diff options
Diffstat (limited to 'graphics/tclblt/patches/tk8.6.patch')
-rw-r--r-- | graphics/tclblt/patches/tk8.6.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/graphics/tclblt/patches/tk8.6.patch b/graphics/tclblt/patches/tk8.6.patch new file mode 100644 index 0000000000..3de6c0ed15 --- /dev/null +++ b/graphics/tclblt/patches/tk8.6.patch @@ -0,0 +1,29 @@ +Description: Patch replaces call to TkCopyAndGlobalEval by a call to + Tcl_EvalObjEx because the former function has been dropped in Tk 8.6. +Last-Modified: Fri, 04 Jul 2014 09:18:32 +0400 + +--- a/generic/tkButton.c ++++ b/generic/tkButton.c +@@ -864,8 +864,6 @@ + static Blt_TileChangedProc TileChangedProc; + static Tcl_CmdProc ButtonCmd, LabelCmd, CheckbuttonCmd, RadiobuttonCmd; + +-EXTERN int TkCopyAndGlobalEval _ANSI_ARGS_((Tcl_Interp *interp, char *script)); +- + #if (TK_MAJOR_VERSION > 4) + EXTERN void TkComputeAnchor _ANSI_ARGS_((Tk_Anchor anchor, Tk_Window tkwin, + int padX, int padY, int innerWidth, int innerHeight, int *xPtr, +@@ -3292,7 +3290,12 @@ + } + } + if ((butPtr->type > TYPE_LABEL) && (butPtr->command != NULL)) { +- return TkCopyAndGlobalEval(butPtr->interp, butPtr->command); ++ Tcl_DString buf; ++ Tcl_DStringInit(&buf); ++ Tcl_DStringAppend(&buf, butPtr->command, -1); ++ int code = Tcl_EvalEx(butPtr->interp, Tcl_DStringValue(&buf), Tcl_DStringLength(&buf), TCL_EVAL_GLOBAL); ++ Tcl_DStringFree(&buf); ++ return code; + } + return TCL_OK; + } |