From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27554 invoked by alias); 21 May 2013 20:55:23 -0000 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 Received: (qmail 27542 invoked by uid 89); 21 May 2013 20:55:22 -0000 X-Spam-SWARE-Status: No, score=-8.2 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 21 May 2013 20:54:47 +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 r4LKskYs023225 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 21 May 2013 16:54:46 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r4LKsiRd020394; Tue, 21 May 2013 16:54:45 -0400 Message-ID: <519BDF14.8060200@redhat.com> Date: Tue, 21 May 2013 20:55:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 MIME-Version: 1.0 To: gdb-patches@sourceware.org CC: Jan Kratochvil , Tom Tromey Subject: [COMMIT] Centralize workaround for Python 2.6's Py_DECREF. (Re: [patch] Compilation regression with python-2.6) References: <87ehe638ww.fsf@fleche.redhat.com> <8761ziy43f.fsf@fleche.redhat.com> <20130521075803.GA404@host2.jankratochvil.net> <519B9B54.9090907@redhat.com> <20130521161400.GA2763@host2.jankratochvil.net> <519B9F9A.9070600@redhat.com> In-Reply-To: <519B9F9A.9070600@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-05/txt/msg00790.txt.bz2 On 05/21/2013 05:23 PM, Pedro Alves wrote: > Subject: Centralize workaround for Python 2.6's Py_DECREF. > > Wrap/redefine Py_DECREF ourselves, avoiding the need for uses to care > about extra braces due to the fact that Python only started wrapping Py_DECREF > in 'do {} while (0)' after 2.6. > > gdb/ > 2013-05-21 Pedro Alves > > * python/py-utils.c (py_decref): Remove extra braces. > (gdb_pymodule_addobject): Remove extra braces. > * python-internal.h (gdb_Py_DECREF): New static inline function. > (Py_DECREF): Redefine as calling gdb_Py_DECREF. I've applied this one. -- Pedro Alves