aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-02-28 20:14:08 +0000
committerTom Tromey <tromey@redhat.com>2013-02-28 20:14:08 +0000
commitddb08e9caa02b478b6f4f3969cf5a7142fc0035e (patch)
treef303015dd24257a72769cdf89f5b3e06f76ce9ca /gdb/python
parent62d7fb51718b98d4322ebd15df5907d4a0984100 (diff)
downloadgdb-ddb08e9caa02b478b6f4f3969cf5a7142fc0035e.zip
gdb-ddb08e9caa02b478b6f4f3969cf5a7142fc0035e.tar.gz
gdb-ddb08e9caa02b478b6f4f3969cf5a7142fc0035e.tar.bz2
* python/py-arch.c (archpy_disassemble): Use PyInt_Check and
PyLong_Check.
Diffstat (limited to 'gdb/python')
-rw-r--r--gdb/python/py-arch.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/python/py-arch.c b/gdb/python/py-arch.c
index b41de06..ddfebdb 100644
--- a/gdb/python/py-arch.c
+++ b/gdb/python/py-arch.c
@@ -111,12 +111,12 @@ archpy_disassemble (PyObject *self, PyObject *args, PyObject *kw)
start = start_temp;
if (end_obj)
{
- if (PyObject_TypeCheck (end_obj, &PyInt_Type))
+ if (PyLong_Check (end_obj))
+ end = PyLong_AsUnsignedLongLong (end_obj);
+ else if (PyInt_Check (end_obj))
/* If the end_pc value is specified without a trailing 'L', end_obj will
be an integer and not a long integer. */
end = PyInt_AsLong (end_obj);
- else if (PyObject_TypeCheck (end_obj, &PyLong_Type))
- end = PyLong_AsUnsignedLongLong (end_obj);
else
{
Py_DECREF (end_obj);