diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2023-05-24 16:02:24 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2023-05-24 16:02:24 (GMT) |
commit | 29225e440c7dfc3b4fb54d8bb5a8b32fd9604d6f (patch) | |
tree | 76a21d1b72f69d7f7218eb0332f9d2afbed472d5 /unix/tclUnixFile.c | |
parent | 4a3c559932945a74fed481561274ceedc4afe555 (diff) | |
parent | 70a3d08fc4eb639c20c5613ea5952a0dfdd5e935 (diff) | |
download | tcl-29225e440c7dfc3b4fb54d8bb5a8b32fd9604d6f.zip tcl-29225e440c7dfc3b4fb54d8bb5a8b32fd9604d6f.tar.gz tcl-29225e440c7dfc3b4fb54d8bb5a8b32fd9604d6f.tar.bz2 |
merge core-8-branch
Diffstat (limited to 'unix/tclUnixFile.c')
-rw-r--r-- | unix/tclUnixFile.c | 12 |
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); } /* |