diff options
author | ferrieux <ferrieux@users.sourceforge.net> | 2014-08-19 20:35:16 (GMT) |
---|---|---|
committer | ferrieux <ferrieux@users.sourceforge.net> | 2014-08-19 20:35:16 (GMT) |
commit | 22bb3f2bf92e4ea63f1c85a09e106235943b27eb (patch) | |
tree | fa7afec2d6205add53768a2c61fe601cd240d39c /generic | |
parent | f56a79a4ead94c1a0bb1338f91eff356d141124c (diff) | |
parent | 1c058969f08127a16e91339f83fc824493ac28cb (diff) | |
download | tcl-22bb3f2bf92e4ea63f1c85a09e106235943b27eb.zip tcl-22bb3f2bf92e4ea63f1c85a09e106235943b27eb.tar.gz tcl-22bb3f2bf92e4ea63f1c85a09e106235943b27eb.tar.bz2 |
merge trunktip_429
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclIO.c | 12 | ||||
-rw-r--r-- | generic/tclOO.c | 1 |
2 files changed, 11 insertions, 2 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c index c142917..66c0be6 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -9048,7 +9048,8 @@ MBWrite( ChannelState *outStatePtr = csPtr->writePtr->state; ChannelBuffer *bufPtr = inStatePtr->inQueueHead; ChannelBuffer *tail = NULL; - int code, inBytes = 0; + int code; + Tcl_WideInt inBytes = 0; /* Count up number of bytes waiting in the input queue */ while (bufPtr) { @@ -9063,7 +9064,14 @@ MBWrite( if (bufPtr) { /* Split the overflowing buffer in two */ - int extra = inBytes - csPtr->toRead; + int extra = (int) (inBytes - csPtr->toRead); + /* Note that going with int for extra assumes that inBytes is not too + * much over toRead to require a wide itself. If that gets violated + * then the calculations involving extra must be made wide too. + * + * Noted with Win32/MSVC debug build treating the warning (possible of + * data in int64 to int conversion) as error. + */ bufPtr = AllocChannelBuffer(extra); diff --git a/generic/tclOO.c b/generic/tclOO.c index 02e00c9..ace47fe 100644 --- a/generic/tclOO.c +++ b/generic/tclOO.c @@ -394,6 +394,7 @@ InitFoundation( fPtr->classCls->flags |= ROOT_CLASS; TclOOAddToInstances(fPtr->objectCls->thisPtr, fPtr->classCls); TclOOAddToInstances(fPtr->classCls->thisPtr, fPtr->classCls); + TclOOAddToSubclasses(fPtr->classCls, fPtr->objectCls); AddRef(fPtr->objectCls->thisPtr); AddRef(fPtr->objectCls); |