diff options
author | hunt <hunt> | 2005-05-31 20:26:38 +0000 |
---|---|---|
committer | hunt <hunt> | 2005-05-31 20:26:38 +0000 |
commit | 55a163fc934622ec2b94551b8cd0e57a33b1a905 (patch) | |
tree | f5127eb771caa4cfb4c5c69f75cb293992e93d2d /runtime/map.h | |
parent | f541970f10c03b788141b359689e2a847b7684c4 (diff) | |
download | systemtap-steved-55a163fc934622ec2b94551b8cd0e57a33b1a905.tar.gz systemtap-steved-55a163fc934622ec2b94551b8cd0e57a33b1a905.tar.xz systemtap-steved-55a163fc934622ec2b94551b8cd0e57a33b1a905.zip |
2005-05-31 Martin Hunt <hunt@redhat.com>
* map.c (_stp_map_print): Now takes a format string instead of a name.
* map.h (foreach): Update macro.
* string.c (_stp_string_cat_char): New function. Append a char
to a string.
Diffstat (limited to 'runtime/map.h')
-rw-r--r-- | runtime/map.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/runtime/map.h b/runtime/map.h index 6de06f17..9660ce9b 100644 --- a/runtime/map.h +++ b/runtime/map.h @@ -182,9 +182,8 @@ typedef struct map_root *MAP; * @include foreach.c */ -#define foreach(map, ptr) \ - for (ptr = (typeof(ptr))_stp_map_start(map); ptr; \ - ptr = (typeof(ptr))_stp_map_iter (map, (struct map_node *)ptr)) +#define foreach(map, ptr) \ + for (ptr = _stp_map_start(map); ptr; ptr = _stp_map_iter (map, ptr)) /** @} */ @@ -236,7 +235,7 @@ struct map_node * _stp_map_start(MAP map); struct map_node * _stp_map_iter(MAP map, struct map_node *m); void _stp_map_del(MAP map); void _stp_map_print_histogram(MAP map, stat *s); -void _stp_map_print(MAP map, const char *name); +void _stp_map_print(MAP map, const char *fmt); static struct map_node * __stp_map_create(MAP map); /* these prototypes suppress warnings from macros */ |