summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-05-09 20:06:34 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-05-09 20:06:34 (GMT)
commitb1139d3d2099aad8ad1981deaa0f689e1b4c322a (patch)
tree9dc5cc17a2906df1e6ea7a295b0293b5cfd80681
parent67ba502f3489051889064fbb4b3b66741704d254 (diff)
downloadtcl-b1139d3d2099aad8ad1981deaa0f689e1b4c322a.zip
tcl-b1139d3d2099aad8ad1981deaa0f689e1b4c322a.tar.gz
tcl-b1139d3d2099aad8ad1981deaa0f689e1b4c322a.tar.bz2
If compiling with -DTCL_NO_DEPRECATED, make Tcl_GetStringResult() a macro. This opens up one more simplification for Tcl 9.
Compile the load-test dll's/so's with -DTCL_NO_DEPRECATED
-rw-r--r--generic/tclDecls.h2
-rw-r--r--generic/tclResult.c6
-rw-r--r--generic/tclStubInit.c2
-rw-r--r--unix/dltest/Makefile.in2
4 files changed, 6 insertions, 6 deletions
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index 3b67796..3d40bef 100644
--- a/generic/tclDecls.h
+++ b/generic/tclDecls.h
@@ -3986,6 +3986,8 @@ extern const TclStubs *tclStubsPtr;
#define Tcl_AddObjErrorInfo(interp, message, length) \
Tcl_AppendObjToErrorInfo(interp, Tcl_NewStringObj(message, length))
#ifdef TCL_NO_DEPRECATED
+#undef Tcl_GetStringResult
+#define Tcl_GetStringResult(interp) Tcl_GetString(Tcl_GetObjResult(interp))
#undef Tcl_Eval
#define Tcl_Eval(interp, objPtr) \
Tcl_EvalEx(interp, objPtr, -1, 0)
diff --git a/generic/tclResult.c b/generic/tclResult.c
index 5a03421..4d14f01 100644
--- a/generic/tclResult.c
+++ b/generic/tclResult.c
@@ -464,7 +464,6 @@ Tcl_SetResult(
ResetObjResult(iPtr);
}
-#endif /* !TCL_NO_DEPRECATED */
/*
*----------------------------------------------------------------------
@@ -488,9 +487,6 @@ Tcl_GetStringResult(
register Tcl_Interp *interp)/* Interpreter whose result to return. */
{
Interp *iPtr = (Interp *) interp;
-#ifdef TCL_NO_DEPRECATED
- return Tcl_GetString(iPtr->objResultPtr);
-#else
/*
* If the string result is empty, move the object result to the string
* result, then reset the object result.
@@ -501,8 +497,8 @@ Tcl_GetStringResult(
TCL_VOLATILE);
}
return iPtr->result;
-#endif
}
+#endif /* !TCL_NO_DEPRECATED */
/*
*----------------------------------------------------------------------
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index 2eb2259..8945e0b 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -368,6 +368,8 @@ static int uniCharNcasecmp(const Tcl_UniChar *ucs, const Tcl_UniChar *uct, unsig
# 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
diff --git a/unix/dltest/Makefile.in b/unix/dltest/Makefile.in
index 25b9376..500bf97 100644
--- a/unix/dltest/Makefile.in
+++ b/unix/dltest/Makefile.in
@@ -17,7 +17,7 @@ TCL_VERSION= @TCL_VERSION@
CFLAGS_DEBUG = @CFLAGS_DEBUG@
CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@
-CFLAGS = @CFLAGS_DEFAULT@ @CFLAGS@
+CFLAGS = @CFLAGS_DEFAULT@ @CFLAGS@ -DTCL_NO_DEPRECATED=1
LDFLAGS_DEBUG = @LDFLAGS_DEBUG@
LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@
LDFLAGS = @LDFLAGS_DEFAULT@ @LDFLAGS@