diff options
author | Guy Harris <guy@alum.mit.edu> | 2017-08-08 15:05:37 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2017-08-08 22:06:27 +0000 |
commit | 01f2e2b2012e09210104910646feee98128b458f (patch) | |
tree | e0124cda8c631ca321d7c6ce65c9fad83d7c18ee /epan/range.h | |
parent | 3bcd0e142a3540ed8fa7a339728d0c10bacadcc8 (diff) |
We really only need one range_foreach routine.
Rename range_foreach_r() to range_foreach(), getting rid of the old
range_foreach().
If your callback doesn't require an additional argument, just pass NULL
when calling range_foreach(), and declare the argument as unused.
Change-Id: I49a56f90610e39cf2ddc398c9e30ed11a6ca90db
Reviewed-on: https://code.wireshark.org/review/23025
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/range.h')
-rw-r--r-- | epan/range.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/epan/range.h b/epan/range.h index 2e440b30ef..e61550a90a 100644 --- a/epan/range.h +++ b/epan/range.h @@ -131,19 +131,13 @@ WS_DLL_PUBLIC gboolean range_remove_value(wmem_allocator_t *scope, range_t **ran WS_DLL_PUBLIC gboolean ranges_are_equal(range_t *a, range_t *b); /** This function calls the provided callback function for each value in - * in the range. + * in the range. Takes a pointer argument, which is passed to the + * callback, along with the value in the range. * @param range the range * @param callback the callback function - */ -WS_DLL_PUBLIC void range_foreach(range_t *range, void (*callback)(guint32 val)); - -/** This function calls the provided callback function for each value in - * in the range. Takes an optional pointer argument. - * @param range the range - * @param callback2 the callback function * @param ptr pointer passed to the callback */ -WS_DLL_PUBLIC void range_foreach_r(range_t *range, void (*callback2)(guint32 val, gpointer ptr), gpointer ptr); +WS_DLL_PUBLIC void range_foreach(range_t *range, void (*callback)(guint32 val, gpointer ptr), gpointer ptr); /** * This function converts a range_t to a (wmem_alloc()-allocated) string. |