FreeBSD/contrib/subversion/subversion/libsvn_fs_x/tree.c
/* Find and return the DAG node cache for ROOT and the key that
   should be used for PATH.

   RESULT_POOL will only be used for allocating a new keys if necessary. */
Find and return the DAG node cache for ROOT and the key that
should be used for PATH.

RESULT_POOL will only be used for allocating a new keys if necessary.
Find and return the DAG node cache for ROOT and the key that should be used for PATH . RESULT_POOL will only be used for allocating a new keys if necessary .
static void
locate_cache(svn_cache__t **cache,
             const char **key,
             svn_fs_root_t *root,
             const char *path,
             apr_pool_t *result_pool)
{
  if (root->is_txn_root)
    {
      fs_txn_root_data_t *frd = root->fsap_data;
      if (cache)
        *cache = frd->txn_node_cache;
      if (key && path)
        *key = path;
    }
  else
    {
      svn_fs_x__data_t *ffd = root->fs->fsap_data;
      if (cache)
        *cache = ffd->rev_node_cache;
      if (key && path)
        *key = svn_fs_x__combine_number_and_string(root->rev, path,
                                                   result_pool);
    }
}
static void locate_cache ( svn_cache__t * * cache , const char * * key , svn_fs_root_t * root , const char * path , apr_pool_t * result_pool ) { if ( root -> is_txn_root ) { fs_txn_root_data_t * frd = root -> fsap_data ; if ( cache ) * cache = frd -> txn_node_cache ; if ( key && path ) * key = path ; } else { svn_fs_x__data_t * ffd = root -> fs -> fsap_data ; if ( cache ) * cache = ffd -> rev_node_cache ; if ( key && path ) * key = svn_fs_x__combine_number_and_string ( root -> rev , path , result_pool ) ; } }
Find and return the DAG node cache for ROOT and the key that
should be used for PATH.
Find and return the DAG node cache for ROOT and the key that should be used for PATH .