This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 3/3] bitpos: Minor python changes for bitpos expansion


Hi,

This is the final (and the smallest) patch in the bitpos expansion
changes. This patch changes python-types code to use
PyLong_FromLongLong for bitpos and type.length.

I have verified that there are not regressions in the testsuite as a
result of this patch.

Regards,
Siddhesh

gdb/ChangeLog

2012-08-05  Siddhesh Poyarekar  <siddhesh@redhat.com>

	* python/py-type.c (convert_field): Use PyLong_FromLongLong for
	TYPE_FIELD_BITPOS.
	(typy_get_sizeof): Likewise for TYPE_LENGTH.
diff --git a/gdb/python/py-type.c b/gdb/python/py-type.c
index 98030a6..afb8b72 100644
--- a/gdb/python/py-type.c
+++ b/gdb/python/py-type.c
@@ -176,7 +176,7 @@ convert_field (struct type *type, int field)
 	}
       else
 	{
-	  arg = PyLong_FromLong (TYPE_FIELD_BITPOS (type, field));
+	  arg = PyLong_FromLongLong (TYPE_FIELD_BITPOS (type, field));
 	  attrstring = "bitpos";
 	}
 
@@ -683,7 +683,7 @@ typy_get_sizeof (PyObject *self, void *closure)
     }
   /* Ignore exceptions.  */
 
-  return PyLong_FromLong (TYPE_LENGTH (type));
+  return PyLong_FromLongLong (TYPE_LENGTH (type));
 }
 
 static struct type *

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]