You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Charles Acknin <ch...@gmail.com> on 2007/07/27 21:47:56 UTC

[PATCH] ensure open mode of svn_io_open_unique_file2() is clearly defined

I bumped into svn_io_open_unique_file2()'s docstring being not clear
on what mode it uses to open the file.

Below are the flags passed to apr_file_open() in the implementation of
the function:
(APR_READ | APR_WRITE | APR_CREATE | APR_EXCL | APR_BUFFERED)

[[[
* subversion/include/svn_io.h
  (svn_io_open_unique_file2): ensure the function's docstring is clear
about how it opens the file -- read/write and not just read.

Patch by: cacknin
Suggested by: glasser
]]]

[[[
Index: subversion/include/svn_io.h
===================================================================
--- subversion/include/svn_io.h (revision 25772)
+++ subversion/include/svn_io.h (working copy)
@@ -112,8 +112,8 @@
                                         apr_pool_t *pool);


-/** Open a new file (for writing) with a unique name based on utf-8
- * encoded @a path, in the same directory as @a path.  The file handle is
+/** Open a new file (for reading and writing) with a unique name based on
+ * utf-8 encoded @a path, in the same directory as @a path.  The file handle is
  * returned in @a *f, and the name, which ends with @a suffix, is returned
  * in @a *unique_name_p, also utf8-encoded.  Either @a f or @a unique_name_p
  * may be @c NULL.
]]]

Cheers,
Charles

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] ensure open mode of svn_io_open_unique_file2() is clearly defined

Posted by Malcolm Rowe <ma...@farside.org.uk>.
On Fri, Jul 27, 2007 at 11:47:56PM +0200, Charles Acknin wrote:
> I bumped into svn_io_open_unique_file2()'s docstring being not clear
> on what mode it uses to open the file.
> 
> 
> -/** Open a new file (for writing) with a unique name based on utf-8
> - * encoded @a path, in the same directory as @a path.  The file handle is
> +/** Open a new file (for reading and writing) with a unique name based on
> + * utf-8 encoded @a path, in the same directory as @a path.  The file handle is

Committed in r25886, thanks!

Regards,
Malcolm