diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-07-02 08:17:50 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-07-02 08:17:50 (GMT) |
commit | 4cd9155ae918a63f1c940a9557bf9ab4afd4a333 (patch) | |
tree | 9b1ff6ff3db457ec452f61ebcb38c942c259dc7d /generic/tclNamesp.c | |
parent | 0918bf8c7b999500650bd3294ab8d257975247bd (diff) | |
download | tcl-4cd9155ae918a63f1c940a9557bf9ab4afd4a333.zip tcl-4cd9155ae918a63f1c940a9557bf9ab4afd4a333.tar.gz tcl-4cd9155ae918a63f1c940a9557bf9ab4afd4a333.tar.bz2 |
Another round of refCount consistancy improvements.
Diffstat (limited to 'generic/tclNamesp.c')
-rw-r--r-- | generic/tclNamesp.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index 8f2f10e..3231ce6 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -343,7 +343,7 @@ Tcl_PushCallFrame( framePtr->clientData = NULL; framePtr->localCachePtr = NULL; framePtr->tailcallPtr = NULL; - + /* * Push the new call frame onto the interpreter's stack of procedure call * frames making it the current frame. @@ -402,7 +402,7 @@ Tcl_PopCallFrame( } if (framePtr->numCompiledLocals > 0) { TclDeleteCompiledLocalVars(iPtr, framePtr); - if (--framePtr->localCachePtr->refCount == 0) { + if (framePtr->localCachePtr->refCount-- <= 1) { TclFreeLocalCache(interp, framePtr->localCachePtr); } framePtr->localCachePtr = NULL; @@ -3056,7 +3056,7 @@ NamespaceCodeCmd( */ arg = TclGetStringFromObj(objv[1], &length); - if (*arg==':' && length > 20 + if (*arg==':' && length > 20 && strncmp(arg, "::namespace inscope ", 20) == 0) { Tcl_SetObjResult(interp, objv[1]); return TCL_OK; @@ -4929,7 +4929,7 @@ TclLogCommandInfo( if (Tcl_IsShared(iPtr->errorStack)) { Tcl_Obj *newObj; - + newObj = Tcl_DuplicateObj(iPtr->errorStack); Tcl_DecrRefCount(iPtr->errorStack); Tcl_IncrRefCount(newObj); @@ -4961,7 +4961,7 @@ TclLogCommandInfo( Tcl_ListObjAppendElement(NULL, iPtr->errorStack, Tcl_NewStringObj(command, length)); } - } + } if (!iPtr->framePtr->objc) { /* @@ -5014,7 +5014,7 @@ TclErrorStackResetIf( if (Tcl_IsShared(iPtr->errorStack)) { Tcl_Obj *newObj; - + newObj = Tcl_DuplicateObj(iPtr->errorStack); Tcl_DecrRefCount(iPtr->errorStack); Tcl_IncrRefCount(newObj); @@ -5034,7 +5034,7 @@ TclErrorStackResetIf( Tcl_ListObjAppendElement(NULL, iPtr->errorStack, iPtr->innerLiteral); Tcl_ListObjAppendElement(NULL, iPtr->errorStack, Tcl_NewStringObj(msg, length)); - } + } } /* |