Posted to tcl by dgp at Tue Oct 05 19:12:00 GMT 2010view pretty

Index: generic/tclCompile.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclCompile.c,v
retrieving revision 1.188
diff -u -r1.188 tclCompile.c
--- generic/tclCompile.c        27 Sep 2010 19:42:38 -0000      1.188
+++ generic/tclCompile.c        5 Oct 2010 19:04:45 -0000
@@ -715,11 +715,11 @@
     register ByteCode *codePtr = objPtr->internalRep.otherValuePtr;

     codePtr->refCount--;
+    objPtr->typePtr = NULL;
+    objPtr->internalRep.otherValuePtr = NULL;
     if (codePtr->refCount <= 0) {
        TclCleanupByteCode(codePtr);
     }
-    objPtr->typePtr = NULL;
-    objPtr->internalRep.otherValuePtr = NULL;
 }


 /*
@@ -1863,7 +1863,11 @@
      */

     if (envPtr->codeNext == entryCodeNext) {
+#if 0
        TclEmitPush(TclAddLiteralObj(envPtr, Tcl_NewObj(), NULL), envPtr);
+#else
+       TclEmitPush(TclRegisterNewLiteral(envPtr, "", 0), envPtr);
+#endif
     }

     envPtr->numSrcBytes = p - script;