From 55a163fc934622ec2b94551b8cd0e57a33b1a905 Mon Sep 17 00:00:00 2001 From: hunt Date: Tue, 31 May 2005 20:26:38 +0000 Subject: 2005-05-31 Martin Hunt * 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. --- runtime/map.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'runtime/map.h') 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 */ -- cgit