summaryrefslogtreecommitdiffstats
path: root/runtime/map.h
diff options
context:
space:
mode:
authorhunt <hunt>2005-04-07 15:17:29 +0000
committerhunt <hunt>2005-04-07 15:17:29 +0000
commit3d4bc8bea6b45893bd4b49f44df26bd602b4cba5 (patch)
treebae3fb1bc5fcbd7906574b6902c649b203274a3f /runtime/map.h
parent6e01db401be4a19e6d81d9955d055e2f4e1b6aea (diff)
downloadsystemtap-steved-3d4bc8bea6b45893bd4b49f44df26bd602b4cba5.tar.gz
systemtap-steved-3d4bc8bea6b45893bd4b49f44df26bd602b4cba5.tar.xz
systemtap-steved-3d4bc8bea6b45893bd4b49f44df26bd602b4cba5.zip
Update to use relayfs.
Diffstat (limited to 'runtime/map.h')
-rw-r--r--runtime/map.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/runtime/map.h b/runtime/map.h
index 9e30a926..65ed0674 100644
--- a/runtime/map.h
+++ b/runtime/map.h
@@ -150,12 +150,14 @@ typedef struct map_root *MAP;
* type of the argument.
* @note May cause compiler warning on some GCCs
*/
-#define _stp_map_set(map, val) \
+#define _stp_map_set(map, val) \
({ \
- if (__builtin_types_compatible_p (typeof (val), char[])) \
+ if (__builtin_types_compatible_p (typeof (val), char[])) \
_stp_map_set_str (map, (char *)(val)); \
- else \
- _stp_map_set_int64 (map, (int64_t)(val)); \
+ else if (__builtin_types_compatible_p (typeof (val), String)) \
+ _stp_map_set_string (map, (String)(val)); \
+ else \
+ _stp_map_set_int64 (map, (int64_t)(val)); \
})
/** Loop through all elements of a map or list.
@@ -178,11 +180,13 @@ typedef struct map_root *MAP;
*
* @note May cause compiler warning on some GCCs
*/
-#define _stp_list_add(map, val) \
- ({ \
- if (__builtin_types_compatible_p (typeof (val), char[])) \
+#define _stp_list_add(map, val) \
+ ({ \
+ if (__builtin_types_compatible_p (typeof (val), char[])) \
_stp_list_add_str (map, (char *)(val)); \
- else \
+ else if (__builtin_types_compatible_p (typeof (val), String)) \
+ _stp_list_add_string (map, (String)(val)); \
+ else \
_stp_list_add_int64 (map, (int64_t)(val)); \
})