summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-02-22 18:24:24 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-02-22 18:24:24 (GMT)
commit35f12d416bc726f52f9114843e157ca9f85407ce (patch)
tree935677d44f873076a302681e82099d884f265e9a /generic
parent5752e55c3fe28ff4844c8bdae2aca996c3abcb12 (diff)
downloadtcl-35f12d416bc726f52f9114843e157ca9f85407ce.zip
tcl-35f12d416bc726f52f9114843e157ca9f85407ce.tar.gz
tcl-35f12d416bc726f52f9114843e157ca9f85407ce.tar.bz2
Use iPtr field instead of source field to mark a CompileEnv as uninitialized.
envPtr->source == NULL can actually be valid (at least when merging forward).
Diffstat (limited to 'generic')
-rw-r--r--generic/tclCompile.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index d27c9b6..41ee45b 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -922,7 +922,7 @@ void
TclFreeCompileEnv(envPtr)
register CompileEnv *envPtr; /* Points to the CompileEnv structure. */
{
- if (envPtr->source) {
+ if (envPtr->iPtr) {
/*
* We never converted to Bytecode, so free the things we would
* have transferred to it.
@@ -1089,7 +1089,7 @@ TclCompileScript(interp, script, numBytes, nested, envPtr)
int* clNext;
#endif
- if (envPtr->source == NULL) {
+ if (envPtr->iPtr == NULL) {
Tcl_Panic("TclCompileScript() called on uninitialized CompileEnv");
}
@@ -1996,7 +1996,7 @@ TclInitByteCodeObj(objPtr, envPtr)
#endif
Interp *iPtr;
- if (envPtr->source == NULL) {
+ if (envPtr->iPtr == NULL) {
Tcl_Panic("TclInitByteCodeObj() called on uninitialized CompileEnv");
}
@@ -2121,7 +2121,7 @@ TclInitByteCodeObj(objPtr, envPtr)
#endif
/* We've used up the CompileEnv. Mark as uninitialized. */
- envPtr->source = NULL;
+ envPtr->iPtr = NULL;
}
/*