aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-type.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python/py-type.c')
-rw-r--r--gdb/python/py-type.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/python/py-type.c b/gdb/python/py-type.c
index 229fde3..d487a39 100644
--- a/gdb/python/py-type.c
+++ b/gdb/python/py-type.c
@@ -233,7 +233,7 @@ convert_field (struct type *type, int field)
if (PyObject_SetAttrString (result.get (), "is_base_class", arg.get ()) < 0)
return NULL;
- arg.reset (PyLong_FromLong (TYPE_FIELD_BITSIZE (type, field)));
+ arg = gdb_py_object_from_longest (TYPE_FIELD_BITSIZE (type, field));
if (arg == NULL)
return NULL;
if (PyObject_SetAttrString (result.get (), "bitsize", arg.get ()) < 0)
@@ -596,11 +596,11 @@ typy_range (PyObject *self, PyObject *args)
break;
}
- gdbpy_ref<> low_bound (PyLong_FromLong (low));
+ gdbpy_ref<> low_bound = gdb_py_object_from_longest (low);
if (low_bound == NULL)
return NULL;
- gdbpy_ref<> high_bound (PyLong_FromLong (high));
+ gdbpy_ref<> high_bound = gdb_py_object_from_longest (high);
if (high_bound == NULL)
return NULL;