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:22:30 UTC
svn commit: r1649831 - in /subversion/trunk/subversion/libsvn_fs_x:
changes.c changes.h
Author: stefan2
Date: Tue Jan 6 15:22:29 2015
New Revision: 1649831
URL: http://svn.apache.org/r1649831
Log:
Continue migrating FSX to the two-pool paradigm. Some single-pool functions
don't allocate temporary data, i.e. their pools can immediately be renamed
to RESULT_POOL. Do this for changes.c.
* subversion/libsvn_fs_x/changes.h
(svn_fs_x__changes_create): POOL is actually a RESULT_POOL.
* subversion/libsvn_fs_x/changes.c
(changes_create_body,
svn_fs_x__changes_create): 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=1649831&r1=1649830&r2=1649831&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/changes.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/changes.c Tue Jan 6 15:22:29 2015
@@ -102,19 +102,19 @@ struct svn_fs_x__changes_t
apr_array_header_t *offsets;
};
-/* Create and return a new container object, allocated in POOL and with
- * and initial capacity of INITIAL_COUNT changes. The PATH and BUILDER
+/* Create and return a new container object, allocated in RESULT_POOL with
+ * an initial capacity of INITIAL_COUNT changes. The PATH and BUILDER
* members must be initialized by the caller afterwards.
*/
static svn_fs_x__changes_t *
changes_create_body(apr_size_t initial_count,
- apr_pool_t *pool)
+ apr_pool_t *result_pool)
{
- svn_fs_x__changes_t *changes = apr_pcalloc(pool, sizeof(*changes));
+ svn_fs_x__changes_t *changes = apr_pcalloc(result_pool, sizeof(*changes));
- changes->changes = apr_array_make(pool, (int)initial_count,
+ changes->changes = apr_array_make(result_pool, (int)initial_count,
sizeof(binary_change_t));
- changes->offsets = apr_array_make(pool, 16, sizeof(int));
+ changes->offsets = apr_array_make(result_pool, 16, sizeof(int));
APR_ARRAY_PUSH(changes->offsets, int) = 0;
return changes;
@@ -122,10 +122,11 @@ changes_create_body(apr_size_t initial_c
svn_fs_x__changes_t *
svn_fs_x__changes_create(apr_size_t initial_count,
- apr_pool_t *pool)
+ apr_pool_t *result_pool)
{
- svn_fs_x__changes_t *changes = changes_create_body(initial_count, pool);
- changes->builder = svn_fs_x__string_table_builder_create(pool);
+ svn_fs_x__changes_t *changes = changes_create_body(initial_count,
+ result_pool);
+ changes->builder = svn_fs_x__string_table_builder_create(result_pool);
return changes;
}
Modified: subversion/trunk/subversion/libsvn_fs_x/changes.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/changes.h?rev=1649831&r1=1649830&r2=1649831&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/changes.h (original)
+++ subversion/trunk/subversion/libsvn_fs_x/changes.h Tue Jan 6 15:22:29 2015
@@ -47,11 +47,12 @@ typedef struct svn_fs_x__changes_t svn_f
/* Create and populate changes containers. */
/* Create and return a new changes container with an initial capacity of
- * INITIAL_COUNT svn_fs_x__change_t objects. Allocate the result in POOL.
+ * INITIAL_COUNT svn_fs_x__change_t objects.
+ * Allocate the result in RESULT_POOL.
*/
svn_fs_x__changes_t *
svn_fs_x__changes_create(apr_size_t initial_count,
- apr_pool_t *pool);
+ apr_pool_t *result_pool);
/* Start a new change list CHANGES (implicitly terminating the previous one)
* and return its index in *LIST_INDEX. Append all changes from LIST to