diff options
author | dgp <dgp@users.sourceforge.net> | 2007-06-20 18:46:05 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2007-06-20 18:46:05 (GMT) |
commit | 990150fd25c8206ca25d424fafbdfd2b81199d1f (patch) | |
tree | 3d231361d50bc42a020d3f65eefb68a5951da2ae /generic/tclNamesp.c | |
parent | 03e71e94a6bfa74deaf5a629ba1b72353f17bfc7 (diff) | |
download | tcl-990150fd25c8206ca25d424fafbdfd2b81199d1f.zip tcl-990150fd25c8206ca25d424fafbdfd2b81199d1f.tar.gz tcl-990150fd25c8206ca25d424fafbdfd2b81199d1f.tar.bz2 |
* generic/tclInt.decls: Revised the interfaces of the routines
* generic/tclExecute.c: TclStackAlloc and TclStackFree to make them
easier for callers to use (or more precisely, harder to misuse).
TclStackFree now takes a (void *) argument which is the pointer
intended to be freed. TclStackFree will panic if that's not actually
the memory the call will free. TSA/TSF also now tolerate receiving
(interp == NULL), in which case they simply fall back to be calls to
Tcl_Alloc/Tcl_Free.
* generic/tclIntDecls.h: make genstubs
* generic/tclBasic.c: Updated callers
* generic/tclCmdAH.c:
* generic/tclCmdIL.c:
* generic/tclCompCmds.c:
* generic/tclCompExpr.c:
* generic/tclCompile.c:
* generic/tclFCmd.c:
* generic/tclFileName.c:
* generic/tclIOCmd.c:
* generic/tclIndexObj.c:
* generic/tclInterp.c:
* generic/tclNamesp.c:
* generic/tclProc.c:
* generic/tclTrace.c:
* unix/tclUnixPipe.c:
Diffstat (limited to 'generic/tclNamesp.c')
-rw-r--r-- | generic/tclNamesp.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index ba64680..1fa1967 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -22,7 +22,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.139 2007/06/12 12:29:06 dkf Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.140 2007/06/20 18:46:13 dgp Exp $ */ #include "tclInt.h" @@ -533,8 +533,10 @@ void TclPopStackFrame( Tcl_Interp *interp) /* Interpreter with call frame to pop. */ { + Tcl_CallFrame *freePtr = ((Interp *)interp)->framePtr; + Tcl_PopCallFrame(interp); - TclStackFree(interp); + TclStackFree(interp, freePtr); } /* @@ -4119,7 +4121,7 @@ NamespacePathCmd( result = TCL_OK; badNamespace: if (namespaceList != NULL) { - TclStackFree(interp); /* namespaceList */ + TclStackFree(interp, namespaceList); } return result; } @@ -6196,7 +6198,7 @@ NsEnsembleImplementationCmd( TCL_EVAL_INVOKE); Tcl_DecrRefCount(copyObj); Tcl_DecrRefCount(prefixObj); - TclStackFree(interp); + TclStackFree(interp, tempObjv); if (isRootEnsemble) { iPtr->ensembleRewrite.sourceObjs = NULL; iPtr->ensembleRewrite.numRemovedObjs = 0; |