diff options
Diffstat (limited to 'win/tclWinFile.c')
| -rw-r--r-- | win/tclWinFile.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c index 7ff8b9b..3910f3d 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -913,7 +913,8 @@ TclpMatchInDirectory( DWORD attr; WIN32_FILE_ATTRIBUTE_DATA data; - const char *str = TclGetString(norm); + size_t length; + const char *str = TclGetStringFromObj(norm, &length); native = Tcl_FSGetNativePath(pathPtr); @@ -923,7 +924,7 @@ TclpMatchInDirectory( } attr = data.dwFileAttributes; - if (NativeMatchType(WinIsDrive(str,norm->length), attr, native, types)) { + if (NativeMatchType(WinIsDrive(str, length), attr, native, types)) { Tcl_ListObjAppendElement(interp, resultPtr, pathPtr); } } @@ -2733,12 +2734,13 @@ TclpObjNormalizePath( char *path; Tcl_Obj *tmpPathPtr; + size_t length; tmpPathPtr = Tcl_NewStringObj(Tcl_DStringValue(&ds), nextCheckpoint); Tcl_AppendToObj(tmpPathPtr, lastValidPathEnd, -1); - path = TclGetString(tmpPathPtr); - Tcl_SetStringObj(pathPtr, path, tmpPathPtr->length); + path = TclGetStringFromObj(tmpPathPtr, &length); + Tcl_SetStringObj(pathPtr, path, length); Tcl_DecrRefCount(tmpPathPtr); } else { /* |
