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)
commitda4f0a3cc9ce8134a629c12ce02572e0ee69bb3b (patch)
tree6ca06be4a2c871912e4d135a868e6ec1a96e9081 /generic/tclEnsemble.c
parent7332635af1609ad38fa7021022dd79996b75144c (diff)
parent39488ce3ef11fcbac48bd3c7e35b3ba3fb80c2de (diff)
downloadtcl-da4f0a3cc9ce8134a629c12ce02572e0ee69bb3b.zip
tcl-da4f0a3cc9ce8134a629c12ce02572e0ee69bb3b.tar.gz
tcl-da4f0a3cc9ce8134a629c12ce02572e0ee69bb3b.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);