diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2004-10-22 13:48:40 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2004-10-22 13:48:40 (GMT) |
commit | 6b698fdbdeb2c71d4e27829e834036824d3cd5bd (patch) | |
tree | 61a8bec7ef0f2af23551560436d8292a83f0e87e | |
parent | 37d7c1ccf17d7e32d084c88f510f7639514a7676 (diff) | |
download | tcl-6b698fdbdeb2c71d4e27829e834036824d3cd5bd.zip tcl-6b698fdbdeb2c71d4e27829e834036824d3cd5bd.tar.gz tcl-6b698fdbdeb2c71d4e27829e834036824d3cd5bd.tar.bz2 |
Standardize way of calling object freeIntRepProcs...
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | generic/tclExecute.c | 6 | ||||
-rw-r--r-- | generic/tclProc.c | 30 |
3 files changed, 24 insertions, 18 deletions
@@ -1,3 +1,9 @@ +2004-10-22 Donal K. Fellows <donal.k.fellows@man.ac.uk> + + * generic/tclExecute.c (TclCompEvalObj, Tcl_ExprObj): + * generic/tclProc.c (TclProcCompileProc): Always call object + freeIntRepProc's in the same way. + 2004-10-22 Miguel Sofer <msofer@users.sf.net> * generic/tclVar.c: fixed bug in commit of 2004-07-23, which was diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 4268a3e..7aa187f 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.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: tclExecute.c,v 1.158 2004/10/18 21:15:38 dgp Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.159 2004/10/22 13:48:56 dkf Exp $ */ #ifdef STDC_HEADERS @@ -758,7 +758,7 @@ Tcl_ExprObj(interp, objPtr, resultPtrPtr) } codePtr->compileEpoch = iPtr->compileEpoch; } else { - (*tclByteCodeType.freeIntRepProc)(objPtr); + objPtr->typePtr->freeIntRepProc(objPtr); objPtr->typePtr = (Tcl_ObjType *) NULL; } } @@ -971,7 +971,7 @@ TclCompEvalObj(interp, objPtr) /* * This byteCode is invalid: free it and recompile */ - tclByteCodeType.freeIntRepProc(objPtr); + objPtr->typePtr->freeIntRepProc(objPtr); goto recompileObj; } } diff --git a/generic/tclProc.c b/generic/tclProc.c index 9ce8706..d35ba32 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.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: tclProc.c,v 1.62 2004/10/18 21:15:42 dgp Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.63 2004/10/22 13:48:58 dkf Exp $ */ #include "tclInt.h" @@ -1182,20 +1182,20 @@ TclProcCompileProc(interp, procPtr, bodyPtr, nsPtr, description, procName) if (bodyPtr->typePtr == &tclByteCodeType) { if (((Interp *) *codePtr->interpHandle != iPtr) - || (codePtr->compileEpoch != iPtr->compileEpoch) - || (codePtr->nsPtr != nsPtr)) { - if (codePtr->flags & TCL_BYTECODE_PRECOMPILED) { - if ((Interp *) *codePtr->interpHandle != iPtr) { - Tcl_AppendResult(interp, - "a precompiled script jumped interps", NULL); - return TCL_ERROR; - } - codePtr->compileEpoch = iPtr->compileEpoch; - codePtr->nsPtr = nsPtr; - } else { - (*tclByteCodeType.freeIntRepProc)(bodyPtr); - bodyPtr->typePtr = (Tcl_ObjType *) NULL; - } + || (codePtr->compileEpoch != iPtr->compileEpoch) + || (codePtr->nsPtr != nsPtr)) { + if (codePtr->flags & TCL_BYTECODE_PRECOMPILED) { + if ((Interp *) *codePtr->interpHandle != iPtr) { + Tcl_AppendResult(interp, + "a precompiled script jumped interps", NULL); + return TCL_ERROR; + } + codePtr->compileEpoch = iPtr->compileEpoch; + codePtr->nsPtr = nsPtr; + } else { + bodyPtr->typePtr->freeIntRepProc(bodyPtr); + bodyPtr->typePtr = (Tcl_ObjType *) NULL; + } } } if (bodyPtr->typePtr != &tclByteCodeType) { |