diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | generic/tclExecute.c | 4 |
2 files changed, 10 insertions, 2 deletions
@@ -1,5 +1,13 @@ 2007-04-18 Miguel Sofer <msofer@users.sf.net> + * generic/tclExecute.c (INST_LSHIFT): fixed a mistake introduced + in version 1.266 ('=' became '=='), which effectively turned the + block that handles native shifts into dead code. This explains why + the testsuite did not pick this mistake. Rewrote to make the + intention clear. + +2007-04-18 Miguel Sofer <msofer@users.sf.net> + * generic/tclInt.h (TclDecrRefCount): change the order of the branches, use empty 'if ; else' to handle use in unbraced outer if/else conditions (as already done in tcl.h) diff --git a/generic/tclExecute.c b/generic/tclExecute.c index ebb5f49..abe70ad 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.279 2007/04/18 21:00:42 msofer Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.280 2007/04/19 01:39:13 msofer Exp $ */ #include "tclInt.h" @@ -4265,7 +4265,7 @@ TclExecuteByteCode( TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); if ((type1 == TCL_NUMBER_LONG) && (size_t) shift < CHAR_BIT*sizeof(long) - && l1 == *(const long *)ptr1 + && ((l1 = *(const long *)ptr1) != 0) && !((l1>0 ? l1 : ~l1) & -(1L<<(CHAR_BIT*sizeof(long) - 1 - shift)))) { TclNewLongObj(objResultPtr, (l1<<shift)); |