subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1103493 - in /subversion/trunk/subversion: include/svn_io.h libsvn_subr/io.c
Date Sun, 15 May 2011 18:10:52 GMT
Author: stefan2
Date: Sun May 15 18:10:51 2011
New Revision: 1103493

URL: http://svn.apache.org/viewvc?rev=1103493&view=rev
Log:
Provide svn_io_dir_close() in symmetry to svn_io_dir_open().

* subversion/include/svn_io.h
  (svn_io_dir_close): declare
* subversion/libsvn_subr/io.c
  (svn_io_dir_close): implement

Modified:
    subversion/trunk/subversion/include/svn_io.h
    subversion/trunk/subversion/libsvn_subr/io.c

Modified: subversion/trunk/subversion/include/svn_io.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_io.h?rev=1103493&r1=1103492&r2=1103493&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_io.h (original)
+++ subversion/trunk/subversion/include/svn_io.h Sun May 15 18:10:51 2011
@@ -2022,6 +2022,12 @@ svn_io_dir_open(apr_dir_t **new_dir,
                 const char *dirname,
                 apr_pool_t *pool);
 
+/** Wrapper for apr_dir_close().
+ *
+ * @since New in 1.7.
+ */
+svn_error_t *
+svn_io_dir_close(apr_dir_t *thedir);
 
 /** Wrapper for apr_dir_remove().  @a dirname is utf8-encoded.
  * @note This function has this name to avoid confusion with

Modified: subversion/trunk/subversion/libsvn_subr/io.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/io.c?rev=1103493&r1=1103492&r2=1103493&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/io.c (original)
+++ subversion/trunk/subversion/libsvn_subr/io.c Sun May 15 18:10:51 2011
@@ -3582,6 +3582,15 @@ svn_io_dir_read(apr_finfo_t *finfo,
   return SVN_NO_ERROR;
 }
 
+svn_error_t *
+svn_io_dir_close(apr_dir_t *thedir)
+{
+  apr_status_t apr_err = apr_dir_close(thedir);
+  if (apr_err)
+    return svn_error_wrap_apr(apr_err, _("Error closing directory"));
+
+  return SVN_NO_ERROR;
+}
 
 svn_error_t *
 svn_io_dir_walk2(const char *dirname,



Mime
View raw message