diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2011-03-16 15:55:49 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2011-03-16 15:55:49 (GMT) |
commit | 47ac20ba07df34632f15eb72eadfa99745d2e87a (patch) | |
tree | a935e08de5c1086143197a3ad9825e952d5750b8 /generic | |
parent | 8d79e513f2a47f71a8ab54990e5f907bc379e6c5 (diff) | |
parent | 1f5f6de21bf647360a9f73bfb4dfce60c25c6312 (diff) | |
download | tcl-47ac20ba07df34632f15eb72eadfa99745d2e87a.zip tcl-47ac20ba07df34632f15eb72eadfa99745d2e87a.tar.gz tcl-47ac20ba07df34632f15eb72eadfa99745d2e87a.tar.bz2 |
[Bug #3197864] pointer truncation on Win64 TCL_MEM_DEBUG builds
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclCkalloc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclCkalloc.c b/generic/tclCkalloc.c index 32fd84d..9d63ebf 100644 --- a/generic/tclCkalloc.c +++ b/generic/tclCkalloc.c @@ -81,7 +81,7 @@ static struct mem_header *allocHead = NULL; /* List of allocated structures */ */ #define BODY_OFFSET \ - ((unsigned long) (&((struct mem_header *) 0)->body)) + ((size_t) (&((struct mem_header *) 0)->body)) static int total_mallocs = 0; static int total_frees = 0; @@ -595,7 +595,7 @@ Tcl_DbCkfree( * words on these machines). */ - memp = (struct mem_header *) (((unsigned long) ptr) - BODY_OFFSET); + memp = (struct mem_header *) (((size_t) ptr) - BODY_OFFSET); if (alloc_tracing) { fprintf(stderr, "ckfree %lx %ld %s %d\n", @@ -672,7 +672,7 @@ Tcl_DbCkrealloc( * See comment from Tcl_DbCkfree before you change the following line. */ - memp = (struct mem_header *) (((unsigned long) ptr) - BODY_OFFSET); + memp = (struct mem_header *) (((size_t) ptr) - BODY_OFFSET); copySize = size; if (copySize > (unsigned int) memp->length) { @@ -703,7 +703,7 @@ Tcl_AttemptDbCkrealloc( * See comment from Tcl_DbCkfree before you change the following line. */ - memp = (struct mem_header *) (((unsigned long) ptr) - BODY_OFFSET); + memp = (struct mem_header *) (((size_t) ptr) - BODY_OFFSET); copySize = size; if (copySize > (unsigned int) memp->length) { |