summaryrefslogtreecommitdiffstats
path: root/translate.cxx
diff options
context:
space:
mode:
authorhunt <hunt>2007-01-10 15:11:10 +0000
committerhunt <hunt>2007-01-10 15:11:10 +0000
commite7ae44425c2931f0b04a0ee553b480e7fe2c8a72 (patch)
tree9d5b5b51891bae49178308c2ae7534683fe5f8fa /translate.cxx
parent3c2a749a7ef6df845063867ff69b12276ba09800 (diff)
downloadsystemtap-steved-e7ae44425c2931f0b04a0ee553b480e7fe2c8a72.tar.gz
systemtap-steved-e7ae44425c2931f0b04a0ee553b480e7fe2c8a72.tar.xz
systemtap-steved-e7ae44425c2931f0b04a0ee553b480e7fe2c8a72.zip
2007-01-10 Martin Hunt <hunt@redhat.com>
* translate.cxx (mapvar::del): Call the new _stp_map_del function instead of setting to zero.
Diffstat (limited to 'translate.cxx')
-rw-r--r--translate.cxx9
1 files changed, 2 insertions, 7 deletions
diff --git a/translate.cxx b/translate.cxx
index d46428f0..58347a59 100644
--- a/translate.cxx
+++ b/translate.cxx
@@ -514,13 +514,8 @@ struct mapvar
}
string del (vector<tmpvar> const & indices) const
- {
- if (type() == pe_string)
- return (call_prefix("set", indices) + ", NULL)");
- else if ((type() == pe_long) || (type() == pe_stats))
- return (call_prefix("set", indices) + ", 0)");
- else
- throw semantic_error("setting a value of an unsupported map type");
+ {
+ return (call_prefix("del", indices) + ")");
}
string exists (vector<tmpvar> const & indices) const