diff options
| author | limeboy <that.lemon+tcl@gmai.com> | 2016-12-01 12:01:01 (GMT) |
|---|---|---|
| committer | limeboy <that.lemon+tcl@gmai.com> | 2016-12-01 12:01:01 (GMT) |
| commit | 13a4d32330a2ec5af486c1fa5fb09338da3af8db (patch) | |
| tree | 1e6552b81641a26b22b300e273614e060baa35e8 /win/tclWinFCmd.c | |
| parent | 8fe50e3f91ec232823ba032f24dabbaa7c9f298c (diff) | |
| parent | c25e21b7bb6584947734fd9dd77a29c66ba1a0fe (diff) | |
| download | tcl-13a4d32330a2ec5af486c1fa5fb09338da3af8db.zip tcl-13a4d32330a2ec5af486c1fa5fb09338da3af8db.tar.gz tcl-13a4d32330a2ec5af486c1fa5fb09338da3af8db.tar.bz2 | |
merge trunk
Diffstat (limited to 'win/tclWinFCmd.c')
| -rw-r--r-- | win/tclWinFCmd.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c index 8904a05..01af950 100644 --- a/win/tclWinFCmd.c +++ b/win/tclWinFCmd.c @@ -1525,8 +1525,8 @@ GetWinFileAttributes( * We test for, and fix that case, here. */ - int len; - const char *str = TclGetStringFromObj(fileName,&len); + const char *str = TclGetString(fileName); + size_t len = fileName->length; if (len < 4) { if (len == 0) { @@ -1611,11 +1611,12 @@ ConvertFileNameFormat( for (i = 0; i < pathc; i++) { Tcl_Obj *elt; char *pathv; - int pathLen; + size_t pathLen; Tcl_ListObjIndex(NULL, splitPath, i, &elt); - pathv = TclGetStringFromObj(elt, &pathLen); + pathv = TclGetString(elt); + pathLen = elt->length; if ((pathv[0] == '/') || ((pathLen == 3) && (pathv[1] == ':')) || (strcmp(pathv, ".") == 0) || (strcmp(pathv, "..") == 0)) { /* @@ -1639,7 +1640,6 @@ ConvertFileNameFormat( Tcl_DString dsTemp; const TCHAR *nativeName; const char *tempString; - int tempLen; WIN32_FIND_DATA data; HANDLE handle; DWORD attr; @@ -1653,8 +1653,8 @@ ConvertFileNameFormat( */ Tcl_DStringInit(&ds); - tempString = TclGetStringFromObj(tempPath,&tempLen); - nativeName = Tcl_WinUtfToTChar(tempString, tempLen, &ds); + tempString = TclGetString(tempPath); + nativeName = Tcl_WinUtfToTChar(tempString, tempPath->length, &ds); Tcl_DecrRefCount(tempPath); handle = FindFirstFile(nativeName, &data); if (handle == INVALID_HANDLE_VALUE) { |
