summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-04-12 15:33:08 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-04-12 15:33:08 (GMT)
commitc6149208196b41038495d5a81caeb58a235c0225 (patch)
treefe4b828cb9b4d77ba3eddace3bff7109e633c825
parent051a1473cbc119b08b783bec2857c9dfe22d3f0a (diff)
downloadtcl-c6149208196b41038495d5a81caeb58a235c0225.zip
tcl-c6149208196b41038495d5a81caeb58a235c0225.tar.gz
tcl-c6149208196b41038495d5a81caeb58a235c0225.tar.bz2
Fix [f566e1c817]: macOS: -DTCL_NO_DEPRECATED
-rw-r--r--generic/tclResult.c7
-rw-r--r--generic/tclStubInit.c2
2 files changed, 6 insertions, 3 deletions
diff --git a/generic/tclResult.c b/generic/tclResult.c
index ba42e46..086659e 100644
--- a/generic/tclResult.c
+++ b/generic/tclResult.c
@@ -464,6 +464,7 @@ Tcl_SetResult(
ResetObjResult(iPtr);
}
+#endif /* !TCL_NO_DEPRECATED */
/*
*----------------------------------------------------------------------
@@ -482,10 +483,12 @@ Tcl_SetResult(
*----------------------------------------------------------------------
*/
+#undef Tcl_GetStringResult
const char *
Tcl_GetStringResult(
Tcl_Interp *interp)/* Interpreter whose result to return. */
{
+#ifdef TCL_NO_DEPRECATED
Interp *iPtr = (Interp *) interp;
/*
* If the string result is empty, move the object result to the string
@@ -497,8 +500,10 @@ Tcl_GetStringResult(
TCL_VOLATILE);
}
return iPtr->result;
+#else
+ return TclGetString(Tcl_GetObjResult(interp));
+#endif
}
-#endif /* !TCL_NO_DEPRECATED */
/*
*----------------------------------------------------------------------
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index 2819424..41ece01 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -635,8 +635,6 @@ static int utfNcasecmp(const char *s1, const char *s2, unsigned int n){
# define Tcl_Eval 0
# undef Tcl_GlobalEval
# define Tcl_GlobalEval 0
-# undef Tcl_GetStringResult
-# define Tcl_GetStringResult 0
# undef Tcl_SaveResult
# define Tcl_SaveResult 0
# undef Tcl_RestoreResult