subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danie...@apache.org
Subject svn commit: r1169456 - in /subversion/branches/fs-successor-ids/subversion/libsvn_fs_base: node-rev.c node-rev.h tree.c
Date Sun, 11 Sep 2011 13:49:05 GMT
Author: danielsh
Date: Sun Sep 11 13:48:49 2011
New Revision: 1169456

URL: http://svn.apache.org/viewvc?rev=1169456&view=rev
Log:
On the fs-successor-ids branch, convert svn_fs_base__get_node_successors()
to the dual-pool paradigm.

* subversion/libsvn_fs_base/node-rev.h
  (svn_fs_base__get_node_successors):
    Split POOL parameter into RESULT_POOL/SCRATCH_POOL.

* subversion/libsvn_fs_base/node-rev.c
  (svn_fs_base__get_node_successors):
    Convert to the dual-pool paradigm.

* subversion/libsvn_fs_base/tree.c
  (txn_body_history_next): Update caller.

Modified:
    subversion/branches/fs-successor-ids/subversion/libsvn_fs_base/node-rev.c
    subversion/branches/fs-successor-ids/subversion/libsvn_fs_base/node-rev.h
    subversion/branches/fs-successor-ids/subversion/libsvn_fs_base/tree.c

Modified: subversion/branches/fs-successor-ids/subversion/libsvn_fs_base/node-rev.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-successor-ids/subversion/libsvn_fs_base/node-rev.c?rev=1169456&r1=1169455&r2=1169456&view=diff
==============================================================================
--- subversion/branches/fs-successor-ids/subversion/libsvn_fs_base/node-rev.c (original)
+++ subversion/branches/fs-successor-ids/subversion/libsvn_fs_base/node-rev.c Sun Sep 11 13:48:49
2011
@@ -164,11 +164,12 @@ svn_fs_base__get_node_successors(apr_arr
                                  const svn_fs_id_t *id,
                                  svn_boolean_t committed_only,
                                  trail_t *trail,
-                                 apr_pool_t *pool)
+                                 apr_pool_t *result_pool,
+                                 apr_pool_t *scratch_pool)
 {
   apr_array_header_t *all_successors, *successors;
-  apr_pool_t *iterpool = svn_pool_create(pool);
-  svn_string_t *node_id_str = svn_fs_base__id_unparse(id, pool);
+  apr_pool_t *iterpool = svn_pool_create(scratch_pool);
+  svn_string_t *node_id_str = svn_fs_base__id_unparse(id, scratch_pool);
   base_fs_data_t *bfd = fs->fsap_data;
   int i;
 
@@ -180,15 +181,16 @@ svn_fs_base__get_node_successors(apr_arr
     }
 
   SVN_ERR(svn_fs_bdb__successors_fetch(&all_successors, fs, node_id_str->data,
-                                       trail, pool));
-  successors = apr_array_make(pool, all_successors->nelts,
+                                       trail, scratch_pool));
+  successors = apr_array_make(result_pool, all_successors->nelts,
                               sizeof(const svn_fs_id_t *));
   for (i = 0; i < all_successors->nelts; i++)
     {
       svn_revnum_t revision;
       const char *succ_id_str = APR_ARRAY_IDX(all_successors, i, const char *);
       const svn_fs_id_t *succ_id = svn_fs_base__id_parse(succ_id_str,
-                                                   strlen(succ_id_str), pool);
+                                                   strlen(succ_id_str),
+                                                   result_pool);
 
       svn_pool_clear(iterpool);
 

Modified: subversion/branches/fs-successor-ids/subversion/libsvn_fs_base/node-rev.h
URL: http://svn.apache.org/viewvc/subversion/branches/fs-successor-ids/subversion/libsvn_fs_base/node-rev.h?rev=1169456&r1=1169455&r2=1169456&view=diff
==============================================================================
--- subversion/branches/fs-successor-ids/subversion/libsvn_fs_base/node-rev.h (original)
+++ subversion/branches/fs-successor-ids/subversion/libsvn_fs_base/node-rev.h Sun Sep 11 13:48:49
2011
@@ -106,7 +106,8 @@ svn_error_t *svn_fs_base__get_node_succe
                                               const svn_fs_id_t *id,
                                               svn_boolean_t committed_only,
                                               trail_t *trail,
-                                              apr_pool_t *pool);
+                                              apr_pool_t *result_pool,
+                                              apr_pool_t *scratch_pool);
 
 #ifdef __cplusplus
 }

Modified: subversion/branches/fs-successor-ids/subversion/libsvn_fs_base/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-successor-ids/subversion/libsvn_fs_base/tree.c?rev=1169456&r1=1169455&r2=1169456&view=diff
==============================================================================
--- subversion/branches/fs-successor-ids/subversion/libsvn_fs_base/tree.c (original)
+++ subversion/branches/fs-successor-ids/subversion/libsvn_fs_base/tree.c Sun Sep 11 13:48:49
2011
@@ -4554,7 +4554,8 @@ txn_body_history_next(void *baton, trail
     SVN_ERR(svn_fs_base__get_node_successors(&successors,
                                              bhd->fs, node_id,
                                              TRUE /* committed_only */,
-                                             trail, pool));
+                                             trail,
+                                             args->pool, trail->pool));
     for (i = 0; i < successors->nelts; i++)
       {
         /* ... then massage its results into something understandable by



Mime
View raw message