[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r22348 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r22348 - gnunet/src/mesh |
Date: |
Wed, 27 Jun 2012 15:48:42 +0200 |
Author: bartpolot
Date: 2012-06-27 15:48:42 +0200 (Wed, 27 Jun 2012)
New Revision: 22348
Modified:
gnunet/src/mesh/mesh_block_lib.c
gnunet/src/mesh/mesh_block_lib.h
Log:
- Reorder iterator arguments
Modified: gnunet/src/mesh/mesh_block_lib.c
===================================================================
--- gnunet/src/mesh/mesh_block_lib.c 2012-06-27 13:45:03 UTC (rev 22347)
+++ gnunet/src/mesh/mesh_block_lib.c 2012-06-27 13:48:42 UTC (rev 22348)
@@ -66,25 +66,25 @@
GNUNET_MESH_regex_block_check (const struct MeshRegexBlock *block,
size_t size)
{
- return GNUNET_MESH_regex_block_iterate(NULL, block, size, &check_edge);
+ return GNUNET_MESH_regex_block_iterate(block, size, &check_edge, NULL);
}
/**
* Iterate over all edges of a block of a regex state.
*
- * @param cls Closure for the iterator.
* @param block Block to iterate over.
* @param size Size of block.
* @param iterator Function to call on each edge in the block.
+ * @param iter_cls Closure for the iterator.
*
* @return How many bytes of block have been processed
*/
int
-GNUNET_MESH_regex_block_iterate (void *cls,
- const struct MeshRegexBlock *block,
+GNUNET_MESH_regex_block_iterate (const struct MeshRegexBlock *block,
size_t size,
- GNUNET_MESH_EgdeIterator iterator)
+ GNUNET_MESH_EgdeIterator iterator,
+ void *iter_cls)
{
struct MeshRegexEdge *edge;
unsigned int n;
@@ -115,7 +115,7 @@
return GNUNET_SYSERR;
aux = (char *) &edge[1]; // Skip edge block
if (NULL != iterator)
- if (GNUNET_NO == iterator (cls, aux, n_token, &edge->key))
+ if (GNUNET_NO == iterator (iter_cls, aux, n_token, &edge->key))
return GNUNET_OK;
aux = &aux[n_token]; // Skip edge token
}
Modified: gnunet/src/mesh/mesh_block_lib.h
===================================================================
--- gnunet/src/mesh/mesh_block_lib.h 2012-06-27 13:45:03 UTC (rev 22347)
+++ gnunet/src/mesh/mesh_block_lib.h 2012-06-27 13:48:42 UTC (rev 22348)
@@ -69,18 +69,18 @@
/**
* Iterate over all edges of a block of a regex state.
*
- * @param cls Closure for the iterator.
* @param block Block to iterate over.
* @param size Size of block.
* @param iterator Function to call on each edge in the block.
+ * @param iter_cls Closure for the iterator.
*
* @return GNUNET_SYSERR if an error has been encountered, GNUNET_OK otherwise
*/
int
-GNUNET_MESH_regex_block_iterate (void *cls,
- const struct MeshRegexBlock *block,
+GNUNET_MESH_regex_block_iterate (const struct MeshRegexBlock *block,
size_t size,
- GNUNET_MESH_EgdeIterator iterator);
+ GNUNET_MESH_EgdeIterator iterator,
+ void *iter_cls);
#if 0 /* keep Emacsens' auto-indent happy */
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r22348 - gnunet/src/mesh,
gnunet <=