--- src/tkButton.c.orig 2013-01-04 23:24:45.000000000 -0500 +++ src/tkButton.c 2013-01-04 23:28:29.000000000 -0500 @@ -526,8 +526,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, @@ -1890,7 +1888,7 @@ } } if ((butPtr->type != TYPE_LABEL) && (butPtr->command != NULL)) { - return TkCopyAndGlobalEval(butPtr->interp, butPtr->command); + return Tcl_EvalObjEx(butPtr->interp, butPtr->command, TCL_EVAL_GLOBAL); } return TCL_OK; } --- src/bltVecMath.c.ORIG 2008-04-15 17:31:26.000000000 +0200 +++ src/bltVecMath.c 2013-04-05 09:50:18.678471170 +0200 @@ -745,10 +745,10 @@ * * This procedure is called when an error occurs during a * floating-point operation. It reads errno and sets - * interp->result accordingly. + * Tcl_GetStringResult(interp) accordingly. * * Results: - * Interp->result is set to hold an error message. + * Tcl_GetStringResult(interp) is set to hold an error message. * * Side effects: * None. @@ -764,20 +764,20 @@ if ((errno == EDOM) || (value != value)) { Tcl_AppendResult(interp, "domain error: argument not in valid range", (char *)NULL); - Tcl_SetErrorCode(interp, "ARITH", "DOMAIN", interp->result, + Tcl_SetErrorCode(interp, "ARITH", "DOMAIN", Tcl_GetStringResult(interp), (char *)NULL); } else if ((errno == ERANGE) || IS_INF(value)) { if (value == 0.0) { Tcl_AppendResult(interp, "floating-point value too small to represent", (char *)NULL); - Tcl_SetErrorCode(interp, "ARITH", "UNDERFLOW", interp->result, + Tcl_SetErrorCode(interp, "ARITH", "UNDERFLOW", Tcl_GetStringResult(interp), (char *)NULL); } else { Tcl_AppendResult(interp, "floating-point value too large to represent", (char *)NULL); - Tcl_SetErrorCode(interp, "ARITH", "OVERFLOW", interp->result, + Tcl_SetErrorCode(interp, "ARITH", "OVERFLOW", Tcl_GetStringResult(interp), (char *)NULL); } } else { @@ -786,7 +786,7 @@ sprintf(buf, "%d", errno); Tcl_AppendResult(interp, "unknown floating-point error, ", "errno = ", buf, (char *)NULL); - Tcl_SetErrorCode(interp, "ARITH", "UNKNOWN", interp->result, + Tcl_SetErrorCode(interp, "ARITH", "UNKNOWN", Tcl_GetStringResult(interp), (char *)NULL); } } @@ -880,7 +880,7 @@ * was computed successfully. If the name doesn't match any * known math function, returns TCL_RETURN. And if a format error * was found, TCL_ERROR is returned and an error message is left - * in interp->result. + * in Tcl_GetStringResult(interp). * * After a successful return parsePtr will be updated to point to * the character just after the function call, the token is set @@ -963,7 +963,7 @@ * Results: * TCL_OK is returned unless an error occurred while doing lexical * analysis or executing an embedded command. In that case a - * standard Tcl error is returned, using interp->result to hold + * standard Tcl error is returned, using Tcl_GetStringResult(interp) to hold * an error message. In the event of a successful return, the token * and field in parsePtr is updated to refer to the next symbol in * the expression string, and the expr field is advanced past that @@ -1211,7 +1211,7 @@ * * Results: * Normally TCL_OK is returned. The value of the expression is - * returned in *valuePtr. If an error occurred, then interp->result + * returned in *valuePtr. If an error occurred, then Tcl_GetStringResult(interp) * contains an error message and TCL_ERROR is returned. * InfoPtr->token will be left pointing to the token AFTER the * expression, and parsePtr->nextPtr will point to the character just @@ -1756,7 +1756,7 @@ * * Results: * The result is a standard Tcl return value. If an error - * occurs then an error message is left in interp->result. + * occurs then an error message is left in Tcl_GetStringResult(interp). * The value of the expression is returned in *valuePtr, in * whatever form it ends up in (could be string or integer * or double). Caller may need to convert result. Caller @@ -1822,7 +1822,7 @@ * Results: * Each procedure returns TCL_OK if it succeeds and places result * information at *resultPtr. If it fails it returns TCL_ERROR - * and leaves an error message in interp->result. + * and leaves an error message in Tcl_GetStringResult(interp). * * Side effects: * None. @@ -2010,7 +2010,7 @@ * Results: * Each of the procedures below returns a standard Tcl result. * If an error occurs then an error message is left in - * interp->result. Otherwise the value of the expression, + * Tcl_GetStringResult(interp). Otherwise the value of the expression, * in the appropriate form, is stored at *resultPtr. If * the expression had a result that was incompatible with the * desired form then an error is returned. @@ -2042,7 +2042,7 @@ Blt_VectorDuplicate(vPtr, value.vPtr); } else { register int i; - /* No result vector. Put values in interp->result. */ + /* No result vector. Put values in Tcl_GetStringResult(interp). */ for (i = 0; i < value.vPtr->length; i++) { string = Blt_Dtoa(interp, value.vPtr->valueArr[i]); Tcl_AppendElement(interp, string); --- src/bltParse.c.ORIG 2008-04-15 17:31:25.000000000 +0200 +++ src/bltParse.c 2013-04-05 11:06:47.963051327 +0200 @@ -228,16 +228,16 @@ return result; } (*termPtr) += 1; - length = strlen(iPtr->result); + length = strlen(Tcl_GetStringResult(iPtr)); shortfall = length + 1 - (parsePtr->end - parsePtr->next); if (shortfall > 0) { (*parsePtr->expandProc) (parsePtr, shortfall); } - strcpy(parsePtr->next, iPtr->result); + strcpy(parsePtr->next, Tcl_GetStringResult(iPtr)); parsePtr->next += length; Tcl_FreeResult(interp); - iPtr->result = iPtr->resultSpace; + Tcl_SetResult(iPtr,(char*)iPtr->resultSpace, TCL_VOLATILE); iPtr->resultSpace[0] = '\0'; return TCL_OK; } --- src/bltScrollbar.c.ORIG 2008-04-15 17:31:25.000000000 +0200 +++ src/bltScrollbar.c 2013-04-05 10:44:51.822171732 +0200 @@ -534,7 +534,7 @@ } else { fraction = ((double)pixels / (double)barWidth); } - sprintf(interp->result, "%g", fraction); + sprintf(Tcl_GetStringResult(interp), "%s", fraction); } else if ((c == 'f') && (strncmp(argv[1], "fraction", length) == 0)) { int x, y, pos, barWidth; double fraction; --- src/bltTed.c.ORIG 2008-04-15 17:31:26.000000000 +0200 +++ src/bltTed.c 2013-04-05 11:09:07.165038592 +0200 @@ -1504,7 +1504,8 @@ tablePtr->flags |= ARRANGE_PENDING; Tcl_DoWhenIdle(tablePtr->arrangeProc, tablePtr); } - interp->result = Tk_PathName(tedPtr->tkwin); + + Tcl_SetResult(interp, Tk_PathName(tedPtr->tkwin), TCL_VOLATILE); tedPtr->flags |= LAYOUT_PENDING; EventuallyRedraw(tedPtr); return TCL_OK; @@ -1678,7 +1679,7 @@ tedPtr->activeRectArr[4].width = grip - 1; tedPtr->activeRectArr[4].height = grip - 1; - interp->result = Tk_PathName(entryPtr->tkwin); + Tcl_SetResult(interp, Tk_PathName(entryPtr->tkwin), TCL_VOLATILE); active = 1; break; } @@ -1751,7 +1752,7 @@ tablePtr->flags |= ARRANGE_PENDING; Tcl_DoWhenIdle(tablePtr->arrangeProc, tablePtr); } - interp->result = Tk_PathName(tedPtr->tkwin); + Tcl_SetResult(interp, Tk_PathName(tedPtr->tkwin), TCL_VOLATILE); tedPtr->flags |= LAYOUT_PENDING; EventuallyRedraw(tedPtr); return TCL_OK; --- src/tkConsole.c.ORIG 2008-04-15 17:31:26.000000000 +0200 +++ src/tkConsole.c 2013-04-05 10:47:24.512157763 +0200 @@ -216,7 +216,7 @@ Tcl_Preserve((ClientData)consoleInterp); if (Tcl_Eval(consoleInterp, initCmd) == TCL_ERROR) { /* goto error; -- no problem for now... */ - printf("Eval error: %s", consoleInterp->result); + printf("Eval error: %s", Tcl_GetStringResult(consoleInterp)); } Tcl_Release((ClientData)consoleInterp); return TCL_OK; @@ -487,11 +487,11 @@ Tcl_Preserve((ClientData)otherInterp); if ((c == 'e') && (strncmp(argv[1], "eval", length)) == 0) { result = Tcl_GlobalEval(otherInterp, argv[2]); - Tcl_AppendResult(interp, otherInterp->result, (char *)NULL); + Tcl_AppendResult(interp, Tcl_GetStringResult(otherInterp), (char *)NULL); } else if ((c == 'r') && (strncmp(argv[1], "record", length)) == 0) { Tcl_RecordAndEval(otherInterp, argv[2], TCL_EVAL_GLOBAL); result = TCL_OK; - Tcl_AppendResult(interp, otherInterp->result, (char *)NULL); + Tcl_AppendResult(interp, Tcl_GetStringResult(otherInterp), (char *)NULL); } else { Tcl_AppendResult(interp, "bad option \"", argv[1], "\": should be eval or record", --- src/tkScrollbar.c.ORIG 2008-04-15 17:31:26.000000000 +0200 +++ src/tkScrollbar.c 2013-04-05 10:45:43.712166985 +0200 @@ -533,7 +533,7 @@ } else { fraction = ((double)pixels / (double)barWidth); } - sprintf(interp->result, "%g", fraction); + sprintf(Tcl_GetStringResult(interp), "%s", fraction); } else if ((c == 'f') && (strncmp(argv[1], "fraction", length) == 0)) { int x, y, pos, barWidth; double fraction;