summaryrefslogtreecommitdiffstats
path: root/generic/tclObj.c
diff options
context:
space:
mode:
authorstanton <stanton>1999-04-28 17:06:06 (GMT)
committerstanton <stanton>1999-04-28 17:06:06 (GMT)
commita12837eeef8ecf52959c787988f8a45eb8baf704 (patch)
tree856e7536adf9af9ca2fbd629f5843a04f50f9e00 /generic/tclObj.c
parent5bec7274093b637944fb3f2d53d71901734f877f (diff)
downloadtcl-a12837eeef8ecf52959c787988f8a45eb8baf704.zip
tcl-a12837eeef8ecf52959c787988f8a45eb8baf704.tar.gz
tcl-a12837eeef8ecf52959c787988f8a45eb8baf704.tar.bz2
* mac/tclMacResource.c:
* generic/tclListObj.c: * generic/tclObj.c: * generic/tclStringObj.c: Changed to avoid freeing the string representation before freeing the internal rep. This helps with debugging since the string rep will still be valid when the free proc is invoked.
Diffstat (limited to 'generic/tclObj.c')
-rw-r--r--generic/tclObj.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/generic/tclObj.c b/generic/tclObj.c
index c4895ee..d44b520 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclObj.c,v 1.5 1999/04/16 00:46:50 stanton Exp $
+ * RCS: @(#) $Id: tclObj.c,v 1.6 1999/04/28 17:06:06 stanton Exp $
*/
#include "tclInt.h"
@@ -926,13 +926,13 @@ Tcl_SetBooleanObj(objPtr, boolValue)
panic("Tcl_SetBooleanObj called with shared object");
}
- Tcl_InvalidateStringRep(objPtr);
if ((oldTypePtr != NULL) && (oldTypePtr->freeIntRepProc != NULL)) {
oldTypePtr->freeIntRepProc(objPtr);
}
objPtr->internalRep.longValue = (boolValue? 1 : 0);
objPtr->typePtr = &tclBooleanType;
+ Tcl_InvalidateStringRep(objPtr);
}
/*
@@ -1284,13 +1284,13 @@ Tcl_SetDoubleObj(objPtr, dblValue)
panic("Tcl_SetDoubleObj called with shared object");
}
- Tcl_InvalidateStringRep(objPtr);
if ((oldTypePtr != NULL) && (oldTypePtr->freeIntRepProc != NULL)) {
oldTypePtr->freeIntRepProc(objPtr);
}
objPtr->internalRep.doubleValue = dblValue;
objPtr->typePtr = &tclDoubleType;
+ Tcl_InvalidateStringRep(objPtr);
}
/*
@@ -1552,13 +1552,13 @@ Tcl_SetIntObj(objPtr, intValue)
panic("Tcl_SetIntObj called with shared object");
}
- Tcl_InvalidateStringRep(objPtr);
if ((oldTypePtr != NULL) && (oldTypePtr->freeIntRepProc != NULL)) {
oldTypePtr->freeIntRepProc(objPtr);
}
objPtr->internalRep.longValue = (long) intValue;
objPtr->typePtr = &tclIntType;
+ Tcl_InvalidateStringRep(objPtr);
}
/*
@@ -1917,13 +1917,13 @@ Tcl_SetLongObj(objPtr, longValue)
panic("Tcl_SetLongObj called with shared object");
}
- Tcl_InvalidateStringRep(objPtr);
if ((oldTypePtr != NULL) && (oldTypePtr->freeIntRepProc != NULL)) {
oldTypePtr->freeIntRepProc(objPtr);
}
objPtr->internalRep.longValue = longValue;
objPtr->typePtr = &tclIntType;
+ Tcl_InvalidateStringRep(objPtr);
}
/*