diff options
author | hunt <hunt> | 2005-10-26 08:29:38 +0000 |
---|---|---|
committer | hunt <hunt> | 2005-10-26 08:29:38 +0000 |
commit | af5dd76bca996577262e447fd8bff1bd0df30db7 (patch) | |
tree | 488419840e6841a1dcb022553cb33f6eccbbb3f5 /runtime/list.c | |
parent | d7c99876fec8867918d9f4f808edca985eb1fd67 (diff) | |
download | systemtap-steved-af5dd76bca996577262e447fd8bff1bd0df30db7.tar.gz systemtap-steved-af5dd76bca996577262e447fd8bff1bd0df30db7.tar.xz systemtap-steved-af5dd76bca996577262e447fd8bff1bd0df30db7.zip |
2005-10-26 Martin Hunt <hunt@redhat.com>
* map.c (_new_map_create, _new_map_del_node, _new_map_del_node,
_new_map_set_int64, _new_map_set_str,_new_map_get_int64,
_new_map_get_str, _new_map_get_stat, _new_map_set_stat):
New internal functions for the new API.
* map-int.c (__stp_map_set_int64): Modify to return an
error code.
* map-stat.c (_stp_map_add_stat): Ditto.
* map-str (_stp_map_set_str): Ditto.
* Doxyfile: Remove predefines NEED_STRING_VALS,
NEED_STATS, NEED_INT64.
* map-keys.c: Ditto.
* list.c (_stp_list_new): Ditto. Also set map->list.
* map-values.c: Ditto.
Diffstat (limited to 'runtime/list.c')
-rw-r--r-- | runtime/list.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/runtime/list.c b/runtime/list.c index ce0141ec..815b7bad 100644 --- a/runtime/list.c +++ b/runtime/list.c @@ -1,14 +1,6 @@ #ifndef _LIST_C_ /* -*- linux-c -*- */ #define _LIST_C_ -#ifndef NEED_INT64_KEYS -#error Before including list.c, "#define KEY1_TYPE INT64" and include "map-keys.c" -#endif - -#if !defined(NEED_STRING_VALS) && !defined(NEED_INT64_VALS) -#error Before including list.c, "#define VALUE_TYPE" to "INT64" or "STRING" and include "map-values.c" -#endif - #include "map.c" #include "copy.c" @@ -37,7 +29,7 @@ MAP _stp_list_new(unsigned max_entries, int type) { MAP map = _stp_map_new_int64 (max_entries, type); - map->no_wrap = 1; + map->list = 1; return map; } @@ -75,7 +67,6 @@ void _stp_list_clear(MAP map) } } -#ifdef NEED_STRING_VALS /** Adds a C string to a list. * @param map * @param str @@ -99,9 +90,7 @@ inline void _stp_list_add_string (MAP map, String str) _stp_map_key_int64 (map, map->num); _stp_map_set_str(map, str->buf); } -#endif /* NEED_STRING_VALS */ -#ifdef NEED_INT64_VALS /** Adds an int64 to a list. * @param map * @param val @@ -113,7 +102,6 @@ inline void _stp_list_add_int64(MAP map, int64_t val) _stp_map_key_int64 (map, map->num); _stp_map_set_int64(map, val); } -#endif /* NEED_INT64_VALS */ /** Get the number of elements in a list. * @param map @@ -125,7 +113,6 @@ inline int _stp_list_size(MAP map) return map->num; } -#ifdef NEED_STRING_VALS /** Copy an argv from user space to a List. * * @param list A list. @@ -159,7 +146,6 @@ int _stp_copy_argv_from_user (MAP list, char __user *__user *argv) } return list->num; } -#endif /* NEED_STRING_VALS */ /** @} */ #endif /* _LIST_C_ */ |