From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13303 invoked by alias); 28 Feb 2013 19:56:25 -0000 Received: (qmail 13295 invoked by uid 22791); 28 Feb 2013 19:56:24 -0000 X-SWARE-Spam-Status: No, hits=-3.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-ia0-f182.google.com (HELO mail-ia0-f182.google.com) (209.85.210.182) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 28 Feb 2013 19:56:19 +0000 Received: by mail-ia0-f182.google.com with SMTP id k38so1921431iah.13 for ; Thu, 28 Feb 2013 11:56:18 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.50.192.169 with SMTP id hh9mr10739685igc.31.1362081378851; Thu, 28 Feb 2013 11:56:18 -0800 (PST) Received: by 10.64.170.200 with HTTP; Thu, 28 Feb 2013 11:56:18 -0800 (PST) In-Reply-To: <87r4k0w7in.fsf@fleche.redhat.com> References: <87r4k0w7in.fsf@fleche.redhat.com> Date: Thu, 28 Feb 2013 20:03:00 -0000 Message-ID: Subject: Re: PyInt_Type undeclared From: Simeon S To: Tom Tromey Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 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/msg00768.txt.bz2 Seems to be compiling fine. For reference: simeon % gdb --version GNU gdb (GDB) 7.5.50.20130228 Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-unknown-linux-gnu". For bug reporting instructions, please see: . simeon % python --version Python 3.3.0 Simeon On 28 February 2013 19:41, Tom Tromey wrote: >>>>>> "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);