mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-06 08:26:50 +01:00
377171575b
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
29 lines
1 KiB
Diff
29 lines
1 KiB
Diff
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;
|
|
}
|