From e7ae44425c2931f0b04a0ee553b480e7fe2c8a72 Mon Sep 17 00:00:00 2001 From: hunt Date: Wed, 10 Jan 2007 15:11:10 +0000 Subject: 2007-01-10 Martin Hunt * translate.cxx (mapvar::del): Call the new _stp_map_del function instead of setting to zero. --- translate.cxx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'translate.cxx') 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 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 const & indices) const -- cgit