From: SourceForge.net <no...@so...> - 2010-08-16 14:49:03
|
Patches item #2994165, was opened at 2010-04-29 09:18 Message generated for change (Comment added) made by dgp You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=310894&aid=2994165&group_id=10894 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 37. File System Group: None >Status: Closed >Resolution: Accepted Priority: 9 Private: No Submitted By: Jan Nijtmans (nijtmans) Assigned to: Don Porter (dgp) Summary: Signature of Tcl_FSGetNativePath and TclpDeleteFile Initial Comment: Most file system API functions which have a native path as parameter, use a "void *" for that. But there are two exceptions, which result in the need of extra (unneccessary) type casts. This patch changes the parameter type from "char *" to "void *", and adds the necessary machinery to keep source and binary compatibility. Currently, the documentation for Tcl_FSGetNativePath mentions: This function is a convenience -wrapper around \fBTcl_FSGetInternalRep\fR, and assumes the native-representation is string-based The effect of this patch is that the mentioned assumption is relaxed. The patch contains the doc update as well. Tested on Linux and win32 (MSVC 6.0/mingw/CYGWIN) Adreas, Kevin, any remarks? ---------------------------------------------------------------------- >Comment By: Don Porter (dgp) Date: 2010-08-16 10:49 Message: The change you've made with this patch looks good to me. It takes some effort to see that because the change is near a lot of confusion and messiness in the Tcl_Filesystem. We have two ways to get a driver-specific rep for a filesystem path: Tcl_FSGetNativePath() Tcl_FSGetInternalRep() and we have one way to set Tcl_FSNewNativePath() By the names, you would think that GetNativePath and NewNativePath were a corresponding pair, but in fact it is NewNativePath and GetInterpRep that go together and offer the way to interact with the "native" or "internal" rep used by any Tcl_Filesystem at all. Tcl_FSGetNativePath is the oddball, specialized convenience interface useful only for the one Tcl_Filesystem declared to be "native" in the current app. Since it's out on its own, this patch is a good change, and one apparently suggested in the docs for some time. If GetNativePath actually were a pair with NewNativePath, I would insist they agree and operated on ClientData. It takes some effort to see that is not the case. Anyhow, I think this patch is good for Tcl 8.6. Thanks! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=310894&aid=2994165&group_id=10894 |