summaryrefslogtreecommitdiffstats
path: root/generic/tclTest.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2012-04-18 18:42:54 (GMT)
committerdgp <dgp@users.sourceforge.net>2012-04-18 18:42:54 (GMT)
commit88574b7bc539d00b6477f8d9bbe7f25158b57662 (patch)
tree4399ca38b73edfafc667956c4bb05e731d0dc862 /generic/tclTest.c
parente5ced1c96d6213766cd6263eddcab12ba1a916a9 (diff)
downloadtcl-88574b7bc539d00b6477f8d9bbe7f25158b57662.zip
tcl-88574b7bc539d00b6477f8d9bbe7f25158b57662.tar.gz
tcl-88574b7bc539d00b6477f8d9bbe7f25158b57662.tar.bz2
Experimental branch where the interp->result field and related are removed
and all simplifications that makes possible are done. Seems this can at best be a Tcl 9 reform.
Diffstat (limited to 'generic/tclTest.c')
-rw-r--r--generic/tclTest.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/generic/tclTest.c b/generic/tclTest.c
index 37ec751..1a189c7 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -120,12 +120,14 @@ typedef struct TclEncoding {
char *fromUtfCmd;
} TclEncoding;
+#if 0
/*
* The counter below is used to determine if the TestsaveresultFree routine
* was called for a result.
*/
static int freeCount;
+#endif
/*
* Boolean flag used by the "testsetmainloop" and "testexitmainloop" commands.
@@ -5063,7 +5065,9 @@ TestsaveresultCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
+#if 0
Interp* iPtr = (Interp*) interp;
+#endif
int discard, result, index;
Tcl_SavedResult state;
Tcl_Obj *objPtr;
@@ -5114,7 +5118,9 @@ TestsaveresultCmd(
break;
}
+#if 0
freeCount = 0;
+#endif
Tcl_SaveResult(interp, &state);
if (((enum options) index) == RESULT_OBJECT) {
@@ -5132,11 +5138,16 @@ TestsaveresultCmd(
switch ((enum options) index) {
case RESULT_DYNAMIC: {
+#if 0
int present = iPtr->freeProc == TestsaveresultFree;
int called = freeCount;
Tcl_AppendElement(interp, called ? "called" : "notCalled");
Tcl_AppendElement(interp, present ? "present" : "missing");
+#else
+ Tcl_AppendElement(interp, discard ? "called" : "notCalled");
+ Tcl_AppendElement(interp, !discard ? "present" : "missing");
+#endif
break;
}
case RESULT_OBJECT:
@@ -5169,7 +5180,9 @@ static void
TestsaveresultFree(
char *blockPtr)
{
+#if 0
freeCount++;
+#endif
}
/*