summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-03-07 20:24:00 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-03-07 20:24:00 (GMT)
commit3492c92f3dcb820bd5f7aa833e340b6e1eb8f1c5 (patch)
tree7609c8368e5f173c95fa4c22acf2f44858eb64e7 /generic/tclBasic.c
parent405b9175e62f3133e3e0811262ab863b70c7f1e7 (diff)
downloadtcl-3492c92f3dcb820bd5f7aa833e340b6e1eb8f1c5.zip
tcl-3492c92f3dcb820bd5f7aa833e340b6e1eb8f1c5.tar.gz
tcl-3492c92f3dcb820bd5f7aa833e340b6e1eb8f1c5.tar.bz2
Improve -DTCL_NO_DEPRECATED compiles. It now can handle loading stub-enabled extensions with incompatible magic number (backported from trunk)
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 3d16b70..c493c3d 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -4462,7 +4462,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;
@@ -4476,9 +4478,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. */
@@ -6873,7 +6877,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
@@ -6883,9 +6888,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);