diff options
| author | kjnash <k.j.nash@usa.net> | 2022-08-31 16:19:00 (GMT) |
|---|---|---|
| committer | kjnash <k.j.nash@usa.net> | 2022-08-31 16:19:00 (GMT) |
| commit | bca70ca3acaed162e49bc7616b7da4001c7fee41 (patch) | |
| tree | e7f53f796bd576d7231fed8db0aa533ae65f59b6 /generic/tclIOUtil.c | |
| parent | 7e2bd5e5052a3fa8f5ee01c05e56fadf4cdfc592 (diff) | |
| parent | 6cf74d1492b68e11b5a4cccf559ec5f69836b67b (diff) | |
| download | tcl-bca70ca3acaed162e49bc7616b7da4001c7fee41.zip tcl-bca70ca3acaed162e49bc7616b7da4001c7fee41.tar.gz tcl-bca70ca3acaed162e49bc7616b7da4001c7fee41.tar.bz2 | |
Merge 8.7
Diffstat (limited to 'generic/tclIOUtil.c')
| -rw-r--r-- | generic/tclIOUtil.c | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index 698b614..ae6bc56 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -1065,7 +1065,7 @@ Tcl_FSMatchInDirectory( * resultPtr and tmpResultPtr are guaranteed to be distinct. */ - ret = Tcl_ListObjGetElements(interp, tmpResultPtr, + ret = TclListObjGetElementsM(interp, tmpResultPtr, &resLength, &elemsPtr); for (i=0 ; ret==TCL_OK && i<resLength ; i++) { ret = Tcl_ListObjAppendElement(interp, resultPtr, @@ -1113,10 +1113,10 @@ FsAddMountsToGlobResult( return; } - if (Tcl_ListObjLength(NULL, mounts, &mLength) != TCL_OK || mLength == 0) { + if (TclListObjLengthM(NULL, mounts, &mLength) != TCL_OK || mLength == 0) { goto endOfMounts; } - if (Tcl_ListObjLength(NULL, resultPtr, &gLength) != TCL_OK) { + if (TclListObjLengthM(NULL, resultPtr, &gLength) != TCL_OK) { goto endOfMounts; } for (i=0 ; i<mLength ; i++) { @@ -2476,7 +2476,7 @@ TclFSFileAttrIndex( int i, objc; Tcl_Obj **objv; - if (Tcl_ListObjGetElements(NULL, listObj, &objc, &objv) != TCL_OK) { + if (TclListObjGetElementsM(NULL, listObj, &objc, &objv) != TCL_OK) { TclDecrRefCount(listObj); return TCL_ERROR; } @@ -2646,8 +2646,9 @@ Tcl_FSGetCwd( norm = TclFSNormalizeAbsolutePath(interp,retVal); if (norm != NULL) { /* - * Assign to global storage the pathname of the current directory - * and copy it into thread-local storage as well. + * Assign to global storage the pathname of the current + * directory and copy it into thread-local storage as + * well. * * At system startup multiple threads could in principle * call this function simultaneously, which is a little @@ -3789,10 +3790,12 @@ Tcl_FSListVolumes(void) if (thisFsVolumes != NULL) { Tcl_ListObjAppendList(NULL, resultPtr, thisFsVolumes); - /* The refCount of each list returned by a `listVolumesProc` is - * already incremented. Do not hang onto the list, though. It - * belongs to the filesystem. Add its contents to * the result - * we are building, and then decrement the refCount. */ + /* + * The refCount of each list returned by a `listVolumesProc` + * is already incremented. Do not hang onto the list, though. + * It belongs to the filesystem. Add its contents to the + * result we are building, and then decrement the refCount. + */ Tcl_DecrRefCount(thisFsVolumes); } } @@ -3868,6 +3871,7 @@ FsListMounts( *--------------------------------------------------------------------------- */ +#undef Tcl_FSSplitPath Tcl_Obj * Tcl_FSSplitPath( Tcl_Obj *pathPtr, /* The pathname to split. */ @@ -3946,7 +3950,7 @@ Tcl_FSSplitPath( } if (lenPtr != NULL) { - TclListObjLength(NULL, result, lenPtr); + TclListObjLengthM(NULL, result, lenPtr); } return result; } @@ -4069,7 +4073,7 @@ TclFSNonnativePathType( Tcl_Obj *thisFsVolumes = fsRecPtr->fsPtr->listVolumesProc(); if (thisFsVolumes != NULL) { - if (Tcl_ListObjLength(NULL, thisFsVolumes, &numVolumes) + if (TclListObjLengthM(NULL, thisFsVolumes, &numVolumes) != TCL_OK) { /* * This is VERY bad; the listVolumesProc didn't return a @@ -4365,15 +4369,14 @@ Tcl_FSCreateDirectory( int Tcl_FSCopyDirectory( - Tcl_Obj *srcPathPtr, /* - * The pathname of the directory to be copied. - */ + Tcl_Obj *srcPathPtr, /* The pathname of the directory to be + * copied. */ Tcl_Obj *destPathPtr, /* The pathname of the target directory. */ Tcl_Obj **errorPtr) /* If not NULL, and there is an error, a place - * to store a pointer to a new object, with - * its refCount already incremented, and - * containing the pathname name of file - * causing the error. */ + * to store a pointer to a new object, with + * its refCount already incremented, and + * containing the pathname name of file + * causing the error. */ { int retVal = -1; const Tcl_Filesystem *fsPtr, *fsPtr2; |
