subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danie...@apache.org
Subject svn commit: r1130569 - in /subversion/trunk/subversion: include/svn_io.h libsvn_subr/deprecated.c libsvn_subr/io.c
Date Thu, 02 Jun 2011 14:20:44 GMT
Author: danielsh
Date: Thu Jun  2 14:20:44 2011
New Revision: 1130569

URL: http://svn.apache.org/viewvc?rev=1130569&view=rev
Log:
Remove svn_io_file_create2() which is unused.

* subversion/include/svn_io.h
  (svn_io_file_create2): Remove.
  (svn_io_file_create): Stop refering to it.

* subversion/libsvn_subr/deprecated.c
  (svn_io_file_create): Remove here.

* subversion/libsvn_subr/io.c
  (svn_io_file_create): Rename from svn_io_file_create2(), adjusting.

Modified:
    subversion/trunk/subversion/include/svn_io.h
    subversion/trunk/subversion/libsvn_subr/deprecated.c
    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=1130569&r1=1130568&r2=1130569&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_io.h (original)
+++ subversion/trunk/subversion/include/svn_io.h Thu Jun  2 14:20:44 2011
@@ -645,20 +645,6 @@ svn_io_files_contents_same_p(svn_boolean
 /** Create file at utf8-encoded @a file with contents @a contents.
  * @a file must not already exist.
  * Use @a pool for memory allocations.
- *
- * @since New in 1.7.
- */
-svn_error_t *
-svn_io_file_create2(const char *file,
-                    const svn_string_t *contents,
-                    apr_pool_t *scratch_pool);
-
-/** Like svn_io_file_create2(), but with a C string instead
- * of an #svn_string_t.
- *
- * @see svn_io_file_create2()
- *
- * @note This API is not considered @c deprecated.
  */
 svn_error_t *
 svn_io_file_create(const char *file,

Modified: subversion/trunk/subversion/libsvn_subr/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/deprecated.c?rev=1130569&r1=1130568&r2=1130569&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/deprecated.c (original)
+++ subversion/trunk/subversion/libsvn_subr/deprecated.c Thu Jun  2 14:20:44 2011
@@ -630,24 +630,6 @@ svn_opt_print_generic_help(const char *h
 
 /*** From io.c ***/
 svn_error_t *
-svn_io_file_create(const char *file,
-                   const char *contents,
-                   apr_pool_t *pool)
-{
-  if (contents && *contents)
-    { 
-      svn_string_t contents_string;
-      contents_string.data = contents;
-      contents_string.len = strlen(contents);
-      return svn_io_file_create2(file, &contents_string, pool);
-    }
-  else
-    {
-      return svn_io_file_create2(file, NULL, pool);
-    }
-}
-
-svn_error_t *
 svn_io_open_unique_file2(apr_file_t **file,
                          const char **temp_path,
                          const char *path,

Modified: subversion/trunk/subversion/libsvn_subr/io.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/io.c?rev=1130569&r1=1130568&r2=1130569&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/io.c (original)
+++ subversion/trunk/subversion/libsvn_subr/io.c Thu Jun  2 14:20:44 2011
@@ -1092,9 +1092,9 @@ svn_io_make_dir_recursively(const char *
   return SVN_NO_ERROR;
 }
 
-svn_error_t *svn_io_file_create2(const char *file,
-                                 const svn_string_t *contents,
-                                 apr_pool_t *pool)
+svn_error_t *svn_io_file_create(const char *file,
+                                const char *contents,
+                                apr_pool_t *pool)
 {
   apr_file_t *f;
   apr_size_t written;
@@ -1104,8 +1104,8 @@ svn_error_t *svn_io_file_create2(const c
                            (APR_WRITE | APR_CREATE | APR_EXCL),
                            APR_OS_DEFAULT,
                            pool));
-  if (contents && contents->len)
-    err = svn_io_file_write_full(f, contents->data, contents->len,
+  if (contents && *contents)
+    err = svn_io_file_write_full(f, contents, strlen(contents),
                                  &written, pool);
 
 



Mime
View raw message