From c755d23a508df80984dc1755ea1c96af87f27425 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 27 Mar 2017 13:01:34 +0000 Subject: Improve comment on TCL_WIDE_INT_IS_LONG, making it less misleading. In tclThreadTest.c, allow mainThreadId to be >32 bits. --- generic/tcl.h | 4 ++-- generic/tclThreadTest.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/generic/tcl.h b/generic/tcl.h index 64c7d14..759f824 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -372,8 +372,8 @@ typedef long LONG; * we have one, we can have the other.) * * Also defines the following macros: - * TCL_WIDE_INT_IS_LONG - if wide ints are really longs (i.e. we're on a real - * 64-bit system.) + * TCL_WIDE_INT_IS_LONG - if wide ints are really longs (i.e. we're on a + * LP64 system such as modern Solaris or Linux ... not including Win64) * Tcl_WideAsLong - forgetful converter from wideInt to long. * Tcl_LongAsWide - sign-extending converter from long to wideInt. * Tcl_WideAsDouble - converter from wideInt to double. diff --git a/generic/tclThreadTest.c b/generic/tclThreadTest.c index 9c66313..fcf3880 100644 --- a/generic/tclThreadTest.c +++ b/generic/tclThreadTest.c @@ -341,7 +341,7 @@ ThreadObjCmd( } else if (objc == 3 && strcmp("-main", Tcl_GetString(objv[2])) == 0) { Tcl_MutexLock(&threadMutex); - idObj = Tcl_NewLongObj((long)(size_t)mainThreadId); + idObj = Tcl_NewWideIntObj((Tcl_WideInt)(size_t)mainThreadId); Tcl_MutexUnlock(&threadMutex); } else { Tcl_WrongNumArgs(interp, 2, objv, NULL); -- cgit v0.12