summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixFile.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2023-05-01 13:22:24 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2023-05-01 13:22:24 (GMT)
commit530e4b3bb9e1b9acd0231c4da1a29d73180a20d5 (patch)
treed32275c10833e1cca203e0c05f52340d30682262 /unix/tclUnixFile.c
parent528b7b71686a0bb1993b1cce1166b5b70d511d31 (diff)
parent6c4b78cfa8c06ea5963591778902da74850d1985 (diff)
downloadtcl-530e4b3bb9e1b9acd0231c4da1a29d73180a20d5.zip
tcl-530e4b3bb9e1b9acd0231c4da1a29d73180a20d5.tar.gz
tcl-530e4b3bb9e1b9acd0231c4da1a29d73180a20d5.tar.bz2
Merge 8.7
Diffstat (limited to 'unix/tclUnixFile.c')
-rw-r--r--unix/tclUnixFile.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c
index d1b656b..aecdb3b 100644
--- a/unix/tclUnixFile.c
+++ b/unix/tclUnixFile.c
@@ -39,8 +39,7 @@ void
TclpFindExecutable(
TCL_UNUSED(const char *) /*argv0*/)
{
- Tcl_Encoding encoding;
- int length;
+ size_t length;
wchar_t buf[PATH_MAX] = L"";
char name[PATH_MAX * 3 + 1];
@@ -51,9 +50,8 @@ TclpFindExecutable(
/* Strip '.exe' part. */
length -= 4;
}
- encoding = Tcl_GetEncoding(NULL, NULL);
TclSetObjNameOfExecutable(
- Tcl_NewStringObj(name, length), encoding);
+ Tcl_NewStringObj(name, length), NULL);
}
#else
void
@@ -703,7 +701,7 @@ TclpObjLstat(
* is either the given clientData, if the working directory hasn't
* changed, or a new clientData (owned by our caller), giving the new
* native path, or NULL if the current directory could not be determined.
- * If NULL is returned, the caller can examine the standard posix error
+ * If NULL is returned, the caller can examine the standard Posix error
* codes to determine the cause of the problem.
*
* Side effects:
@@ -997,7 +995,7 @@ TclpObjLink(
}
Tcl_ExternalToUtfDString(NULL, link, length, &ds);
- linkPtr = TclDStringToObj(&ds);
+ linkPtr = Tcl_DStringToObj(&ds);
Tcl_IncrRefCount(linkPtr);
return linkPtr;
}
@@ -1062,7 +1060,7 @@ TclpNativeToNormalized(
Tcl_DString ds;
Tcl_ExternalToUtfDString(NULL, (const char *) clientData, TCL_INDEX_NONE, &ds);
- return TclDStringToObj(&ds);
+ return Tcl_DStringToObj(&ds);
}
/*