summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2011-08-16 09:18:06 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2011-08-16 09:18:06 (GMT)
commit1fb25505b732b94f74aae7edc392508bdd8a30fa (patch)
tree6d0803a80ce796b40f3601e4c6da7b561ad57f30 /generic
parent860e6b5e43e0ac7e673218dd929d425c5d206014 (diff)
parent1be9bc0869341de7806f25de58a35e8320b42ee5 (diff)
downloadtcl-1fb25505b732b94f74aae7edc392508bdd8a30fa.zip
tcl-1fb25505b732b94f74aae7edc392508bdd8a30fa.tar.gz
tcl-1fb25505b732b94f74aae7edc392508bdd8a30fa.tar.bz2
merge current trunk
Diffstat (limited to 'generic')
-rw-r--r--generic/tclBasic.c4
-rw-r--r--generic/tclPathObj.c24
-rw-r--r--generic/tclPosixStr.c4
-rw-r--r--generic/tclZlib.c2
4 files changed, 19 insertions, 15 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 124f932..f0f0c0f 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -1529,6 +1529,10 @@ DeleteInterpProc(
if (iPtr->execEnvPtr != NULL) {
TclDeleteExecEnv(iPtr->execEnvPtr);
}
+ if (iPtr->scriptFile) {
+ Tcl_DecrRefCount(iPtr->scriptFile);
+ iPtr->scriptFile = NULL;
+ }
Tcl_DecrRefCount(iPtr->emptyObjPtr);
iPtr->emptyObjPtr = NULL;
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c
index d9e3973..205c301 100644
--- a/generic/tclPathObj.c
+++ b/generic/tclPathObj.c
@@ -2617,29 +2617,29 @@ DupFsPathInternalRep(
SETPATHOBJ(copyPtr, copyFsPathPtr);
- if (srcFsPathPtr->translatedPathPtr != NULL) {
+ if (srcFsPathPtr->translatedPathPtr == srcPtr) {
+ /* Cycle in src -> make cycle in copy. */
+ copyFsPathPtr->translatedPathPtr = copyPtr;
+ } else {
copyFsPathPtr->translatedPathPtr = srcFsPathPtr->translatedPathPtr;
- if (copyFsPathPtr->translatedPathPtr != copyPtr) {
+ if (copyFsPathPtr->translatedPathPtr != NULL) {
Tcl_IncrRefCount(copyFsPathPtr->translatedPathPtr);
}
- } else {
- copyFsPathPtr->translatedPathPtr = NULL;
}
- if (srcFsPathPtr->normPathPtr != NULL) {
+ if (srcFsPathPtr->normPathPtr == srcPtr) {
+ /* Cycle in src -> make cycle in copy. */
+ copyFsPathPtr->normPathPtr = copyPtr;
+ } else {
copyFsPathPtr->normPathPtr = srcFsPathPtr->normPathPtr;
- if (copyFsPathPtr->normPathPtr != copyPtr) {
+ if (copyFsPathPtr->normPathPtr != NULL) {
Tcl_IncrRefCount(copyFsPathPtr->normPathPtr);
}
- } else {
- copyFsPathPtr->normPathPtr = NULL;
}
- if (srcFsPathPtr->cwdPtr != NULL) {
- copyFsPathPtr->cwdPtr = srcFsPathPtr->cwdPtr;
+ copyFsPathPtr->cwdPtr = srcFsPathPtr->cwdPtr;
+ if (copyFsPathPtr->cwdPtr != NULL) {
Tcl_IncrRefCount(copyFsPathPtr->cwdPtr);
- } else {
- copyFsPathPtr->cwdPtr = NULL;
}
copyFsPathPtr->flags = srcFsPathPtr->flags;
diff --git a/generic/tclPosixStr.c b/generic/tclPosixStr.c
index d0002ec..411eb27 100644
--- a/generic/tclPosixStr.c
+++ b/generic/tclPosixStr.c
@@ -35,7 +35,7 @@ const char *
Tcl_ErrnoId(void)
{
switch (errno) {
-#ifdef E2BIG
+#if defined(E2BIG) && (!defined(EOVERFLOW) || (E2BIG != EOVERFLOW))
case E2BIG: return "E2BIG";
#endif
#ifdef EACCES
@@ -494,7 +494,7 @@ Tcl_ErrnoMsg(
int err) /* Error number (such as in errno variable). */
{
switch (err) {
-#ifdef E2BIG
+#if defined(E2BIG) && (!defined(EOVERFLOW) || (E2BIG != EOVERFLOW))
case E2BIG: return "argument list too long";
#endif
#ifdef EACCES
diff --git a/generic/tclZlib.c b/generic/tclZlib.c
index be91365..81012dc 100644
--- a/generic/tclZlib.c
+++ b/generic/tclZlib.c
@@ -2460,7 +2460,7 @@ ZlibTransformOutput(
return -1;
}
- return toWrite - cd->outStream.avail_out;
+ return toWrite - cd->outStream.avail_in;
}
static int