diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | generic/tclCompile.h | 13 |
2 files changed, 14 insertions, 5 deletions
@@ -1,3 +1,9 @@ +2002-06-28 Miguel Sofer <msofer@users.sourceforge.net> + + * generic/tclCompile.h: modified the macro TclEmitPush to not + call its first argument repeatedly or pass it to other macros, + [Bug 575194] reported by Peter Spjuth. + 2002-06-28 Don Porter <dgp@users.sourceforge.net> * docs/tcltest.n: Doc revisions in progress. diff --git a/generic/tclCompile.h b/generic/tclCompile.h index 8a04dac..d76d405 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.h,v 1.27 2002/05/30 15:03:57 msofer Exp $ + * RCS: @(#) $Id: tclCompile.h,v 1.28 2002/06/28 21:24:19 msofer Exp $ */ #ifndef _TCLCOMPILATION @@ -932,10 +932,13 @@ EXTERN void TclVerifyLocalLiteralTable _ANSI_ARGS_(( */ #define TclEmitPush(objIndex, envPtr) \ - if ((objIndex) <= 255) { \ - TclEmitInstInt1(INST_PUSH1, (objIndex), (envPtr)); \ - } else { \ - TclEmitInstInt4(INST_PUSH4, (objIndex), (envPtr)); \ + {\ + register int objIndexCopy = (objIndex);\ + if (objIndexCopy <= 255) { \ + TclEmitInstInt1(INST_PUSH1, objIndexCopy, (envPtr)); \ + } else { \ + TclEmitInstInt4(INST_PUSH4, objIndexCopy, (envPtr)); \ + }\ } /* |