]> sourceware.org Git - systemtap.git/commitdiff
2007-01-22 Martin Hunt <hunt@redhat.com>
authorhunt <hunt>
Mon, 22 Jan 2007 16:56:42 +0000 (16:56 +0000)
committerhunt <hunt>
Mon, 22 Jan 2007 16:56:42 +0000 (16:56 +0000)
* translate.cxx (mapvar::exists): Use new _stp_map_exists function.
Testing for zero is no longer correct after changes from 2007-01-10
below.

ChangeLog
translate.cxx

index 04eb99adad1a6a27b8c167961134e4c471528e30..292d416e96c6d4728646a8d7cfecb2851a8ebc1b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-01-22  Martin Hunt  <hunt@redhat.com>
+
+       * translate.cxx (mapvar::exists): Use new _stp_map_exists function.
+       Testing for zero is no longer correct after changes from 2007-01-10
+       below.
+
 2007-01-18  Frank Ch. Eigler  <fche@elastic.org>
 
        * main.cxx (version): Add (C) 2007.
index c6085a57c7e6f0b3bd333c80fd4b7b0b3ddd54f0..34591c24b2193e361d88d03c41df6f8b7b3d31e8 100644 (file)
@@ -520,10 +520,9 @@ struct mapvar
 
   string exists (vector<tmpvar> const & indices) const
   {
-    if (type() == pe_string)
-      return ("({ char *v = " + call_prefix("get", indices)
-             + "); (v != NULL && *v != '\\0');})");
-    else if ((type() == pe_long) || (type() == pe_stats))
+    if (type() == pe_long || type() == pe_string)
+      return (call_prefix("exists", indices) + ")");
+    else if (type() == pe_stats)
       return ("((uintptr_t)" + call_prefix("get", indices)
              + ") != (uintptr_t) 0)");
     else
This page took 0.043289 seconds and 5 git commands to generate.