Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 3/3] bitpos: Minor python changes for bitpos expansion
@ 2012-08-04 19:24 Siddhesh Poyarekar
  2012-08-10 16:59 ` Tom Tromey
  0 siblings, 1 reply; 4+ messages in thread
From: Siddhesh Poyarekar @ 2012-08-04 19:24 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 486 bytes --]

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.

[-- Attachment #2: bitpos-expand-python.patch --]
[-- Type: text/x-patch, Size: 618 bytes --]

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 *

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-08-10 20:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-04 19:24 [PATCH 3/3] bitpos: Minor python changes for bitpos expansion Siddhesh Poyarekar
2012-08-10 16:59 ` Tom Tromey
2012-08-10 18:58   ` Siddhesh Poyarekar
2012-08-10 20:42     ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox