Subversion
|
The Subversion Iteration drivers helper routines. More...
#include <apr.h>
#include <apr_pools.h>
#include <apr_hash.h>
#include <apr_tables.h>
#include "svn_types.h"
Go to the source code of this file.
Macros | |
#define | svn_iter_break(pool) return svn_iter__break() |
Helper macro to break looping in svn_iter_apr_array() and svn_iter_apr_hash() driven loops. More... | |
Typedefs | |
typedef svn_error_t *(* | svn_iter_apr_hash_cb_t )(void *baton, const void *key, apr_ssize_t klen, void *val, apr_pool_t *pool) |
Callback function for use with svn_iter_apr_hash(). More... | |
typedef svn_error_t *(* | svn_iter_apr_array_cb_t )(void *baton, void *item, apr_pool_t *pool) |
Iteration callback used in conjunction with svn_iter_apr_array(). More... | |
Functions | |
svn_error_t * | svn_iter_apr_hash (svn_boolean_t *completed, apr_hash_t *hash, svn_iter_apr_hash_cb_t func, void *baton, apr_pool_t *pool) |
Iterate over the elements in hash, calling func for each one until there are no more elements or func returns an error. More... | |
svn_error_t * | svn_iter_apr_array (svn_boolean_t *completed, const apr_array_header_t *array, svn_iter_apr_array_cb_t func, void *baton, apr_pool_t *pool) |
Iterate over the elements in array calling func for each one until there are no more elements or func returns an error. More... | |
svn_error_t * | svn_iter__break (void) |
Internal routine used by svn_iter_break() macro. | |
The Subversion Iteration drivers helper routines.
Definition in file svn_iter.h.
#define svn_iter_break | ( | pool | ) | return svn_iter__break() |
Helper macro to break looping in svn_iter_apr_array() and svn_iter_apr_hash() driven loops.
Definition at line 132 of file svn_iter.h.
typedef svn_error_t*(* svn_iter_apr_array_cb_t)(void *baton, void *item, apr_pool_t *pool) |
Iteration callback used in conjunction with svn_iter_apr_array().
Use pool for temporary allocation, it's cleared between invocations.
baton is the baton passed to svn_iter_apr_array(). item is a pointer to the item written to the array with the APR_ARRAY_PUSH() macro.
Definition at line 90 of file svn_iter.h.
typedef svn_error_t*(* svn_iter_apr_hash_cb_t)(void *baton, const void *key, apr_ssize_t klen, void *val, apr_pool_t *pool) |
Callback function for use with svn_iter_apr_hash().
Use pool for temporary allocation, it's cleared between invocations.
key, klen and val are the values normally retrieved with apr_hash_this().
baton is the baton passed into svn_iter_apr_hash().
Definition at line 53 of file svn_iter.h.
svn_error_t* svn_iter_apr_array | ( | svn_boolean_t * | completed, |
const apr_array_header_t * | array, | ||
svn_iter_apr_array_cb_t | func, | ||
void * | baton, | ||
apr_pool_t * | pool | ||
) |
Iterate over the elements in array calling func for each one until there are no more elements or func returns an error.
Uses pool for temporary allocations.
If completed is not NULL, then on return - if func returns no errors - *completed will be set to TRUE
.
If func returns an error other than SVN_ERR_ITER_BREAK
, that error is returned. When func returns SVN_ERR_ITER_BREAK
, iteration is interrupted, but no error is returned and *completed is set to FALSE
(even if this iteration was the last one).
svn_error_t* svn_iter_apr_hash | ( | svn_boolean_t * | completed, |
apr_hash_t * | hash, | ||
svn_iter_apr_hash_cb_t | func, | ||
void * | baton, | ||
apr_pool_t * | pool | ||
) |
Iterate over the elements in hash, calling func for each one until there are no more elements or func returns an error.
Uses pool for temporary allocations.
If completed is not NULL, then on return - if func returns no errors - *completed will be set to TRUE
.
If func returns an error other than SVN_ERR_ITER_BREAK
, that error is returned. When func returns SVN_ERR_ITER_BREAK
, iteration is interrupted, but no error is returned and *completed is set to FALSE
(even if this iteration was the last one).