From: Tom Tromey <tromey@redhat.com>
To: Simeon S <simeon.simeonov.s@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: PyInt_Type undeclared
Date: Thu, 28 Feb 2013 19:56:00 -0000 [thread overview]
Message-ID: <87r4k0w7in.fsf@fleche.redhat.com> (raw)
In-Reply-To: <CAGwyPpEQCrp31kD9jsvZGN5w5Nrc6sF-XbYpQtjzEve+dd=oyg@mail.gmail.com> (Simeon S.'s message of "Thu, 28 Feb 2013 19:18:36 +0000")
>>>>> "Simeon" == Simeon S <simeon.simeonov.s@gmail.com> writes:
Simeon> While building gdb-7.5.50.20130228 against Python 3.3.0 I
Simeon> encountered the error (build log attached):
Could you try this patch?
Tom
2013-02-28 Tom Tromey <tromey@redhat.com>
* python/py-arch.c (archpy_disassemble): Use PyInt_Check and
PyLong_Check.
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);
next prev parent reply other threads:[~2013-02-28 19:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-28 19:22 Simeon S
2013-02-28 19:56 ` Tom Tromey [this message]
2013-02-28 20:03 ` Simeon S
2013-02-28 20:26 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r4k0w7in.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=simeon.simeonov.s@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox