diff options
author | dgp <dgp@users.sourceforge.net> | 2016-05-12 19:44:41 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2016-05-12 19:44:41 (GMT) |
commit | f5ebd5a3cc1ef2c91382d3954be94bee505858c8 (patch) | |
tree | 7bc0224bd4f222488318563448a6335aa9000005 /generic/tclEnsemble.c | |
parent | a1f0c2b5d2b3cfff326458d9a6f5f40168c01eb3 (diff) | |
download | tcl-f5ebd5a3cc1ef2c91382d3954be94bee505858c8.zip tcl-f5ebd5a3cc1ef2c91382d3954be94bee505858c8.tar.gz tcl-f5ebd5a3cc1ef2c91382d3954be94bee505858c8.tar.bz2 |
Remove the nsPtr field from the EnsembleCmdRep struct. Cannot see any
justification for keeping it (can get via token), and test suite doesn't care.
Diffstat (limited to 'generic/tclEnsemble.c')
-rw-r--r-- | generic/tclEnsemble.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/generic/tclEnsemble.c b/generic/tclEnsemble.c index 986a553..ecf10ff 100644 --- a/generic/tclEnsemble.c +++ b/generic/tclEnsemble.c @@ -1707,8 +1707,7 @@ NsEnsembleImplementationCmdNR( EnsembleCmdRep *ensembleCmd = objv[1+ensemblePtr->numParameters] ->internalRep.twoPtrValue.ptr1; - if (ensembleCmd->nsPtr == ensemblePtr->nsPtr && - ensembleCmd->epoch == ensemblePtr->epoch && + if (ensembleCmd->epoch == ensemblePtr->epoch && ensembleCmd->token == ensemblePtr->token) { prefixObj = ensembleCmd->realPrefixObj; Tcl_IncrRefCount(prefixObj); @@ -2227,7 +2226,6 @@ MakeCachedEnsembleCommand( if (objPtr->typePtr == &tclEnsembleCmdType) { ensembleCmd = objPtr->internalRep.twoPtrValue.ptr1; Tcl_DecrRefCount(ensembleCmd->realPrefixObj); - TclNsDecrRefCount(ensembleCmd->nsPtr); ckfree(ensembleCmd->fullSubcmdName); } else { /* @@ -2245,10 +2243,8 @@ MakeCachedEnsembleCommand( * Populate the internal rep. */ - ensembleCmd->nsPtr = ensemblePtr->nsPtr; ensembleCmd->epoch = ensemblePtr->epoch; ensembleCmd->token = ensemblePtr->token; - ensemblePtr->nsPtr->refCount++; ensembleCmd->realPrefixObj = prefixObjPtr; length = strlen(subcommandName)+1; ensembleCmd->fullSubcmdName = ckalloc(length); @@ -2636,7 +2632,6 @@ FreeEnsembleCmdRep( Tcl_DecrRefCount(ensembleCmd->realPrefixObj); ckfree(ensembleCmd->fullSubcmdName); - TclNsDecrRefCount(ensembleCmd->nsPtr); ckfree(ensembleCmd); objPtr->typePtr = NULL; } @@ -2670,10 +2665,8 @@ DupEnsembleCmdRep( copyPtr->typePtr = &tclEnsembleCmdType; copyPtr->internalRep.twoPtrValue.ptr1 = ensembleCopy; - ensembleCopy->nsPtr = ensembleCmd->nsPtr; ensembleCopy->epoch = ensembleCmd->epoch; ensembleCopy->token = ensembleCmd->token; - ensembleCopy->nsPtr->refCount++; ensembleCopy->realPrefixObj = ensembleCmd->realPrefixObj; Tcl_IncrRefCount(ensembleCopy->realPrefixObj); ensembleCopy->fullSubcmdName = ckalloc(length + 1); |