From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8888 invoked by alias); 28 Feb 2013 19:41:48 -0000 Received: (qmail 8877 invoked by uid 22791); 28 Feb 2013 19:41:47 -0000 X-SWARE-Spam-Status: No, hits=-6.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 28 Feb 2013 19:41:39 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r1SJfbwN027227 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 28 Feb 2013 14:41:38 -0500 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r1SJfa1I015560 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 28 Feb 2013 14:41:37 -0500 From: Tom Tromey To: Simeon S Cc: gdb-patches@sourceware.org Subject: Re: PyInt_Type undeclared References: Date: Thu, 28 Feb 2013 19:56:00 -0000 In-Reply-To: (Simeon S.'s message of "Thu, 28 Feb 2013 19:18:36 +0000") Message-ID: <87r4k0w7in.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2013-02/txt/msg00766.txt.bz2 >>>>> "Simeon" == Simeon S 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 * 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);