diff options
author | dgp <dgp@noemail.net> | 2013-02-28 17:08:43 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2013-02-28 17:08:43 (GMT) |
commit | 07beb82019ebeac6a3dc06b0e0f23b68fa61095a (patch) | |
tree | 5194f377c644e8dde41bf11a2b5f0c7387f1e569 /generic/tclProc.c | |
parent | 1bdc24853e6ed01c7957381d90d1e8144c1935d4 (diff) | |
download | tcl-07beb82019ebeac6a3dc06b0e0f23b68fa61095a.zip tcl-07beb82019ebeac6a3dc06b0e0f23b68fa61095a.tar.gz tcl-07beb82019ebeac6a3dc06b0e0f23b68fa61095a.tar.bz2 |
Revise TclReleaseLiteral() to tolerate a NULL interp argument.
Update callers and revise mistaken comments.
FossilOrigin-Name: c192ffaad6dca25481431d83c7f0501027694979
Diffstat (limited to 'generic/tclProc.c')
-rw-r--r-- | generic/tclProc.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/generic/tclProc.c b/generic/tclProc.c index e66b8ea..13f6f8a 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -1347,17 +1347,9 @@ TclFreeLocalCache( for (i = 0; i < localCachePtr->numVars; i++, namePtrPtr++) { register Tcl_Obj *objPtr = *namePtrPtr; - /* - * Note that this can be called with interp==NULL, on interp deletion. - * In that case, the literal table and objects go away on their own. - */ - if (objPtr) { - if (interp) { - TclReleaseLiteral(interp, objPtr); - } else { - Tcl_DecrRefCount(objPtr); - } + /* TclReleaseLiteral calls Tcl_DecrRefCount for us */ + TclReleaseLiteral(interp, objPtr); } } ckfree(localCachePtr); |