[glib] Fix up cast in gdb macros



commit 70027bf0928e7960c3ff78ce4a92aaad20ee899e
Author: Alexander Larsson <alexl redhat com>
Date:   Fri Sep 25 09:50:49 2009 +0200

    Fix up cast in gdb macros
    
    We need to actually assign the casted value somewhere.

 glib/glib.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/glib/glib.py b/glib/glib.py
index 494eb69..0953aee 100644
--- a/glib/glib.py
+++ b/glib/glib.py
@@ -214,7 +214,7 @@ class ForeachCommand (gdb.Command):
         return (var, val, command)
 
     def do_iter(self, arg, item, command):
-        item.cast (gdb.lookup_type("void").pointer())
+        item = item.cast (gdb.lookup_type("void").pointer())
         item = long(item)
         to_eval = "set $%s = (void *)0x%x\n"%(arg, item)
         gdb.execute(to_eval)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]