This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 3/3] bitpos: Minor python changes for bitpos expansion
- From: Siddhesh Poyarekar <siddhesh at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Sun, 5 Aug 2012 00:54:17 +0530
- Subject: [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 *