aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@sourceware.org>2012-08-10 18:55:18 +0000
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2012-08-10 18:55:18 +0000
commit200bc880f4ba86e027c4f45cbc912f494da768f2 (patch)
tree75128e47b397635db9203f514561cd7b561c0526 /gdb/python
parentde0bea007c446f40ecec90a2672e0a806d397e1a (diff)
downloadgdb-200bc880f4ba86e027c4f45cbc912f494da768f2.zip
gdb-200bc880f4ba86e027c4f45cbc912f494da768f2.tar.gz
gdb-200bc880f4ba86e027c4f45cbc912f494da768f2.tar.bz2
* python/py-type.c (convert_field): Use gdb_py_long_from_longest
for TYPE_FIELD_BITPOS. (typy_get_sizeof): Likewise for TYPE_LENGTH.
Diffstat (limited to 'gdb/python')
-rw-r--r--gdb/python/py-type.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/python/py-type.c b/gdb/python/py-type.c
index 98030a6..a02402e 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 = gdb_py_long_from_longest (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 gdb_py_long_from_longest (TYPE_LENGTH (type));
}
static struct type *