summaryrefslogtreecommitdiffstats
path: root/generic/tclIndexObj.c
diff options
context:
space:
mode:
authordkf <dkf@noemail.net>2004-09-29 22:17:28 (GMT)
committerdkf <dkf@noemail.net>2004-09-29 22:17:28 (GMT)
commitbbf1859c2109914c8c8996e42ca15f3fe8dd1e7c (patch)
tree9a574faca8ab395bddcb8ebbfcba24f070a7296a /generic/tclIndexObj.c
parent1405e9f5d850039284d754b3c812ef29325195c4 (diff)
downloadtcl-bbf1859c2109914c8c8996e42ca15f3fe8dd1e7c.zip
tcl-bbf1859c2109914c8c8996e42ca15f3fe8dd1e7c.tar.gz
tcl-bbf1859c2109914c8c8996e42ca15f3fe8dd1e7c.tar.bz2
Factorize out the code for freeing an object's internal rep.
FossilOrigin-Name: 3890ad3c7cc28ec3186310138831cfc0b3d207fc
Diffstat (limited to 'generic/tclIndexObj.c')
-rw-r--r--generic/tclIndexObj.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c
index ce1a07e..f752a91 100644
--- a/generic/tclIndexObj.c
+++ b/generic/tclIndexObj.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIndexObj.c,v 1.18 2004/04/06 22:25:53 dgp Exp $
+ * RCS: @(#) $Id: tclIndexObj.c,v 1.19 2004/09/29 22:17:31 dkf Exp $
*/
#include "tclInt.h"
@@ -249,10 +249,7 @@ Tcl_GetIndexFromObjStruct(interp, objPtr, tablePtr, offset, msg, flags,
if (objPtr->typePtr == &tclIndexType) {
indexRep = (IndexRep *) objPtr->internalRep.otherValuePtr;
} else {
- if ((objPtr->typePtr != NULL)
- && (objPtr->typePtr->freeIntRepProc != NULL)) {
- objPtr->typePtr->freeIntRepProc(objPtr);
- }
+ TclFreeIntRep(objPtr);
indexRep = (IndexRep *) ckalloc(sizeof(IndexRep));
objPtr->internalRep.otherValuePtr = (VOID *) indexRep;
objPtr->typePtr = &tclIndexType;