summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-01-31 09:42:20 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-01-31 09:42:20 (GMT)
commit31f3f5ff6333217316c5da442a0194085211dfe1 (patch)
tree2be8d4d05d8f21d613366b08b11fd4acff5fde4b /generic/tclExecute.c
parentf385174158496b543825ede31d40b25de7196e51 (diff)
downloadtcl-31f3f5ff6333217316c5da442a0194085211dfe1.zip
tcl-31f3f5ff6333217316c5da442a0194085211dfe1.tar.gz
tcl-31f3f5ff6333217316c5da442a0194085211dfe1.tar.bz2
Use twoPtrValue.ptr1 in stead of otherValuePtr everywhere. This is exactly the same field, but it allows twoPtrValue.ptr2 to be used for other purposes.
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 229d7c6..2db98da 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -1200,7 +1200,7 @@ Tcl_ExprObj(
if (objPtr->typePtr == &exprCodeType) {
Namespace *namespacePtr = iPtr->varFramePtr->nsPtr;
- codePtr = (ByteCode *) objPtr->internalRep.otherValuePtr;
+ codePtr = (ByteCode *) objPtr->internalRep.twoPtrValue.ptr1;
if (((Interp *) *codePtr->interpHandle != iPtr)
|| (codePtr->compileEpoch != iPtr->compileEpoch)
|| (codePtr->nsPtr != namespacePtr)
@@ -1240,7 +1240,7 @@ Tcl_ExprObj(
TclInitByteCodeObj(objPtr, &compEnv);
objPtr->typePtr = &exprCodeType;
TclFreeCompileEnv(&compEnv);
- codePtr = (ByteCode *) objPtr->internalRep.otherValuePtr;
+ codePtr = (ByteCode *) objPtr->internalRep.twoPtrValue.ptr1;
#ifdef TCL_COMPILE_DEBUG
if (tclTraceCompile == 2) {
TclPrintByteCodeObj(interp, objPtr);
@@ -1338,14 +1338,13 @@ static void
FreeExprCodeInternalRep(
Tcl_Obj *objPtr)
{
- ByteCode *codePtr = (ByteCode *) objPtr->internalRep.otherValuePtr;
+ ByteCode *codePtr = (ByteCode *) objPtr->internalRep.twoPtrValue.ptr1;
codePtr->refCount--;
if (codePtr->refCount <= 0) {
TclCleanupByteCode(codePtr);
}
objPtr->typePtr = NULL;
- objPtr->internalRep.otherValuePtr = NULL;
}
/*
@@ -1418,7 +1417,7 @@ TclCompEvalObj(
* here.
*/
- codePtr = (ByteCode *) objPtr->internalRep.otherValuePtr;
+ codePtr = (ByteCode *) objPtr->internalRep.twoPtrValue.ptr1;
if (((Interp *) *codePtr->interpHandle != iPtr)
|| (codePtr->compileEpoch != iPtr->compileEpoch)
|| (codePtr->nsPtr != namespacePtr)
@@ -1557,7 +1556,7 @@ TclCompEvalObj(
iPtr->invokeWord = word;
tclByteCodeType.setFromAnyProc(interp, objPtr);
iPtr->invokeCmdFramePtr = NULL;
- codePtr = (ByteCode *) objPtr->internalRep.otherValuePtr;
+ codePtr = (ByteCode *) objPtr->internalRep.twoPtrValue.ptr1;
goto runCompiledObj;
done: