diff options
author | dgp <dgp@users.sourceforge.net> | 2018-03-11 23:08:20 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2018-03-11 23:08:20 (GMT) |
commit | f52d25e68a0c474aefd98e1a67257c40f042aa09 (patch) | |
tree | 02ddf435f7617cf5eb7b8102a8ec95e6d2537558 /generic/tclBasic.c | |
parent | 6de6ee8aa9086eb2b86d82e6831dae17232abca4 (diff) | |
parent | 45f51432050a5d9442f2d47734908b04c7ec5dcb (diff) | |
download | tcl-f52d25e68a0c474aefd98e1a67257c40f042aa09.zip tcl-f52d25e68a0c474aefd98e1a67257c40f042aa09.tar.gz tcl-f52d25e68a0c474aefd98e1a67257c40f042aa09.tar.bz2 |
merge 8.7
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r-- | generic/tclBasic.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 7374409..0c4f5ce 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -4465,7 +4465,9 @@ TclNRRunCallbacks( /* All callbacks down to rootPtr not inclusive * are to be run. */ { +#if !defined(TCL_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 Interp *iPtr = (Interp *) interp; +#endif /* !defined(TCL_NO_DEPRECATED) */ NRE_callback *callbackPtr; Tcl_NRPostProc *procPtr; @@ -4479,9 +4481,11 @@ TclNRRunCallbacks( * are for NR function calls, and those are Tcl_Obj based. */ +#if !defined(TCL_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 if (*(iPtr->result) != 0) { (void) Tcl_GetObjResult(interp); } +#endif /* !defined(TCL_NO_DEPRECATED) */ /* This is the trampoline. */ @@ -6876,7 +6880,8 @@ Tcl_AddObjErrorInfo( iPtr->flags |= ERR_LEGACY_COPY; if (iPtr->errorInfo == NULL) { - if (iPtr->result[0] != 0) { +#if !defined(TCL_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 + if (*(iPtr->result) != 0) { /* * The interp's string result is set, apparently by some extension * making a deprecated direct write to it. That extension may @@ -6886,9 +6891,9 @@ Tcl_AddObjErrorInfo( */ iPtr->errorInfo = Tcl_NewStringObj(iPtr->result, -1); - } else { + } else +#endif /* !defined(TCL_NO_DEPRECATED) */ iPtr->errorInfo = iPtr->objResultPtr; - } Tcl_IncrRefCount(iPtr->errorInfo); if (!iPtr->errorCode) { Tcl_SetErrorCode(interp, "NONE", NULL); |