diff options
author | dgp <dgp@users.sourceforge.net> | 2017-12-15 16:50:50 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2017-12-15 16:50:50 (GMT) |
commit | f93a191f9bd9b2626751e8c2b374b194bae325fd (patch) | |
tree | cbf232910656e5ba9ce6703d5220f37299f28760 | |
parent | 82b3f1c765d0b39ca8605e589abfb59f2894bb08 (diff) | |
download | tcl-f93a191f9bd9b2626751e8c2b374b194bae325fd.zip tcl-f93a191f9bd9b2626751e8c2b374b194bae325fd.tar.gz tcl-f93a191f9bd9b2626751e8c2b374b194bae325fd.tar.bz2 |
Revert the (int -> size_t) transition of the "cmdEpoch" field of
the struct Command that was part of [ff3f6a12a8d099ef], and related changes.
This change broke the ability of Itcl 3.4 built against Tcl 8.6 headers
to successfully [load] into and operate in a Tcl 8.7 interp.
"Command" is a private struct, and Itcl 3 should have respected that, but
it has not, and changing the size of the cmdEpoch field broke the ability
of Itcl 3 to operate on later fields of the struct, notably the deleteProc,
which it makes extensive use of.
I believe we should keep the change in the Tcl 9 sources.
-rw-r--r-- | generic/tclBasic.c | 2 | ||||
-rw-r--r-- | generic/tclInt.h | 2 | ||||
-rw-r--r-- | generic/tclObj.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 406d0b1..292b466 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -4789,7 +4789,7 @@ TEOV_RunEnterTraces( { Interp *iPtr = (Interp *) interp; Command *cmdPtr = *cmdPtrPtr; - size_t newEpoch, cmdEpoch = cmdPtr->cmdEpoch; + int newEpoch, cmdEpoch = cmdPtr->cmdEpoch; int length, traceCode = TCL_OK; const char *command = TclGetStringFromObj(commandPtr, &length); diff --git a/generic/tclInt.h b/generic/tclInt.h index ad1d9c6..49d88aa 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -1639,7 +1639,7 @@ typedef struct Command { * representing a command's name in a ByteCode * instruction sequence. This structure can be * freed when refCount becomes zero. */ - size_t cmdEpoch; /* Incremented to invalidate any references + int cmdEpoch; /* Incremented to invalidate any references * that point to this command when it is * renamed, deleted, hidden, or exposed. */ CompileProc *compileProc; /* Procedure called to compile command. NULL diff --git a/generic/tclObj.c b/generic/tclObj.c index 1a00011..1aa24f2 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -354,7 +354,7 @@ typedef struct ResolvedCmdName { * Before using the cached pointer, we check * if the namespace's epoch was incremented; * if so, this cached pointer is invalid. */ - size_t cmdEpoch; /* Value of the command's cmdEpoch when this + int cmdEpoch; /* Value of the command's cmdEpoch when this * pointer was cached. Before using the cached * pointer, we check if the cmd's epoch was * incremented; if so, the cmd was renamed, |