From f406561f406ca970ae8d90dd4c4b752122423bfc Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 5 Mar 2018 20:00:06 +0000 Subject: Take the next step in TIPs 330 and 336, ending in 8.7 the USE_INTERP_RESULT and USE_INTERP_ERRORLINE directives to escape need to migrate to 8.6 interfaces. --- generic/tcl.h | 22 ---------------------- generic/tclResult.c | 17 ----------------- 2 files changed, 39 deletions(-) diff --git a/generic/tcl.h b/generic/tcl.h index 0d6549f..ccfd05e 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -468,31 +468,9 @@ typedef struct Tcl_Interp { /* TIP #330: Strongly discourage extensions from using the string * result. */ -#ifdef USE_INTERP_RESULT - char *result TCL_DEPRECATED_API("use Tcl_GetStringResult/Tcl_SetResult"); - /* If the last command returned a string - * result, this points to it. */ - void (*freeProc) (char *blockPtr) - TCL_DEPRECATED_API("use Tcl_GetStringResult/Tcl_SetResult"); - /* Zero means the string result is statically - * allocated. TCL_DYNAMIC means it was - * allocated with ckalloc and should be freed - * with ckfree. Other values give the address - * of function to invoke to free the result. - * Tcl_Eval must free it before executing next - * command. */ -#else char *resultDontUse; /* Don't use in extensions! */ void (*freeProcDontUse) (char *); /* Don't use in extensions! */ -#endif -#ifdef USE_INTERP_ERRORLINE - int errorLine TCL_DEPRECATED_API("use Tcl_GetErrorLine/Tcl_SetErrorLine"); - /* When TCL_ERROR is returned, this gives the - * line number within the command where the - * error occurred (1 if first line). */ -#else int errorLineDontUse; /* Don't use in extensions! */ -#endif } #endif /* !TCL_NO_DEPRECATED */ Tcl_Interp; diff --git a/generic/tclResult.c b/generic/tclResult.c index 57a6de5..a5ec4be 100644 --- a/generic/tclResult.c +++ b/generic/tclResult.c @@ -651,23 +651,6 @@ Tcl_AppendResultVA( } Tcl_AppendStringsToObjVA(objPtr, argList); Tcl_SetObjResult(interp, objPtr); - - /* - * Strictly we should call Tcl_GetStringResult(interp) here to make sure - * that interp->result is correct according to the old contract, but that - * makes the performance of much code (e.g. in Tk) absolutely awful. So we - * leave it out; code that really wants interp->result can just insert the - * calls to Tcl_GetStringResult() itself. [Patch 1041072 discussion] - */ - -#ifdef USE_INTERP_RESULT - /* - * Ensure that the interp->result is legal so old Tcl 7.* code still - * works. There's still embarrasingly much of it about... - */ - - (void) Tcl_GetStringResult(interp); -#endif /* USE_INTERP_RESULT */ } /* -- cgit v0.12