diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-09-11 13:59:11 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-09-11 13:59:11 (GMT) |
commit | 779b664e54a9f926fbbd56866693099fe4ee2639 (patch) | |
tree | 7d42bedc6175159f531c8a8e0ff73b1618a40e70 /generic/tclExecute.c | |
parent | 524b1d9fb207987cf66ca92d5198e30e27e0931e (diff) | |
parent | 6e44927248852ae0356d9d3e1cfa3d69597a66b1 (diff) | |
download | tcl-779b664e54a9f926fbbd56866693099fe4ee2639.zip tcl-779b664e54a9f926fbbd56866693099fe4ee2639.tar.gz tcl-779b664e54a9f926fbbd56866693099fe4ee2639.tar.bz2 |
Merge 8.6
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r-- | generic/tclExecute.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 786fffb..47c0618 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -855,8 +855,8 @@ TclCreateExecEnv( * [sizeof(Tcl_Obj*)] */ { ExecEnv *eePtr = (ExecEnv *)ckalloc(sizeof(ExecEnv)); - ExecStack *esPtr = (ExecStack *)ckalloc(sizeof(ExecStack) - + (size_t) (size-1) * sizeof(Tcl_Obj *)); + ExecStack *esPtr = (ExecStack *)ckalloc(offsetof(ExecStack, stackWords) + + size * sizeof(Tcl_Obj *)); eePtr->execStackPtr = esPtr; TclNewIntObj(eePtr->constants[0], 0); @@ -1121,7 +1121,7 @@ GrowEvaluationStack( newElems = needed; #endif - newBytes = sizeof(ExecStack) + (newElems-1) * sizeof(Tcl_Obj *); + newBytes = offsetof(ExecStack, stackWords) + newElems * sizeof(Tcl_Obj *); oldPtr = esPtr; esPtr = (ExecStack *)ckalloc(newBytes); @@ -4529,7 +4529,7 @@ TEBCresume( origCmd = TclGetOriginalCommand(cmd); if (origCmd == NULL) { origCmd = cmd; - } + } TclNewObj(objResultPtr); Tcl_GetCommandFullName(interp, origCmd, objResultPtr); |