You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2015/01/06 16:19:12 UTC

svn commit: r1649825 - in /subversion/trunk/subversion/libsvn_fs_x: changes.c changes.h

Author: stefan2
Date: Tue Jan  6 15:19:12 2015
New Revision: 1649825

URL: http://svn.apache.org/r1649825
Log:
Continue migrating FSX to the two-pool paradigm.  Many single-pool functions
don't allocate a return value, i.e. their pools can immediately be renamed
to SCRATCH_POOL.  Do this for changes.*.

* subversion/libsvn_fs_x/changes.h
  (svn_fs_x__write_changes_container): POOL is actually a SCRATCH_POOL.

* subversion/libsvn_fs_x/changes.c
  (svn_fs_x__write_changes_container): Same.

Modified:
    subversion/trunk/subversion/libsvn_fs_x/changes.c
    subversion/trunk/subversion/libsvn_fs_x/changes.h

Modified: subversion/trunk/subversion/libsvn_fs_x/changes.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/changes.c?rev=1649825&r1=1649824&r2=1649825&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/changes.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/changes.c Tue Jan  6 15:19:12 2015
@@ -287,16 +287,16 @@ svn_fs_x__changes_get_list(apr_array_hea
 svn_error_t *
 svn_fs_x__write_changes_container(svn_stream_t *stream,
                                   const svn_fs_x__changes_t *changes,
-                                  apr_pool_t *pool)
+                                  apr_pool_t *scratch_pool)
 {
   int i;
 
   string_table_t *paths = changes->paths
                         ? changes->paths
                         : svn_fs_x__string_table_create(changes->builder,
-                                                        pool);
+                                                        scratch_pool);
 
-  svn_packed__data_root_t *root = svn_packed__data_create_root(pool);
+  svn_packed__data_root_t *root = svn_packed__data_create_root(scratch_pool);
 
   /* one top-level stream for each array */
   svn_packed__int_stream_t *offsets_stream
@@ -335,8 +335,8 @@ svn_fs_x__write_changes_container(svn_st
     }
 
   /* write to disk */
-  SVN_ERR(svn_fs_x__write_string_table(stream, paths, pool));
-  SVN_ERR(svn_packed__data_write(stream, root, pool));
+  SVN_ERR(svn_fs_x__write_string_table(stream, paths, scratch_pool));
+  SVN_ERR(svn_packed__data_write(stream, root, scratch_pool));
   
   return SVN_NO_ERROR;
 }

Modified: subversion/trunk/subversion/libsvn_fs_x/changes.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/changes.h?rev=1649825&r1=1649824&r2=1649825&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/changes.h (original)
+++ subversion/trunk/subversion/libsvn_fs_x/changes.h Tue Jan  6 15:19:12 2015
@@ -81,13 +81,13 @@ svn_fs_x__changes_get_list(apr_array_hea
 
 /* I/O interface. */
 
-/* Write a serialized representation of CHANGES to STREAM.  Use POOL for
- * temporary allocations.
+/* Write a serialized representation of CHANGES to STREAM.
+ * Use SCRATCH_POOL for temporary allocations.
  */
 svn_error_t *
 svn_fs_x__write_changes_container(svn_stream_t *stream,
                                   const svn_fs_x__changes_t *changes,
-                                  apr_pool_t *pool);
+                                  apr_pool_t *scratch_pool);
 
 /* Read a changes container from its serialized representation in STREAM.
  * Allocate the result in RESULT_POOL and return it in *CHANGES_P.  Use