diff options
| author | donal.k.fellows@manchester.ac.uk <dkf> | 2004-09-29 22:17:28 (GMT) |
|---|---|---|
| committer | donal.k.fellows@manchester.ac.uk <dkf> | 2004-09-29 22:17:28 (GMT) |
| commit | 6cd42534eb8e9ab72ca598391f20a89ee91256c7 (patch) | |
| tree | 9a574faca8ab395bddcb8ebbfcba24f070a7296a /generic/tclUtil.c | |
| parent | 5168f3edd958f497f7c6d23b5d6e0ddf377bf31f (diff) | |
| download | tcl-6cd42534eb8e9ab72ca598391f20a89ee91256c7.zip tcl-6cd42534eb8e9ab72ca598391f20a89ee91256c7.tar.gz tcl-6cd42534eb8e9ab72ca598391f20a89ee91256c7.tar.bz2 | |
Factorize out the code for freeing an object's internal rep.
Diffstat (limited to 'generic/tclUtil.c')
| -rw-r--r-- | generic/tclUtil.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 41a4f0c..819f3b5 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUtil.c,v 1.45 2004/06/18 20:38:01 dgp Exp $ + * RCS: @(#) $Id: tclUtil.c,v 1.46 2004/09/29 22:17:29 dkf Exp $ */ #include "tclInt.h" @@ -2410,8 +2410,6 @@ SetEndOffsetFromAny(interp, objPtr) Tcl_Obj* objPtr; /* Pointer to the object to parse */ { int offset; /* Offset in the "end-offset" expression */ - Tcl_ObjType* oldTypePtr = objPtr->typePtr; - /* Old internal rep type of the object */ register char* bytes; /* String rep of the object */ int length; /* Length of the object's string rep */ @@ -2468,10 +2466,7 @@ SetEndOffsetFromAny(interp, objPtr) * the new one. */ - if ((oldTypePtr != NULL) && (oldTypePtr->freeIntRepProc != NULL)) { - oldTypePtr->freeIntRepProc(objPtr); - } - + TclFreeIntRep(objPtr); objPtr->internalRep.longValue = offset; objPtr->typePtr = &tclEndOffsetType; |
