summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/ChangeLog5
-rw-r--r--runtime/map-values.c9
-rw-r--r--runtime/map.h2
3 files changed, 16 insertions, 0 deletions
diff --git a/runtime/ChangeLog b/runtime/ChangeLog
index c0e2ac65..69864f19 100644
--- a/runtime/ChangeLog
+++ b/runtime/ChangeLog
@@ -1,3 +1,8 @@
+2005-08-12 Graydon Hoare <graydon@redhat.com>
+
+ * map-values.c (_stp_map_entry_exists): New function.
+ * map.h (_stp_map_entry_exists): Declare it.
+
2005-08-12 Frank Ch. Eigler <fche@elastic.org>
* arith.c: New file to contain arithmetic helper functions.
diff --git a/runtime/map-values.c b/runtime/map-values.c
index f0df9563..32cfb59d 100644
--- a/runtime/map-values.c
+++ b/runtime/map-values.c
@@ -51,5 +51,14 @@ void _stp_map_add_int64 (MAP map, int64_t val)
}
#endif
+unsigned _stp_map_entry_exists (MAP map)
+{
+ struct map_node *m;
+ if (map == NULL || map->create || map->key == NULL)
+ return 0;
+ return 1;
+}
+
+
#endif /* _MAP_VALUES_C_ */
diff --git a/runtime/map.h b/runtime/map.h
index 2a31fa8e..857751d2 100644
--- a/runtime/map.h
+++ b/runtime/map.h
@@ -241,5 +241,7 @@ void _stp_list_add_string(MAP, String);
void _stp_map_key_int64(MAP, int64_t);
void _stp_map_set_int64(MAP, int64_t);
int64_t _stp_map_get_int64(MAP);
+
+unsigned _stp_map_entry_exists(MAP);
/** @endcond */
#endif /* _MAP_H_ */