summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tclCompile.c6
-rw-r--r--generic/tclExecute.c10
-rw-r--r--generic/tclIOSock.c8
3 files changed, 16 insertions, 8 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index 4584d78..519bf01 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -11,7 +11,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.c,v 1.187.2.1 2010/09/27 20:33:37 kennykb Exp $
+ * RCS: @(#) $Id: tclCompile.c,v 1.187.2.2 2010/10/09 17:53:16 kennykb Exp $
*/
#include "tclInt.h"
@@ -1050,12 +1050,12 @@ FreeSubstCodeInternalRep(
{
register ByteCode *codePtr = objPtr->internalRep.ptrAndLongRep.ptr;
+ objPtr->typePtr = NULL;
+ objPtr->internalRep.otherValuePtr = NULL;
codePtr->refCount--;
if (codePtr->refCount <= 0) {
TclCleanupByteCode(codePtr);
}
- objPtr->typePtr = NULL;
- objPtr->internalRep.otherValuePtr = NULL;
}
/*
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 3f7c420..65bd9a2 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -14,7 +14,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.494.2.5 2010/10/02 16:04:29 kennykb Exp $
+ * RCS: @(#) $Id: tclExecute.c,v 1.494.2.6 2010/10/09 17:53:16 kennykb Exp $
*/
#include "tclInt.h"
@@ -1883,6 +1883,10 @@ TclNRExecuteByteCode(
{
Interp *iPtr = (Interp *) interp;
BottomData *BP;
+ int size = sizeof(BottomData) + sizeof(CmdFrame) +
+ + (codePtr->maxStackDepth + codePtr->maxExceptDepth)
+ *(sizeof(Tcl_Obj *));
+ int numWords = (size + sizeof(Tcl_Obj *) - 1)/sizeof(Tcl_Obj *);
if (iPtr->execEnvPtr->rewind) {
return TCL_ERROR;
@@ -1902,9 +1906,7 @@ TclNRExecuteByteCode(
* execution stack is large enough to execute this ByteCode.
*/
- BP = (BottomData *) GrowEvaluationStack(iPtr->execEnvPtr,
- sizeof(BottomData) + codePtr->maxExceptDepth + sizeof(CmdFrame)
- + codePtr->maxStackDepth, 0);
+ BP = (BottomData *) GrowEvaluationStack(iPtr->execEnvPtr, numWords, 0);
esPtr->tosPtr = initTosPtr;
BP->codePtr = codePtr;
diff --git a/generic/tclIOSock.c b/generic/tclIOSock.c
index 8ae2dcf..451357d 100644
--- a/generic/tclIOSock.c
+++ b/generic/tclIOSock.c
@@ -8,10 +8,16 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIOSock.c,v 1.11.10.1 2010/09/28 15:43:01 kennykb Exp $
+ * RCS: @(#) $Id: tclIOSock.c,v 1.11.10.2 2010/10/09 17:53:17 kennykb Exp $
*/
#include "tclInt.h"
+
+#if defined(_WIN32) && defined(UNICODE)
+/* On Windows, we always need the ASCII version. */
+# undef gai_strerror
+# define gai_strerror gai_strerrorA
+#endif
/*
*---------------------------------------------------------------------------