summaryrefslogtreecommitdiffstats
path: root/generic/tclEnsemble.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2016-07-09 15:47:28 (GMT)
committerdgp <dgp@users.sourceforge.net>2016-07-09 15:47:28 (GMT)
commit77e9a375ff3089711d1b2d25da3d190afc639e1e (patch)
tree6ca06be4a2c871912e4d135a868e6ec1a96e9081 /generic/tclEnsemble.c
parentd8785b835887dc0c3e6669537d6afbc4389b2153 (diff)
parent25f7d3b86e41d2ba566960340642bb816ecfd7e8 (diff)
downloadtcl-77e9a375ff3089711d1b2d25da3d190afc639e1e.zip
tcl-77e9a375ff3089711d1b2d25da3d190afc639e1e.tar.gz
tcl-77e9a375ff3089711d1b2d25da3d190afc639e1e.tar.bz2
merge 8.6
Diffstat (limited to 'generic/tclEnsemble.c')
-rw-r--r--generic/tclEnsemble.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/generic/tclEnsemble.c b/generic/tclEnsemble.c
index d5d896a..2766769 100644
--- a/generic/tclEnsemble.c
+++ b/generic/tclEnsemble.c
@@ -95,7 +95,7 @@ typedef struct {
int epoch; /* Used to confirm when the data in this
* really structure matches up with the
* ensemble. */
- Tcl_Command token; /* Reference to the comamnd for which this
+ Command *token; /* Reference to the command for which this
* structure is a cache of the resolution. */
Tcl_Obj *fix; /* Corrected spelling, if needed. */
Tcl_HashEntry *hPtr; /* Direct link to entry in the subcommand
@@ -1722,7 +1722,7 @@ NsEnsembleImplementationCmdNR(
EnsembleCmdRep *ensembleCmd = subObj->internalRep.twoPtrValue.ptr1;
if (ensembleCmd->epoch == ensemblePtr->epoch &&
- ensembleCmd->token == ensemblePtr->token) {
+ ensembleCmd->token == (Command *)ensemblePtr->token) {
prefixObj = Tcl_GetHashValue(ensembleCmd->hPtr);
Tcl_IncrRefCount(prefixObj);
if (ensembleCmd->fix) {
@@ -2348,6 +2348,7 @@ MakeCachedEnsembleCommand(
if (objPtr->typePtr == &ensembleCmdType) {
ensembleCmd = objPtr->internalRep.twoPtrValue.ptr1;
+ TclCleanupCommandMacro(ensembleCmd->token);
if (ensembleCmd->fix) {
Tcl_DecrRefCount(ensembleCmd->fix);
}
@@ -2368,7 +2369,8 @@ MakeCachedEnsembleCommand(
*/
ensembleCmd->epoch = ensemblePtr->epoch;
- ensembleCmd->token = ensemblePtr->token;
+ ensembleCmd->token = (Command *) ensemblePtr->token;
+ ensembleCmd->token->refCount++;
if (fix) {
Tcl_IncrRefCount(fix);
}
@@ -2754,6 +2756,7 @@ FreeEnsembleCmdRep(
{
EnsembleCmdRep *ensembleCmd = objPtr->internalRep.twoPtrValue.ptr1;
+ TclCleanupCommandMacro(ensembleCmd->token);
if (ensembleCmd->fix) {
Tcl_DecrRefCount(ensembleCmd->fix);
}
@@ -2791,6 +2794,7 @@ DupEnsembleCmdRep(
copyPtr->internalRep.twoPtrValue.ptr1 = ensembleCopy;
ensembleCopy->epoch = ensembleCmd->epoch;
ensembleCopy->token = ensembleCmd->token;
+ ensembleCopy->token->refCount++;
ensembleCopy->fix = ensembleCmd->fix;
if (ensembleCopy->fix) {
Tcl_IncrRefCount(ensembleCopy->fix);