summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclDisassemble.c2
-rw-r--r--generic/tclExecute.c4
-rw-r--r--generic/tclHash.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/generic/tclDisassemble.c b/generic/tclDisassemble.c
index 6f463ca..4a61f69 100644
--- a/generic/tclDisassemble.c
+++ b/generic/tclDisassemble.c
@@ -296,7 +296,7 @@ DisassembleByteCodeObj(
Tcl_AppendPrintfToObj(bufferObj,
" Code %lu = header %lu+inst %d+litObj %lu+exc %lu+aux %lu+cmdMap %d\n",
(unsigned long) codePtr->structureSize,
- (unsigned long) (sizeof(ByteCode) - sizeof(size_t) - sizeof(Tcl_Time)),
+ (unsigned long) (TclOffset(ByteCode, localCachePtr)),
codePtr->numCodeBytes,
(unsigned long) (codePtr->numLitObjects * sizeof(Tcl_Obj *)),
(unsigned long) (codePtr->numExceptRanges*sizeof(ExceptionRange)),
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 25b9409..a16334a 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -9629,7 +9629,7 @@ PrintByteCodeInfo(
#ifdef TCL_COMPILE_STATS
fprintf(stdout, " Code %lu = header %lu+inst %d+litObj %lu+exc %lu+aux %lu+cmdMap %d\n",
(unsigned long) codePtr->structureSize,
- (unsigned long) (sizeof(ByteCode)-sizeof(size_t)-sizeof(Tcl_Time)),
+ (unsigned long) (TclOffset(ByteCode, localCachePtr)),
codePtr->numCodeBytes,
(unsigned long) (codePtr->numLitObjects * sizeof(Tcl_Obj *)),
(unsigned long) (codePtr->numExceptRanges*sizeof(ExceptionRange)),
@@ -10272,7 +10272,7 @@ EvalStatsCmd(
numCurrentByteCodes =
statsPtr->numCompilations - statsPtr->numByteCodesFreed;
currentHeaderBytes = numCurrentByteCodes
- * (sizeof(ByteCode) - sizeof(size_t) - sizeof(Tcl_Time));
+ * (TclOffset(ByteCode, localCachePtr));
literalMgmtBytes = sizeof(LiteralTable)
+ (iPtr->literalTable.numBuckets * sizeof(LiteralEntry *))
+ (iPtr->literalTable.numEntries * sizeof(LiteralEntry));
diff --git a/generic/tclHash.c b/generic/tclHash.c
index 5de8168..709831d 100644
--- a/generic/tclHash.c
+++ b/generic/tclHash.c
@@ -722,7 +722,7 @@ AllocArrayEntry(
count = tablePtr->keyType;
- size = sizeof(Tcl_HashEntry) + (count*sizeof(int)) - sizeof(hPtr->key);
+ size = TclOffset(Tcl_HashEntry, key) + count*sizeof(int);
if (size < sizeof(Tcl_HashEntry)) {
size = sizeof(Tcl_HashEntry);
}
@@ -839,7 +839,7 @@ AllocStringEntry(
allocsize = sizeof(hPtr->key);
}
hPtr = ckalloc(TclOffset(Tcl_HashEntry, key) + allocsize);
- memset(hPtr, 0, sizeof(Tcl_HashEntry) + allocsize - sizeof(hPtr->key));
+ memset(hPtr, 0, TclOffset(Tcl_HashEntry, key) + allocsize);
memcpy(hPtr->key.string, string, size);
hPtr->clientData = 0;
return hPtr;